Skip to content

Instantly share code, notes, and snippets.

createdb pgbouncer_bench
pgbench -i -s 10 pgbouncer_bench
pgbench -c 10 -C -T 60 pgbouncer_bench
pgbench -c 80 -C -T 60 pgbouncer_bench
pgbench -c 10 -C -T 60 -p 6432 pgbouncer_bench
pgbench -c 80 -C -T 60 -p 6432 pgbouncer_bench
# ...
populateAutocompleteForResourceName = (resourceName, done) ->
redisClient = require("redis").createClient()
redisClient.debug_mode = true
sequelize = require('./app/models').sequelize
redisKey = "compl:#{resourceName}"
selectQuery = "SELECT DISTINCT(\"Places\".\"#{resourceName}\") from \"Places\""
sequelize.query(selectQuery).success((resources) ->
multi = redisClient.multi()
for resource in resources
export PATH="/usr/local/bin:/usr/local/git/bin:/Applications/Postgres.app/Contents/MacOS/bin::$PATH:~/bin:/usr/local/share/npm/bin:/Applications/ImageOptim.app/Contents/MacOS"
export CLICOLOR=1
export EDITOR=vim
export PS1="\[\033[0;37m\]\342\224\214\342\224\200\$([[ \$? != 0 ]] && echo \"[\[\033[0;31m\]\342\234\227\[\033[0;37m\]]\342\224\200\")[$(if [[ ${EUID} == 0 ]]; then echo '\[\033[0;31m\]\h'; else echo '\[\033[0;33m\]\u\[\033[0;37m\]@\[\033[0;96m\]\h'; fi)\[\033[0;37m\]]\342\224\200[\[\033[0;32m\]\w\[\033[0;37m\]]\n\[\033[0;37m\]\342\224\224\342\224\200\342\224\200\342\225\274 \[\033[0m\]"
alias l="ls -lah"
alias open_icloud="open ~/Library/Mobile\ Documents/"
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function
require 'iconv'
class OsxStringsFileParser
class KeyValuePair < Struct.new(:key, :value, :comments)
def attributes
{ :text => value, :data => { 'key' => key, 'comments' => comments }}
end
end
REGEX_COMMENT_MULTI = /\/\*(.*?)\*\//
@happyrobots
happyrobots / web.config
Created August 7, 2013 03:41
Add max age to static contents in ASP.NET
<configuration>
<location path="Assets">
<system.webServer>
<staticContent>
<clientCache cacheControlCustom="public" cacheControlMode="UseMaxAge" cacheControlMaxAge="30.00:00:00"/>
</staticContent>
</system.webServer>
</location>
</configuration>