I hereby claim:
- I am tehpeh on github.
- I am tehpeh (https://keybase.io/tehpeh) on keybase.
- I have a public key ASDLIJg_xlMG_yAFltDtnTVw7u_Jlax5OvVPUtShgP7FKgo
To claim this, I am signing this object:
#!/usr/bin/env ruby | |
input = [["GREY", "1"], ["GREY", "2"], ["GREY", "3"], ["LIME", "1"], ["LIME", "2"], ["LIME", "3"], ["PINK", "1"], ["PINK", "2"], ["PINK", "3"], ["RED", "1"], ["RED", "2"], ["RED", "3"]] | |
out = {} | |
input.each do |a| | |
out[a.first] ||= [] | |
out[a.first] << a.last | |
end |
#!/usr/bin/env ruby | |
def sort_colours(str) | |
ranking = { | |
"blue" => 1, | |
"orange" => 2, | |
"green" => 3, | |
"yellow" => 4, | |
"pink" => 5, | |
"red" => 6, |
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: nginx | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: nginx init.d dash script for Ubuntu <=9.10. | |
# Description: nginx init.d dash script for Ubuntu <=9.10. | |
### END INIT INFO |
Setup: | |
------ | |
See ror-deploy.txt for general instructions. | |
Packages: | |
--------- | |
sudo aptitude update | |
sudo aptitude safe-upgrade |
#!/bin/sh | |
# | |
# nginx - this script starts and stops the nginx daemon | |
# | |
# chkconfig: - 85 15 | |
# description: Nginx is an HTTP(S) server, HTTP(S) reverse \ | |
# proxy and IMAP/POP3 proxy server | |
# processname: nginx | |
# config: /etc/nginx/nginx.conf | |
# config: /etc/sysconfig/nginx |
General steps for a RoR deployment on linux. | |
For Ubuntu, see ubuntu-deploy.txt | |
For CentOS, see centos-deploy.txt | |
Information: | |
------------ | |
- users | |
cat /etc/passwd |
Setup: | |
------ | |
See ror-deploy.txt for general instructions. | |
Create user: | |
------------ | |
groupadd staff | |
useradd [user] -g staff |
# Copyright (c) 2011, 2012 Solano Labs All Rights Reserved | |
namespace :tddium do | |
desc "load database extensions" | |
task :db_hook do | |
Rake::Task["db:create"].invoke | |
Kernel.system("psql #{ENV['TDDIUM_DB_NAME']} -c 'CREATE EXTENSION hstore;'") | |
Rake::Task["tddium:default_db_hook"].invoke |
<script type="text/javascript"> | |
YUI().use('node', 'io', 'event', function (Y) { | |
// Outbound Link Tracking with Google Analytics | |
// http://wptheming.com/2012/01/tracking-outbound-links-with-google-analytics/ | |
// Modified for YUI3 | |
Y.one(Y.config.doc).delegate('click', function(e) { | |
var url = this.getDOMNode(); | |
if (url.host != window.location.host) { | |
_gaq.push(['_trackEvent', 'Outbound Links', url.host, url.href, 0]); |
I hereby claim:
To claim this, I am signing this object: