Thursday, March 29, 2018

Ubuntu 16 OpenCV 2.4.x disable ffmpeg and jpeg



cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON -D BUILD_NEW_PYTHON_SUPPORT=ON -D WITH_V4L=ON -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D BUILD_EXAMPLES=ON -D WITH_QT=ON -D WITH_OPENGL=ON -D WITH_FFMPEG=OFF -D WITH_JPEG=OFF ..


Ubuntu webm to mp4

ffmpeg -i video.webm -movflags faststart -profile:v high -level 4.2 video.mp4

Ubuntu 16 VMWare Player



$wget -c https://download3.vmware.com/software/player/file/VMware-Player-12.5.0-4352439.x86_64.bundle
$sudo chmod u+x VMware-Player-12.5.0-4352439.x86_64.bundle
$sudo ./VMware-Player-12.5.0-4352439.x86_64.bundle

Monday, March 26, 2018

Ubuntu how to get interval time for run Application



howmuchdelay.sh

T="$(date +%s%N)"
# Do some work here
$1 $2 $3 $4 $5 #sleep 2

# Time interval in nanoseconds
T="$(($(date +%s%N)-T))"

# Seconds
S="$((T/1000000000))"

# Milliseconds
M="$((T/1000000))"

printf "Take: %02d:%02d:%02d:%02d.%03d\n" "$((S/86400))" "$((S/3600%24))" "$((S/60%60))" "$((S%60))" "${M}"

Tuesday, March 20, 2018

Ubuntu 16: Arcade games


$sudo apt-get install zsnes  #super nintendo
$sudo apt-get install mupen64plus  #nintendo 64


Friday, March 16, 2018

Ubuntu CPU-G

Ubuntu 16

$sudo add-apt-repository ppa:atareao/atareao
$sudo apt-get update
$sudo apt-get install cpu-g


Ubuntu 14

sudo add-apt-repository ppa:cpug-devs/ppa
sudo apt-get update
sudo apt-get install cpu-g

Tuesday, March 13, 2018

Ubuntu 16 Using QEmu

Basic Commands:


*create drives 
$qemu-img create name.img size|M|G
$qemu-img create win98hda.img 400M 
*resize driver
$qemu-img resize filename [+|-]size[K|M|G|T]
$qemu-img resize win98hda.img +600M
$gparted win98hda.img #for expand physically 
 
 
$qemu [-boot ] -cdrom .iso [-m size]|128M -hda disk-name.img
$qemu -boot d -cdrom win98se.iso -m 512 -hda win98hda.img
 
other examples:
[1] install win98 using boot iso and installer iso (two disks)
$qemu-system-i386 -hda win98s2018.img -boot d -cdrom win98boot.iso -drive file=win98se.iso,index=3,media=cdrom
$qemu-system-i386 -hda win98s2018.img -boot c -cdrom win98boot.iso -drive file=win98se.iso,index=3,media=cdrom 
$qemu-system-i386 -drive file=win98s2018.img,format=raw -m 512 #other way to run
  
 

$qemu-system-x86_64 -hda driveubuntu.img -cdrom ubuntu-x86-14.1-r1.iso -boot d -m 1024   -usbdevice mouse



Images:
[1] Windows XP https://mega.nz/#!B4ZEiRyD!tIS4NFNqcShJtTvNcheujIfSVS8H3ejlU2VLJdN9C3o
[2] 95 https://mega.nz/#!tw4m2Z6K!XsrXdAODy0HGjNVzvpSNviDQfvQP0ULVI7UGbhFdJh0

References:
[1] https://www.unixmen.com/how-to-install-and-configure-qemu-in-ubuntu/
[2] http://www.helenos.org/wiki/UsersGuide/RunningInQEMU



Thursday, March 01, 2018

Raspberry PI 3 qemu



apt-get install libglib2.0-dev zlib1g-dev
$./configure --target-list=i386-softmmu  #for reduce time > 5hrs (normally)
$make
$sudo make install

https://b3n7s.github.io/update/2016/06/08/windows-xp-on-qemu.html
https://wiki.gentoo.org/wiki/QEMU/Windows_guest

Firefox open multiple private window

    /opt/firefox/firefox-bin --profile $(mktemp -d) --private-window www.google.com www.bing.com