- Bundler - Bundler maintains a consistent environment for ruby applications. It tracks an application's code and the rubygems it needs to run, so that an application will always have the exact gems (and versions) that it needs to run.
- rabl - General ruby templating with json, bson, xml, plist and msgpack support
- Thin - Very fast and lightweight Ruby web server
- Unicorn - Unicorn is an HTTP server for Rack applications designed to only serve fast clients on low-latency, high-bandwidth connections and take advantage of features in Unix/Unix-like kernels.
- SimpleCov - SimpleCov is a code coverage analysis tool for Ruby 1.9.
- Zeus - Zeus preloads your Rails app so that your normal development tasks such as console, server, generate, and specs/tests take less than one second.
- [factory_girl](h
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
defmodule FizzBuzz do | |
def upto(n) when n > 0, do: 1..n |> Enum.map(&fizzbuzz/1) | |
defp fizzbuzz(n) when rem(n,3) == 0 and rem(n,5) == 0, do: "FizzBuzz" | |
defp fizzbuzz(n) when rem(n,3) == 0, do: "Fizz" | |
defp fizzbuzz(n) when rem(n,5) == 0, do: "Buzz" | |
defp fizzbuzz(n), do: n | |
end | |
FizzBuzz.upto(100) |> Enum.join(" ") |> IO.puts |
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
def symlink_tasks | |
super.map do |task| | |
if task.first == 'Symlink other shared config files' | |
[task[0], task[1].sub(/-type/, '-maxdepth 1 -type')] | |
else | |
task | |
end | |
end | |
end |
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
SELECT CONCAT(table_schema, '.', table_name), | |
CONCAT(ROUND(table_rows / 1000000, 2), 'M') rows, | |
CONCAT(ROUND(data_length / ( 1024 * 1024 * 1024 ), 2), 'G') DATA, | |
CONCAT(ROUND(index_length / ( 1024 * 1024 * 1024 ), 2), 'G') idx, | |
CONCAT(ROUND(( data_length + index_length ) / ( 1024 * 1024 * 1024 ), 2), 'G') total_size, | |
ROUND(index_length / data_length, 2) idxfrac | |
FROM information_schema.TABLES | |
ORDER BY data_length + index_length DESC | |
LIMIT 20 |
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
# | |
# Block particular IP addresses from our API | |
# | |
location ~ ^/api/ { | |
# A Kayak IP address we saw running through each of our cities | |
deny 209.104.235.1; | |
#deny 207.86.76.138; | |
} |
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
/usr/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:539:in `normalize_yaml_input': invalid byte sequence in US-ASCII (ArgumentError) | |
from /usr/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:479:in `from_yaml' | |
from /usr/lib/ruby/site_ruby/1.9.1/rubygems/package/tar_input.rb:190:in `load_gemspec' | |
from /usr/lib/ruby/site_ruby/1.9.1/rubygems/package/tar_input.rb:54:in `block in initialize' | |
from /usr/lib/ruby/site_ruby/1.9.1/rubygems/package/tar_reader.rb:64:in `block in each' | |
from /usr/lib/ruby/site_ruby/1.9.1/rubygems/package/tar_reader.rb:55:in `loop' | |
from /usr/lib/ruby/site_ruby/1.9.1/rubygems/package/tar_reader.rb:55:in `each' | |
from /usr/lib/ruby/site_ruby/1.9.1/rubygems/package/tar_input.rb:35:in `initialize' | |
from /usr/lib/ruby/site_ruby/1.9.1/rubygems/package/tar_input.rb:20:in `new' | |
from /usr/lib/ruby/site_ruby/1.9.1/rubygems/package/tar_input.rb:20:in `open' |
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
# | |
# Cookbook Name:: nodejs | |
# Recipe:: default | |
# | |
# Build and install node.js | |
# | |
if ['app','app_master','solo'].include?(node[:instance_role]) | |
version_tag = "v0.4.8" | |
source_base_dir = "/data/nodejs" |
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
[chris@dealbase hotelstonight (html5 *)]$ bundle update ffi | |
Updating git://github.com/ffi/ffi.git | |
Fetching source index for http://rubygems.org/ | |
Could not find gem 'ffi (>= 0, runtime)' in git://github.com/ffi/ffi.git (at 2a2c034). | |
Source does not contain any versions of 'ffi (>= 0, runtime)' |
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
[Sun, 17 Apr 2011 21:40:19 -0700] INFO: Starting Chef Solo Run | |
/etc/chef-custom/recipes/cookbooks/mongodb/attributes/recipe.rb:8:in `from_file': undefined method `[]' for nil:NilClass (NoMethodError) | |
from /usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/chef-0.6.0.2/lib/chef/cookbook.rb:73:in `load_attributes' | |
from /usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/chef-0.6.0.2/lib/chef/cookbook.rb:71:in `each' | |
from /usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/chef-0.6.0.2/lib/chef/cookbook.rb:71:in `load_attributes' | |
from /usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/chef-0.6.0.2/lib/chef/compile.rb:61:in `load_attributes' | |
from /usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/chef-0.6.0.2/lib/chef/cookbook_loader.rb:107:in `each' | |
from /usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/chef-0.6.0.2/lib/chef/cookbook_loader.rb:106:in `each_value' | |
from /usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/chef-0.6.0.2/lib/chef/cookbook_loader.rb:106:in `each' | |
from /usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/c |