# need to install ruby
# install ssh-forever on macos or linux
gem install ssh-forever
# adding password to .ssh/config
# mkdir download | |
# cd download | |
# 仅仅在MacOSX上安装软件ImageMagick | |
# 需要运行一段时间 | |
sudo bash < <( curl -L http://lycom.de/bash/magick-installer.sh ) | |
# 每当出现“Password: ”,请输入密码 | |
# 或者 |
gsub_file 'config/environments/production.rb', /config.i18n.fallbacks = true/ do <<-'RUBY' | |
config.i18n.fallbacks = true | |
config.action_mailer.default_url_options = { :host => 'yourhost.com' } | |
RUBY | |
end | |
gsub_file 'config/environments/production.rb', /config.i18n.fallbacks = true/, "\ | |
config.i18n.fallbacks = true | |
config.action_mailer.default_url_options = { :host => 'yourhost.com' }" |
$ curl -O ftp://ftp.gnu.org/gnu/ncurses/ncurses-5.9.tar.gz | |
$ tar -xzvf ncurses-5.9.tar.gz | |
$ cd ./ncurses-5.9 | |
$ ./configure --prefix=/usr/local \ | |
--without-cxx --without-cxx-binding --without-ada --without-progs --without-curses-h \ | |
--with-shared --without-debug \ | |
--enable-widec --enable-const --enable-ext-colors --enable-sigwinch --enable-wgetch-events \ | |
&& make | |
$ sudo make install |
$ aptitude install sqlite3 libsqlite3-dev | |
$ wget http://www.sqlite.org/sqlite-autoconf-3070400.tar.gz | |
$ apt-get build-dep sqlite3 | |
$ tar vvvvvxzf sqli* | |
$ cd sqli* && ./configure | |
$ make && make install | |
$ cp /usr/local/lib/libsqlite3.* /usr/lib/ | |
$ ldconfig |
exa -d _* **/../_*
ls -d _* **/../_*
wget https://repo1.maven.org/maven2/com/madgag/bfg/1.13.0/bfg-1.13.0.jar
// https://stackoverflow.com/questions/18444194/cutting-the-videos-based-on-start-and-end-time-using-ffmpeg | |
INPUT_VIDEO=input | |
CUT_OUTPUT_VIDEO=cut_output | |
BEGIN_TIME="00:00:03" | |
END_TIME="00:00:08" | |
ffmpeg -ss $BEGIN_TIME -t $END_TIME -i $INPUT_VIDEO.mp4 -acodec copy -vcodec copy -async 1 $CUT_OUTPUT_VIDEO.mp4 |
# install ffmpeg on MacOS | |
brew install ffmpeg | |
brew cask install vlc | |
# merge two vidoes into one video | |
ls | |
INPUT_VIDEO_1=input_01 | |
INPUT_VIDEO_2=input_02 | |
OUTPUT_VIDEO=output | |
ffmpeg -i $INPUT_VIDEO_1.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts $INPUT_VIDEO_1.ts |
# fix my permissions for OSX Homebrew | |
# https://github.com/Homebrew/legacy-homebrew/issues/43301 | |
sudo chown -R "$USER":admin /usr/local |