Skip to content

Instantly share code, notes, and snippets.

View qrush's full-sized avatar
🕸️
Making internets

Nick Quaranto qrush

🕸️
Making internets
View GitHub Profile
@qrush
qrush / hubcut
Created October 28, 2009 22:10 — forked from pivotal-legacy/hubcut
#!/usr/bin/env ruby
# This script copies all .gem files for all versions of a gem from gems.github.com to gemcutter.org.
# For all versions of a gem, it does a gem fetch, repackages the gem with the non-namespaced name,
# and does a gem push. You must have permission to push the gem, so your gemcutter key must be
# set in ~/.gemrc
require 'rubygems'
require 'yaml'
require 'fileutils'
## monit.d/memcached.monitrc
check process memcached
group memcached
with pidfile /var/run/memcached/memcached.pid
start program = "/etc/init.d/memcached start"
stop program = "/etc/init.d/memcached stop"
if failed port 11211 4 times within 5 cycles then restart
if 4 restarts within 5 cycles then timeout
depends on memcached_bin
From ff49afda3beb5bb20dd43f05e301bee7b3c57a06 Mon Sep 17 00:00:00 2001
From: John Trupiano <jtrupiano@gmail.com>
Date: Sat, 16 Jan 2010 15:17:10 -0500
Subject: [PATCH 3/3] Don't allow database access in rails3
* Override Stub#class to return a dup'd class instance that mocks #active_relation
---
lib/factory_girl/proxy/stub.rb | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
fib = [1, 2]
while fib.last < 4_000_000
fib << fib[-1] + fib[-2]
end
fib.each do |f|
puts f if f % 2 == 0
end
# Hey coops..
#
# Imagine yourself on the other side of the table: two job openings, hundreds of resumes,
# _all of which_ look friggin' identical. Yeah, the HR departments at your MegaCorp XYZ are using
# automated tools to scan for keywords, and the coop department at your school is trying to beat
# you into submission to follow some "predefined template".. But, unless what you're aspiring to
# is to be an automaton at MegaCorp XYZ, relegated to writing test harnesses for code that will
# never see the light of day.. please do yourself a favor, and _be different_! Be bold, dammit.
#
# (Frankly, I'm falling asleep while reading your resumes.. Wake me up! Srsly.)
#! /bin/sh
### BEGIN INIT INFO
# Provides: redis-server
# Required-Start: $syslog
# Required-Stop: $syslog
# Should-Start: $local_fs
# Should-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: redis-server - Persistent key-value db
#!/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
#! /bin/sh
### BEGIN INIT INFO
# Provides: redis-server
# Required-Start: $syslog
# Required-Stop: $syslog
# Should-Start: $local_fs
# Should-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: redis-server - Persistent key-value db
@qrush
qrush / a-screenshot.md
Created February 10, 2011 16:17 — forked from tmm1/README.md
apply in: /Applications/Propane.app/Contents/Resources

@qrush
qrush / gist:1004684
Created June 2, 2011 15:56 — forked from anonymous/gist:1004681
git diff v1.3.7..v1.8.5 lib/rubygems/source_index.rb
diff --git a/lib/rubygems/source_index.rb b/lib/rubygems/source_index.rb
index f9b8ea0..0cc7762 100644
--- a/lib/rubygems/source_index.rb
+++ b/lib/rubygems/source_index.rb
@@ -4,14 +4,8 @@
# See LICENSE.txt for permissions.
#++
-require 'rubygems/user_interaction'
require 'rubygems/specification'