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
# paste script into IRB shell | |
# cherry-pick gems to update | |
gems = %w( | |
newrelic_rpm | |
travis | |
some_other_gem | |
) | |
gems.each do |gem| | |
puts "updating #{gem}" | |
system "bundle update #{gem}" |
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 'redis' | |
module Features | |
class << self | |
extend Forwardable | |
def_delegators :rollout, :active?, :activate_user, :deactivate_user, :activate, :deactivate | |
private | |
def rollout | |
@rollout ||= begin |
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
CmdUtils.CreateCommand({ | |
name: "delicious", | |
homepage: "http://ryan.codecrate.com/", | |
author: { name: "Ryan Sonnek", email: "ryan@codecrate.com"}, | |
contributors: ["Ryan Sonnek"], | |
license: "MIT", | |
description: "Tags the current site using delicious", | |
icon: "http://delicious.com/favicon.ico", | |
help: "Save the current url to delicious with the tags input by the user. Any selected text on the page will be recorded as the note.", |
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
sudo yum install libpng -y | |
sudo yum install libpng-devel -y | |
cd /usr/local/src | |
wget ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick.tar.gz | |
tar xvfz ImageMagick.tar.gz | |
cd ImageMagick-6.4.5 | |
./configure | |
make | |
sudo make install |
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 | |
### BEGIN INIT INFO | |
# Provides: skeleton | |
# Required-Start: $local_fs $remote_fs | |
# Required-Stop: $local_fs $remote_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: S 0 1 6 | |
# Short-Description: Example initscript | |
# Description: This file should be used to construct scripts to be | |
# placed in /etc/init.d. |
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
url = 'http://friendfeed.com/public' | |
html = HTTParty.get url | |
doc = Hpricot(html) | |
doc.search('div').count | |
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
CmdUtils.CreateCommand({ | |
name: "zillow", | |
icon: "http://www.zillow.com/favicon.ico", | |
homepage: "http://ryan.codecrate.com", | |
author: { name: "Ryan Sonnek", email: "ryan@codecrate.com"}, | |
license: "MIT", | |
description: "Search for property value on zillow.com", | |
help: "select an address and invoke this command", | |
takes: {"address": noun_arb_text}, |
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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName:'Ember Twiddle' | |
}); |
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 'cramp/controller' | |
class WelcomeAction < Cramp::Controller::Action | |
periodic_timer :send_updates, :every => 3 | |
def start | |
@counter = 0 | |
render ["<html><body><h1 id='placeholder'>Content goes here</h1>", "\n"] | |
render ["<div>testing</div>" * 200, "\n"] |
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 BlogTest < Test::Unit::TestCase | |
register_fixture :a_basic_user do | |
User.new | |
end | |
register_fixture :a_basic_blog do | |
Blog.new | |
end | |
with :a_basic_user, :a_basic_blog do | |
setup 'executing @a_basic_user.do_something' do |
OlderNewer