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
[ -f $HOME/.profile ] && . $HOME/.profile | |
HISTSIZE=2000 | |
SAVEHIST=$HISTSIZE | |
HISTFILE=$HOME/.zsh_history | |
setopt append_history | |
setopt inc_append_history | |
setopt extended_history | |
setopt hist_find_no_dups | |
setopt hist_ignore_all_dups |
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
%% Create N processes in a ring. | |
%% Send a message round the ring M times so that a total of N * M messages get sent. | |
-module(ring). | |
-export([start/0, start/2]). | |
start() -> | |
start(10, 10). | |
start(N, M) -> |
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 Asset < ActiveRecord::Base | |
# === List of columns === | |
# id : integer | |
# data_file_name : string | |
# data_content_type : string | |
# data_file_size : integer | |
# assetable_id : integer | |
# assetable_type : string | |
# type : string |
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: nginx | |
# Required-Start: $all | |
# Required-Stop: $all | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts the nginx web server | |
# Description: starts nginx using start-stop-daemon |
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
server 'server.host.or.ip.address', :app | |
set :user, 'user' | |
set :deploy_to, '/path/to/deploy' | |
set :repository, 'git repository address' | |
set :branch, 'origin/master' | |
namespace :deploy do | |
desc 'Deploy' | |
task :default do |
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 Data.Word | |
freq = 0.3 | |
spread = 8.0 | |
unbase :: Integral int => int -> Word8 -> Word8 -> Word8 -> int | |
unbase base r g b = (fi r*base+fi g)*base+fi b | |
where fi = fromIntegral | |
-- | Approximate a 24-bit Rgb colour with a colour in the xterm256 6x6x6 colour cube, returning its index. |
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' | |
def method1(&block) | |
true if block | |
end | |
def method2(&block) | |
true if block_given? | |
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
An exception occurred running script/rails | |
empty range in char class: [\u{80}-\u{D7FF}\u{E000}-\u{FFFD}\u{10000}-\u{10FFFF}] (RegexpError) | |
Backtrace: | |
Regexp#initialize at kernel/common/regexp.rb:95 | |
Class#new at kernel/alpha.rb:94 | |
Sass::SCSS::RX.__module_init__ (RX) at /Users/lest/.rvm/gems/rbx-head/gems | |
/sass-3.1.10/lib/sass/scss/rx.rb:57 | |
Sass::SCSS.__module_init__ (SCSS) at /Users/lest/.rvm/gems/rbx-head/gems | |
/sass-3.1.10/lib/sass/scss/rx.rb:7 |
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
~/code/test_rails_app % RBXOPT=-X19 ~/code/rubinius/bin/rbx script/rails s 23:12 | |
/Users/lest/code/rubinius/lib/rubygems/custom_require.rb:29:in `require': | |
It seems your ruby installation is missing psych (for YAML output). | |
To eliminate this warning, please install libyaml and reinstall your ruby. | |
=> Booting WEBrick | |
=> Rails 3.2.0.beta application starting in development on http://0.0.0.0:3000 | |
=> Call with -d to detach | |
=> Ctrl-C to shutdown server | |
Rails Error: Unable to access log file. Please ensure that /Users/lest/code/test_rails_app/log/development.log exists and is chmod 0666. The log level has been raised to WARN and the output directed to STDERR until the problem is fixed. | |
[2011-12-02 23:17:08] INFO WEBrick 1.3.1 |
OlderNewer