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
function __git_dirty { | |
git diff --quiet HEAD &>/dev/null | |
[ $? == 1 ] && echo "!" | |
} |
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
require 'rubygems' | |
require 'thor/rake_compat' | |
require 'rspec/core/rake_task' | |
class Test < Thor | |
include Thor::RakeCompat | |
RSpec::Core::RakeTask.new(:spec) do |t| | |
t.rspec_opts = ["--no-color"] | |
t.pattern = 'spec/**/*_spec.rb' |
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
# * ActiveRecord::SessionStore - Sessions are stored in your database, which works better than PStore with multiple app servers and, | |
# unlike CookieStore, hides your session contents from the user. To use ActiveRecord::SessionStore, set | |
# | |
# MyApplication::Application.config.session_store :active_record_store | |
# | |
# in your <tt>config/initializers/session_store.rb</tt> and run <tt>script/rails g session_migration</tt>. | |
# |
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
--- | |
:backtrace: false | |
:benchmark: false | |
:bulk_threshold: 1000 | |
:sources: | |
- http://gems.github.com | |
- http://rubygems.org/ | |
:update_sources: true | |
:verbose: true | |
gem: --no-ri --no-rdoc |
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
a = (1..10).map.reverse #=> [10, 9, 8, 7, 6, 5, 4, 3, 2, 1] | |
Array(a).unshift(11).slice(0, 10) #=> [11, 10, 9, 8, 7, 6, 5, 4, 3, 2] | |
a = Array(a).unshift(11).slice(0, 10) #=> [11, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2] |
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
{ | |
"meta": { | |
"event": "incident.alerted" | |
} | |
"snitch": { | |
"id":1, | |
"name":"Something", | |
"interval":"hourly", | |
"state":"failed", | |
"checked_in_at":"2013-08-25T00:54:20Z", |
I hereby claim:
- I am ersatzryan on github.
- I am ersatzryan (https://keybase.io/ersatzryan) on keybase.
- I have a public key whose fingerprint is DA0E F2E6 EFB3 1302 8F89 5C16 81F5 F2BA 8C33 BFB8
To claim this, I am signing this object:
I hereby claim:
- I am ersatzryan on github.
- I am ersatzryan (https://keybase.io/ersatzryan) on keybase.
- I have a public key ASCC0VUT5inXXvZfch9tP_Gf0gnggy6M5lQkY_roK17lxQo
To claim this, I am signing this object:
OlderNewer