convert a video to gif
mkdir frames
ffmpeg -i input -vf scale=320:-1:flags=lanczos,fps=10 frames/ffout%03d.png
convert -loop 0 frames/ffout*.png output.gif
複製程式碼
copy file use ssh
scp -P port /path/to/file username@a:/path/to/destination
scp -P port username@b:/path/to/file /path/to/destination
複製程式碼
terminal startup time
Put
set -x
at the top and
set +x
at the bottom of both files ~/.profile and ~/.bashrc.
複製程式碼
show open ports
netstat -tlp | grep LISTEN
複製程式碼
startup command
/etc/rc.local
複製程式碼
use Vim edit Hex file
:%!xxd
to switch into hex mode
:%!xxd -r
to exit from hex mode
modify a file inside a jar
jar uf jar-file input-file(s)
複製程式碼
make a large file
dd if=/dev/zero of=outputFile bs=2G count=1
複製程式碼