Skip to content

Instantly share code, notes, and snippets.

free hugs


free hugs
View GitHub Profile
simme / Install_tmux
Created Oct 19, 2011
Install and configure tmux on Mac OS X
View Install_tmux
# First install tmux
brew install tmux
# For mouse support (for switching panes and windows)
# Only needed if you are using (iTerm has mouse support)
Then install
# More on mouse support
mikeyk / gist:1329319
Created Oct 31, 2011
Testing storage of millions of keys in Redis
View gist:1329319
#! /usr/bin/env python
import redis
import random
import pylibmc
import sys
r = redis.Redis(host = 'localhost', port = 6389)
mc = pylibmc.Client(['localhost:11222'])
soemarko / theme.html
Created Nov 26, 2011
embed github gist to tumblr
View theme.html
<!-- Add the following lines to theme's html code right before </head> -->
<script src=""></script>
<script src=""></script>
<script src=""></script>
Usage: just add <div class="gist">[gist URL]</div>
Example: <div class="gist"></div>
acdha /
Created Nov 28, 2011
Use curl to measure and report HTTP response times (pre-, start- and total transfer)
# Report time to first byte for the provided URL using a cache buster to ensure
# that we're measuring full cold-cache performance
while (($#)); do
echo $1
curl -so /dev/null -H "Pragma: no-cache" -H "Cache-Control: no-cache" \
-w "%{http_code}\tPre-Transfer: %{time_pretransfer}\tStart Transfer: %{time_starttransfer}\tTotal: %{time_total}\tSize: %{size_download}\n" \
"$1?`date +%s`"
kreeger / mw2md.rb
Created Mar 5, 2012
Ruby: Convert MediaWiki to Markdown
View mw2md.rb
#!/usr/bin/env ruby
require 'rubygems'
require 'optparse'
require 'maruku'
require 'wikicloth'
require 'tidy_ffi'
require 'pandoc-ruby'
opts = {} do |o|
VantivSDK / gist:2120291
Last active Nov 7, 2017
Curl example
View gist:2120291
$curl --header "Content-Type: text/xml" -d@<File with XML content>
VantivSDK / gist:2230571
Created Mar 28, 2012
PHP SDK - Litle AVS Only Transaction
View gist:2230571
require_once realpath(dirname(__FILE__)) . '/../lib/LitleOnline.php';
#AVS Only
$auth_info = array(
'orderId' => '1',
'id'=> '456',
'amount' => '10010',
VantivSDK / gist:2230606
Created Mar 28, 2012
PHP SDK - Litle Auth Reversal transaction
View gist:2230606
require_once realpath(dirname(__FILE__)) . '/../lib/LitleOnline.php';
#Auth Reversal
#litleTxnId contains the Litle Transaction Id returned on the authorization
$authRev_info = array(
'id'=> '456'
VantivSDK / gist:2230641
Created Mar 28, 2012
PHP SDK - Litle Capture Given Auth transaction
View gist:2230641
require_once realpath(dirname(__FILE__)) . '/../lib/LitleOnline.php';
#Capture Given Auth
$capture_info = array(
'id'=> '456',
'authInformation' => array(
VantivSDK / gist:2230664
Created Mar 28, 2012
PHP SDK - Litle Force Capture transaction
View gist:2230664
require_once realpath(dirname(__FILE__)) . '/../lib/LitleOnline.php';
#Force Capture
$capture_info = array(
'id'=> '456',
'merchantId' => '101',
You can’t perform that action at this time.