Skip to content

Instantly share code, notes, and snippets.

View codatory's full-sized avatar

Alex Conner codatory

View GitHub Profile
# SSH Connection pooling for faster additional connections to a machine
ControlMaster auto
ControlPath /tmp/ssh_mux_%h_%p_%r
# This makes subsequent connections go faster
ControlPersist 2h
# Make it so ssh-ing from one server to another passes keys around automagically
ForwardAgent yes
# Handy Benchmark Script for comparing times of two methods
require 'benchmark'
require './lib/regexp'
# Uses https://github.com/mpalmer/email-address-validator
times = 20000000
email_1 = 'jdoe@gmail.com'
email_2 = 'foo.bar'
email_3 = 'nframe.com'
@codatory
codatory / takenote.sh
Created July 16, 2011 23:57
Take Note
# A bash profile snippet to timestamp and store passed text in
# a notefile for later retrieval
take_note() {
DATE=`date`
echo ${DATE} - $* >> ~/notefile
}
@codatory
codatory / Info.plist
Created July 15, 2011 19:54
Tweaked JVM Settings for RubyMine with a large project
<key>VMOptions</key>
<string>-ea -Xverify:none -Xbootclasspath/a:../lib/boot.jar -XX:+UseConcMarkSweepGC -XX:+ParNewGC</string>
<key>VMOptions.i386</key>
<string>-Xms128m -Xmx1024m -XX:MaxPermSize=250m -XX:ReservedCodeCacheSize=64m</string>
<key>VMOptions.x86_64</key>
<string>-Xms128m -Xmx2048m -XX:MaxPermSize=350m -XX:ReservedCodeCacheSize=64m -XX:+UseCompressedOops</string>
# $Id$
# Authority: dag
# Upstream: Richard Hipp <drh$hwaci,com>
### EL6 ships with sqlite-3.6.20-1.el6
### EL5 ships with sqlite-3.3.6-5
### Builds fine, but related python-sqlite needs python >= 2.3 and yum 2.4 needs sqlite2
# ExcludeDist: el2 rh7 rh9 el3 el4
%{?el3:%define _without_tcl 1}
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
=border-radius-left($radius)
-moz-border-radius-topleft = $radius
-webkit-border-top-left-radius = $radius
-border-top-left-radius= $radius
-moz-border-radius-bottomleft = $radius
-webkit-border-bottom-left-radius = $radius
-border-bottom-left-radius= $radius
=border-radius-top($radius)
@codatory
codatory / fedora-init.sh
Created May 20, 2011 17:48
Fedora 15 Setup Script
#!/bin/bash
clear
function echo_newline {
echo -e "\n"
}
function pretty_echo {
echo_newline
~ :❯ time curl http://direct.indygeek.net/ > /dev/null
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 29504 0 29504 0 0 191k 0 --:--:-- --:--:-- --:--:-- 242k
real 0m0.159s
user 0m0.004s
sys 0m0.006s
~ :❯ time curl http://www.indygeek.net/ > /dev/null
% Total % Received % Xferd Average Speed Time Time Time Current
if (-f $request_filename) {
break;
}
try_files $uri $uri/ @wordpress;
index index.html, index.php;
}
location @wordpress {