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
brew doctor | |
Your system is raring to brew. | |
------------------------------------------------------------------------------- | |
brew install -v macvim | |
==> Downloading https://github.com/b4winckler/macvim/tarball/snapshot-64 | |
Already downloaded: /Library/Caches/Homebrew/macvim-7.3-64.tgz | |
/usr/bin/tar xf /Library/Caches/Homebrew/macvim-7.3-64.tgz |
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
> brew install macvim | |
==> Downloading https://github.com/b4winckler/macvim/tarball/snapshot-64 | |
Already downloaded: /Library/Caches/Homebrew/macvim-7.3-64.tgz | |
==> ./configure --with-features=huge --with-tlib=ncurses --enable-multibyte --with-macarchs=x86_64 --enable-perlinterp --enable-pythoninterp --enable-rubyinterp --enable-tclinterp | |
==> cd src/MacVim/icons && make getenvy | |
==> make | |
Starting make in the src directory. | |
If there are problems, cd to the src directory and run make there | |
cd src && make first | |
mkdir objects |
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 'benchmark' | |
require 'securerandom' | |
Benchmark.bm(7) do |x| | |
x.report("UUID") { SecureRandom.uuid } | |
x.report("hex(16)") { SecureRandom.hex(16) } | |
end | |
#Output |
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 "benchmark" | |
val = (1..9).to_a | |
Benchmark.bm(7) do |x| | |
x.report("if:") { | |
val.each { |v| | |
if v == 9 | |
a = 9 | |
elsif v == 8 |
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/bin/env ruby | |
def output_config | |
puts <<-END | |
graph_category App | |
graph_title passenger status | |
graph_vlabel count | |
sessions.label sessions | |
max.label max processes |
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
user www-user; | |
worker_processes 1; | |
error_log logs/error.log; | |
error_log logs/error.log notice; | |
error_log logs/error.log info; | |
pid logs/nginx.pid; |
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 | |
set -e | |
REDMINE_URL="http://rubyforge.org/frs/download.php/75097/redmine-1.2.1.tar.gz" | |
S3_ACCESS_KEY_ID="" | |
S3_SECRET_ACCESS_KEY="" | |
S3_BUCKET_NAME="" | |
HEROKU_APP_NAME="" |
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: redis-server | |
# Required-Start: $syslog $remote_fs | |
# Required-Stop: $syslog $remote_fs | |
# Should-Start: $local_fs | |
# Should-Stop: $local_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: redis-server - Persistent key-value db |
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
# Redis configuration file example | |
# Note on units: when memory size is needed, it is possible to specifiy | |
# it in the usual form of 1k 5GB 4M and so forth: | |
# | |
# 1k => 1000 bytes | |
# 1kb => 1024 bytes | |
# 1m => 1000000 bytes | |
# 1mb => 1024*1024 bytes | |
# 1g => 1000000000 bytes |
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
user deploy; | |
worker_processes 6; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
passenger_root /usr/local/rvm/gems/ree-1.8.7-2011.03/gems/passenger-3.0.7; |