This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Case-insensitve matching on beginning of VPN name | |
| # To list all your VPNs use: scutil --nc list | |
| function vpngrep { | |
| vpn_name=$(scutil --nc list | sed -E 's/.*"([^"]+)".*/\1/' | grep -i "^${1}" | tail -1) | |
| } | |
| function vpncon { | |
| vpngrep $1 | |
| /usr/bin/env osascript <<-EOF |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| \set PROMPT1 '%[%033[1m%]%M %n@%/%R%[%033[0m%]%# ' | |
| \set PROMPT2 '[more] %R > ' | |
| -- By default, NULL displays as an empty space. Is it actually an empty | |
| -- string, or is it null? This makes that distinction visible. | |
| \pset null '[NULL]' | |
| -- Use table format (with headers across the top) by default, but switch to | |
| -- expanded table format when there's a lot of data, which makes it much | |
| -- easier to read. | |
| \x auto |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ### UNICORN KILLER | |
| if Integer(ENV['UNICORN_KILLER'] || 0) != 0 | |
| require 'unicorn/worker_killer' | |
| # Randomly kill worker between sizes 350M-400M, check every 30 requests, | |
| # and log memory checks | |
| min_mem = Integer(ENV['UNICORN_MEM_MIN'] || 350) | |
| max_mem = Integer(ENV['UNICORN_MEM_MAX'] || 400) | |
| puts "Unicorn killer enabled between #{min_mem}-#{max_mem}MB RSS usage" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require './lib/configuration/active_record' | |
| require './lib/configuration/processors' | |
| worker_processes Integer(ENV["UNICORN_WORKERS"] || ::Configuration::Processors.count) | |
| timeout 25 | |
| preload_app true | |
| before_fork do |server, worker| | |
| Signal.trap 'TERM' do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env sh | |
| ## | |
| # This is script with usefull tips taken from: | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # | |
| # install it: | |
| # curl -sL https://gist.github.com/raw/3883734/1d82131bcea3e06252b0ac702b7ca7c49f89b374/hack.sh | sh | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'formula' | |
| class Postgresql < Formula | |
| homepage 'http://www.postgresql.org/' | |
| url 'http://ftp.postgresql.org/pub/source/v9.2rc1/postgresql-9.2rc1.tar.bz2' | |
| md5 'e5a8434d70573ffe49259b8c52a9f7f9' | |
| depends_on 'readline' | |
| depends_on 'libxml2' if MacOS.leopard? # Leopard libxml is too old | |
| depends_on 'ossp-uuid' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| MMMMMMMMMM .,MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM | |
| MMMMM. OMM. ~MM.. MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM | |
| MMDMMZ7MMMMMMMMN7DMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM | |
| MMDMMMMMMMMMMMMMMMMMNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM | |
| MMMZ IMMM ..MMN= ,8MO 8 IN +DM8 ?MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM | |
| MMMMM ..OI . 8I...MMMO 8 IN M7 ,MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM | |
| MMMMMMN, . +MMMMMO 8 IN =O M~ ~..$MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM | |
| MMMMMMMM~... +MMMMMMO 8 IN . . IN I..+MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM | |
| MMMMMMMMMI . OMMMMMMMO 8 IN := ,O =8 MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM | |
| MMMMMMMD ... .MMMMMMO 8 IN =O + .MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM |