Skip to content

Instantly share code, notes, and snippets.

View -
-----BEGIN PGP MESSAGE-----
Version: GnuPG v1
hQEMA5aRv0EAA/2mAQgAhkrGuBuOyelzOPxogevHql/oUOK8xyElJjOOMSLMlW2N
SN8/6+ztv/10PvXPU13FPZQE4kaAV4//cGo6A5VIKxeJ8Ro4zwpmgqqY4oto+TzF
Mf8wdx+1kEnL/k6V5LH7TqdJT/2YGeILhmb9l7hG+sUrppTW2eVfqjXuFYLGId6W
ZhXeIkJB6cAbcnSG7TTBcspp+DVZo+mbh0FroPesg1yf1xQBzGXlbR1zil2zSO50
M6mVlay5z+mM4njTUEzxssETUdaozLdfgHllEOklRu9TbqCzSzhbakjBoh9Wj6sk
vtp1GSOj9ueV2LIDhRwunwYsmce5iSJdHfCLSUd8VdLAAgEcZhx77bLrk2WDIEVp
3KYdu6xZG3tAXnNqfxYDRbR+cqSpOljjAFUAHLaVrRKjDbeTWxKwrFPC2hMNpRtv
View keybase.md

Keybase proof

I hereby claim:

  • I am paulrosania on github.
  • I am paulrosania (https://keybase.io/paulrosania) on keybase.
  • I have a public key whose fingerprint is C0F3 B98E 2BAE 7A94 9EEA D41B AEA5 1EFB 705D C9A5

To claim this, I am signing this object:

@paulrosania
paulrosania / kill-slow-queries.sh
Created Jun 6, 2012
A script for killing slow MySQL queries, suited for a cron job
View kill-slow-queries.sh
#!/bin/sh
# Credentials for a MySQL user with PROCESS, SUPER permissions
USERNAME=
PASSWORD=
# MySQL Server location
HOST=127.0.0.1
PORT=3306
View gzsplit
#!/usr/bin/env ruby
#
# gzsplit - split a file into gzipped pieces
filename = ARGV[0]
prefix = ARGV[1] || "part"
line_number = 0
chunk_size = 500_000
next_part_number = 0
gzip = nil
@paulrosania
paulrosania / gist:2153849
Created Mar 21, 2012
configure `hub` using the OS X keychain
View gist:2153849
export GITHUB_USER=$(security find-generic-password -s github.token | grep acct | cut -d= -f2 | tr -d \")
export GITHUB_TOKEN=$(security find-generic-password -gs github.token 2>&1 >/dev/null | cut -d\ -f2 | tr -d \")
View gist:1792416
---
BUNDLE_PATH: vendor/bundle
BUNDLE_BUILD__MYSQL: --with-mysql-config=/usr/local/mysql/bin/mysql_config
View gist:1792411
---
BUNDLE_DISABLE_SHARED_GEMS: "1"
View setup-xp.sh
#!/bin/sh
# setup-xp.sh - Install and configure IE Application Compatibility images in VirtualBox
#
# Some parts from: http://www.peculier.com/blog/create-ie-vbox.html
## Prerequisites:
#
# - VirtualBox 4.0+
# - unrar (`brew install unrar`)
# - 7zip (`brew install 7zip`)
@paulrosania
paulrosania / gist:1515117
Created Dec 23, 2011 — forked from arnorhs/gist:1509904
gitopen - Open all files from a git diff or show command
View gist:1515117
#!/bin/bash
# This script will open all files from a git diff or a git show in vim.
# My bash skills are a bit primitive so this can probably be done more intelligently
# Usage:
# gitopen -- opens all added files that have changed since HEAD
# gitopen diff HEAD -- these are the default parameters
# gitopen diff master -- opens files that have changed from master
View quine.rb
code = %q{Nputs "code = %q{#{code}}"NNcode.chars.each do |c|N if c > 'M' && c < 'O'N putsN elseN print cN endNendNNputs}
puts "code = %q{#{code}}"
code.chars.each do |c|
if c > 'M' && c < 'O'
puts
else
print c
end