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:
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
#!/bin/bash | |
# CentOS rbenv system wide installation script | |
# Forked from https://gist.github.com/1237417 | |
# Installs rbenv system wide on CentOS 5/6, also allows single user installs. | |
# Install pre-requirements | |
yum install -y gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel \ | |
make bzip2 autoconf automake libtool bison iconv-devel git-core |
module Watcher | |
# Ensure compatibility. | |
def self.included( mod ) | |
mod.extend( self ) | |
end | |
# Declare a watcher. The block or lambda will be invoked with argumens of what the value was and now is, in that | |
# order. | |
def watch( sym, lambda = nil, &block ) |
#!/usr/bin/env ruby | |
# | |
# Get a list of merged branches | |
# | |
# You need to checkout the target remote branch before running. In other words, | |
# if your target branch is 'master', you have to have it on your local hard disk | |
# before you run this script, otherwise you will get an error like: `fatal: | |
# malformed object name master`. Git needs to have the branch available locally | |
# with latest changes pulled in order to find the branches that have/have-not | |
# been merged into it. |