Skip to content

Instantly share code, notes, and snippets.

@itsderek23
itsderek23 / Dockerfile
Created August 27, 2013 02:09
Example Docker File to start a Rails app located in a local ./docker-rails directory.
# docker build -t="rails" .
FROM ubuntu:12.04
RUN apt-get update
## MYSQL
RUN apt-get install -y -q mysql-client libmysqlclient-dev
## RUBY

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

@moklett
moklett / chargify_api_steps.rb
Created September 9, 2010 20:13
A sample of the step definitions used in the Chargify API documentation (i.e. http://docs.chargify.com/api-subscriptions)
Given /^I (?:send and )?accept (.*?)(?: responses)?$/ do |format|
@format = format.downcase.to_sym
header('Content-Type', content_type_for(@format))
http_accept(@format)
end
Given /^the requester accepts (.*) responses$/ do |format|
Given "I accept #{format} responses"
end
@dahlia
dahlia / lisp.rb
Created September 2, 2010 07:52
30 minutes Lisp in Ruby
# 30 minutes Lisp in Ruby
# Hong Minhee <http://dahlia.kr/>
#
# This Lisp implementation does not provide a s-expression reader.
# Instead, it uses Ruby syntax like following code:
#
# [:def, :factorial,
# [:lambda, [:n],
# [:if, [:"=", :n, 1],
# 1,
@bmarini
bmarini / redis_store.rb
Created July 21, 2010 15:11
ActiveSupport::Cache::RedisStore, a drop in replacement for MemCacheStore
require 'redis'
# This is a direct port of ActiveSupport::Cache::MemCacheStore
# Drop this file in lib/active_support/cache/redis_store and in your env files
# add:
#
# config.cache_store = :redis_store
module ActiveSupport
module Cache