Skip to content

Instantly share code, notes, and snippets.

@dergachev
dergachev / GIF-Screencast-OSX.md
Last active April 28, 2025 00:02
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@saimonmoore
saimonmoore / export_skype_chat_history.sh
Created April 5, 2013 08:24
Bash function to export Skype chat history for a particular conversation
function export_skype_chat_history {
sqlite3 ~/Library/Application\ Support/Skype/saimonmoore/main.db "SELECT author,timestamp, body_xml FROM messages WHERE dialog_partner = '$1'" > ~/Desktop/skype_chat_history_$1.txt
}
@saimonmoore
saimonmoore / gist:5484615
Created April 29, 2013 20:41
Unbuffer tty and copy ansi escape sequences in OSX
script -q /dev/null bundle exec rspec spec/lib/organization/manager_spec.rb -c -f d | bcat
@saimonmoore
saimonmoore / self-control.bash
Created May 23, 2013 10:24
turn internet on/off for a short while
#!/bin/bash
PORTS="80 443"
UNDO=
for p in $PORTS
do
iptables -I OUTPUT -p tcp --dport $p -j DROP -v
UNDO="$UNDO iptables -D OUTPUT -p tcp --dport $p -j DROP -v;"
done
#!/bin/bash
# https://httpd.apache.org/docs/2.2/misc/password_encryptions.html
HTPASSWD=$1
USERNAME=$2
PASSWORD=$3
ENTRY=`cat $HTPASSWD | grep "^$USERNAME:"`
HASH=`echo $ENTRY | cut -f 2 -d :`
SALT=`echo $HASH | cut -f 3 -d $`