Skip to content

Instantly share code, notes, and snippets.

@asmega
asmega / index.sh
Last active June 8, 2017 16:28
install imagemagick woes
$ brew install imagemagick
==> /usr/local/Cellar/imagemagick/6.8.6-3
$ brew install pkgconfig
==> /usr/local/Cellar/pkg-config/0.28
$ C_INCLUDE_PATH=/usr/local/Cellar/imagemagick/6.8.6-3/include/ImageMagick-6 PKG_CONFIG_PATH=/usr/local/Cellar/imagemagick/6.8.6-3/lib/pkgconfig/ gem install rmagick
Successfully installed rmagick-2.13.2
C_INCLUDE_PATH=/usr/local/Cellar/imagemagick@6/6.9.8-4/include/ImageMagick-6 PKG_CONFIG_PATH=/usr/local/Cellar/imagemagick@6/6.9.8-4/lib/pkgconfig/ gem install rmagick -v '2.16.0'
@asmega
asmega / gist:0ee2686e59ced42029d5
Last active May 11, 2017 17:56
manage filevault on a mac
sudo fdesetup help
sudo fdesetup list
sudo fdesetup remove -user USERNAME
@asmega
asmega / gist:3394155
Created August 19, 2012 10:24
update mlocate locate database for mac
sudo /usr/libexec/locate.updatedb
@asmega
asmega / index.sh
Created March 26, 2017 17:33
remove postgres pid file on mac
rm /usr/local/var/postgres/postmaster.pid
@asmega
asmega / index.sh
Created March 24, 2017 10:54
less with raw chars for colors / colours
less -R log.log
@asmega
asmega / gist:655bc09fbd5fa3c720457ef87112c791
Created March 20, 2017 22:24
ffmpeg limit frame rate
ffmpeg -i in.mp4 -r 30 out.mp4
# where r is framerate
@asmega
asmega / gist:f6e30b9623f74b87c9b83727fa1faf0a
Created March 19, 2017 20:37
dig lookup with specific dns server
dig example.com @nameserver.example.com
@asmega
asmega / 1.sh
Last active March 1, 2017 10:14
change aspect ratio of video
ffmpeg -i input.mp4 -vf setdar=dar=16/9 output.mp4
a = []
document.querySelectorAll(".smallTitleCard").forEach(function(e) {a.push(e.attributes['aria-label'].value)})
JSON.stringify(a)
@asmega
asmega / gist:43619bb940478f50077082dd42032590
Created January 4, 2017 22:43
git log exclude folder
git log -p -- . ":(exclude)name_of_folder"