This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
| brew install apple-gcc42 openssl libyaml libffi | |
| xcode-select --install | |
| export CC=/usr/local/bin/gcc-4.2 | |
| export CFLAGS='-g -O2' | |
| export RUBY_CONFIGURE_OPTS=--with-openssl-dir=`brew --prefix openssl` | |
| export CONFIGURE_OPTS=--with-openssl-dir=`brew --prefix openssl` | |
| # I had to edit the svn repo URL in /usr/local/Cellar/ruby-build/20160913/share/ruby-build/1.8.7-p375 and change the URL from http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8_7 to https://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8_7 | |
| rbenv install 1.8.7-p375 |
replays last FIN-ACK in order to check if the other side correctly implements TIMED-WAIT. other side should be first to close the connection. with http this can be done in curl by forcing http/1.0 mode.
curl -0 -d 'lolol=lololol' http://TARGET/wtwtwt
tcpdump -S 'tcp port 80' -l | ./replayer.rb TARGET 80 YOUR_HOST_AS_APPEARS_IN_TCPDUMP
Example of it working and showing the other side correctly handling TIMED-WAIT:
root@midway:~# tcpdump -S 'tcp port 80' -l | ./replayer.rb 173.194.41.67 80 ip-10-250-157-181.eu-west-1.compute.internal
OMG IM RUNNING
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
| Thanks to Jason Roelofs for his article at http://jasonroelofs.com/2012/03/12/manage-and-monitor-resque-with-upstart-and-monit/ which got me most of the way there. |
| description "nginx http daemon" | |
| start on runlevel [2] | |
| stop on runlevel [016] | |
| console owner | |
| exec /opt/nginx/sbin/nginx -c /opt/nginx/conf/nginx.conf -g "daemon off;" | |
| respawn |
| class PostsController < ActionController::Base | |
| def create | |
| Post.create(post_params) | |
| end | |
| def update | |
| Post.find(params[:id]).update_attributes!(post_params) | |
| end | |
| private |
| # It's important to convert the vbox image (VMDK or VDI or whatever) using | |
| # the same version of VirtualBox that created it. You can try converting the image | |
| # with qemu-img or kvm-img, but weird version mismatches will possibly make it not | |
| # work. | |
| # On your VirtualBox machine: | |
| cd $VBOX_ROOT/$MACHINE_ROOT/ | |
| VBoxManage clonehd machine.vmdk machine.img --format RAW | |
| scp machine.img root@kvm-host:/somewhere |
| require 'rubygems' | |
| require 'data_mapper' | |
| DataMapper.setup :default, 'sqlite::memory:' | |
| class Book | |
| include DataMapper::Resource | |
| property :id, Serial | |
| property :meta, Json |
| #!/bin/bash | |
| ## MOVED TO https://github.com/sickill/git-dude | |
| INTERVAL=30 | |
| ICON_PATH=`pwd`/icon.png | |
| export LC_ALL=C # make sure git talks english | |
| while [ 1 ]; do | |
| for dir_name in *; do |