Skip to content

Instantly share code, notes, and snippets.

View dstrelau's full-sized avatar

Dean Strelau dstrelau

View GitHub Profile
require 'minitest/spec'
module MiniTest
module Rails
class Spec < MiniTest::Spec
alias :method_name :__name__
alias :pending :skip
class << self
def xit(desc='anonymous')
it(name) { skip 'DISABLED' }
# <tech> is roflscale
responses = [
"Have you thought about trying %?"
"The only way to scale is %."
"Why not just use %?"
"What about using %?"
"I heard % can handle that just fine."
]
if ['app_master', 'app'].include?(node[:instance_role])
node[:applications].each do |app, data|
template "/data/#{app}/shared/config/redis.yml"do
source 'redis.yml.erb'
owner node[:owner_name]
group node[:owner_name]
mode 0655
backup 0
variables({
:environment => node[:environment][:framework_env],
@dstrelau
dstrelau / Gemfile
Created February 9, 2012 01:25
JSLint via ExecJS in Rails
group :development do
gem 'execjslint', require: false
end
@dstrelau
dstrelau / rbx-2.0.0
Created February 15, 2012 01:13
Gemfile
source :rubygems
gem 'rails', '3.1.3' # depends on rack 1.3.x
gem 'rack', '1.4.1'
require File.expand_path('../config/application', __FILE__)
require 'rake'
My::Application.load_tasks
namespace :test do
Rake::TestTask.new(:combined) do |t|
t.libs << 'test'
t.pattern = "test/**/*_test.rb"
end
@dstrelau
dstrelau / Makefile
Created November 9, 2012 03:42
DIY redis-server deb packages via fpm
NAME=redis
PACKAGE_NAME=$(NAME)-server
VERSION=2.6.4
DOWNLOAD=http://redis.googlecode.com/files/redis-$(VERSION).tar.gz
TARBALL=$(NAME)-$(VERSION).tar.gz
TARDIR=$(NAME)-$(VERSION)
BUILD=$(PWD)/build
.PHONY: default
@dstrelau
dstrelau / Makefile
Last active December 21, 2015 14:49
collectd deb via fpm
NAME=collectd
VERSION=5.4.0
IDENTIFIER=tc1
TAR=collectd-$(VERSION).tar.gz
DIR=collectd-$(VERSION)
FAKEROOT=$(PWD)/fakeroot
all: clean dependencies build install package
clean:
#!/bin/bash -ex
which curl || sudo apt-get install -y curl
which ruby || sudo apt-get install -y ruby1.9.1
which mkmf || sudo apt-get install -y ruby1.9.1-dev
which fpm || sudo gem install fpm
export GOROOT=$PWD/go
export PATH=$PATH:$GOROOT/bin
[ -d go ] || curl https://go.googlecode.com/files/go1.1.2.linux-amd64.tar.gz | tar xz
if [ ! -d lumberjack ] ; then
require 'formula'
class Rbenv < Formula
homepage 'https://github.com/sstephenson/rbenv'
url 'https://github.com/sstephenson/rbenv/archive/v0.4.0.tar.gz'
sha1 '825ceec55805b8bb80a6d6003fd3cef824d7ff14'
head 'https://github.com/sstephenson/rbenv.git'
def install