Docker is an open-source project to easily create lightweight, portable, self-sufficient containers. The same container that a developer builds and tests on a laptop can run at scale, in production, on VMs, bare metal, OpenStack clusters, public clouds and more.
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
Photo.all.each do |p| | |
begin | |
p.image.reprocess! | |
rescue Exception => e | |
puts "#{p.image_file_name}: #{e.class} - #{e.message}" | |
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
# /opt/local/etc/mongod.conf | |
# Store data someplace appropriate for a port-installed service, instead of the default: /data/db/ | |
dbpath = /opt/local/var/db/mongodb | |
# Only accept local connections | |
bind_ip = 127.0.0.1 |
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: mongodb | |
# 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: mongodb |
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
# factory_girl: 3.3.0, ruby 1.9.3-p194 | |
FactoryGirl.define do | |
sequence(:item_name) { %w( Milk Tea Coffee Danish Sugar Bagel Donut Toast ).sample(1) } | |
factory :user do |user| | |
name 'Christian' | |
email '[email protected]' |
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/bash | |
# Copyright 2011 Joyent, Inc. All rights reserved. | |
# | |
# Based on http://wiki.joyent.com/download/attachments/1639170/mongodbnode.sh | |
# Updated to configure mongo more similarly to how it's configured on a Mongo SmartMachine. | |
# Tested on v1.3.3 Node.js SmartMachine and MongoDB 2.0.7 | |
if [[ $EUID -ne 0 ]]; then | |
echo "This script must be run as root. Aborting..." 1>&2 |
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
# References: | |
# http://blog.mixu.net/2011/08/13/nginx-websockets-ssl-and-socket-io-deployment/ | |
# http://blog.exceliance.fr/2012/09/10/how-to-get-ssl-with-haproxy-getting-rid-of-stunnel-stud-nginx-or-pound/ | |
# | |
global | |
nbproc 2 | |
maxconn 16384 | |
defaults |
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
ruby-1.9.3-p286 % rvm gemset create delme | |
gemset created delme => /Users/christian/.rvm/gems/ruby-1.9.3-p286@delme | |
ruby-1.9.3-p286 % rvm use @delme | |
Using /Users/christian/.rvm/gems/ruby-1.9.3-p286 with gemset delme | |
ruby-1.9.3-p286@delme % gem install rails | |
Fetching: multi_json-1.3.7.gem (100%) | |
Fetching: activesupport-3.2.9.gem (100%) | |
Fetching: builder-3.0.4.gem (100%) |
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
global | |
nbproc 1 | |
maxconn 65536 | |
defaults | |
timeout connect 5s | |
timeout queue 5s | |
timeout server 30s | |
timeout tunnel 1h |
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
% raygun blogger | |
Creating new app Blogger in directory blogger... | |
Done! Next steps... | |
# Install updated dependencies | |
$ cd blogger | |
$ gem install bundler | |
$ bundle update |
OlderNewer