This file contains 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
#!/bin/sh | |
# | |
# redis - this script starts and stops the redis-server daemon | |
# | |
# chkconfig: - 85 15 | |
# description: Redis is a persistent key-value database | |
# processname: redis-server | |
# config: /etc/redis/redis.conf | |
# config: /etc/sysconfig/redis | |
# pidfile: /var/run/redis.pid |
This file contains 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
# My new git commit shortcut, thanks to http://whatthecommit.com/ :-) | |
alias commit='git commit -m "$(curl -s http://whatthecommit.com/ |grep '<p>' |cut -c 4-)"' |
This file contains 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 zsh | |
if [[ -s "${TM_PROJECT_DIRECTORY}/.rvmrc" ]] | |
then | |
source "${TM_PROJECT_DIRECTORY}/.rvmrc" | |
fi | |
`which ruby` $* |
This file contains 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
# backup redis databases to s3 on the engineyard platform | |
require 'zlib' | |
require 'rubygems' | |
require 'crack/json' | |
require 'aws/s3' | |
class Redis2S3 | |
DATABASE = '/db/redis/redis_state.rdb' |
This file contains 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
When I follow the comments link | |
Then the page should not have the leaderboard | |
And I should see the activity feed | |
And the activity feed should have a loading indicator |
This file contains 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
tcp_syslog is now a gem : | |
https://github.com/tech-angels/tcp_syslog |
This file contains 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
export RUBY_HEAP_MIN_SLOTS=1000000 | |
export RUBY_HEAP_SLOTS_INCREMENT=1000000 | |
export RUBY_HEAP_SLOTS_GROWTH_FACTOR=1 | |
export RUBY_GC_MALLOC_LIMIT=1000000000 | |
export RUBY_HEAP_FREE_MIN=500000 |
This file contains 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
class QueryTracer < ActiveSupport::LogSubscriber | |
ACCEPT = %r{^(app|config|lib)}.freeze | |
FRAMES = 5 | |
THRESHOLD = 300 # In ms | |
def sql(event) | |
return unless event.duration > THRESHOLD | |
callers = Rails. | |
backtrace_cleaner. |
This file contains 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
######################################################################## | |
### Rakefile for encrypted passwords | |
######################################################################## | |
# | |
# Here's a little Rakefile to manage your encrypted password file! It's | |
# really easy to use: | |
# | |
# 1) put the email addresses of the keys you want in AUTHORIZED_USERS | |
# 2) create a passwords.txt (and ignore it in your SCM) | |
# 3) run `rake passwords:encrypt` |
This file contains 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
$ rbx memory.rb | |
memory used: 19.4M | |
$ bin/mspec ci -T -rmemory core/array | |
rubinius 1.2.1 (1.8.7 cdbdd275 2011-02-15 JI) [i686-apple-darwin9.8.0] | |
................................................................................................................ | |
Finished in 3.992361 seconds | |
112 files, 2166 examples, 4420 expectations, 0 failures, 0 errors |
OlderNewer