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 update zsh | |
Initialized empty Git repository in /usr/local/.git/ | |
remote: Counting objects: 26235, done. | |
remote: Compressing objects: 100% (12478/12478), done. | |
remote: Total 26235 (delta 13444), reused 25930 (delta 13229) | |
Receiving objects: 100% (26235/26235), 3.87 MiB | 98 KiB/s, done. | |
Resolving deltas: 100% (13444/13444), done. | |
From http://github.com/mxcl/homebrew | |
* branch master -> FETCH_HEAD |
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
~% rm -rf /usr/local/.git | |
~% cd /usr/local | |
/usr/local% git init | |
Initialized empty Git repository in /usr/local/.git/ | |
/usr/local[master]% git remote add origin git://github.com/mxcl/homebrew.git | |
/usr/local[master]% git checkout -b master2 origin/master | |
fatal: git checkout: updating paths is incompatible with switching branches. | |
Did you intend to checkout 'origin/master' which can not be resolved as commit? | |
/usr/local[master]% git branch -D master | |
error: Cannot delete the branch 'master' which you are currently on. |
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
>> m = TestMailer.welcome | |
=> #<Mail::Message:2171333440, Multipart: false, Headers: <From: [email protected]>, <To: [email protected]>, <Subject: Welcome>, <Mime-Version: 1.0>, <Content-Type: text/plain>> | |
>> m.to = ["test.&[email protected]"] | |
=> ["test.&[email protected]"] | |
>> m.deliver | |
=> #<Mail::Message:2171333440, Multipart: false, Headers: <Date: Sat, 22 Jan 2011 01:05:44 +0700>, <From: [email protected]>, <To: ["test.&[email protected]"]>, <Message-ID: <4d39caf88d8a5_1e3080443b3c48414@[FILTERED]>>, <Subject: Welcome>, <Mime-Version: 1.0>, <Content-Type: text/plain>, <Content-Transfer-Encoding: 7bit>> |
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
test_available?(AnswerParserWhoisCrsnicNetTest): | |
RuntimeError: Unexpected token: ` DNS Admin | |
Google Inc. | |
1600 Amphitheatre Parkway | |
Mountain View CA 94043 | |
US | |
[email protected] +1.6506234000 Fax: +1.6506188571 | |
Domain Name: google.net |
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 Array.toy(n=10,&block) | |
if block_given? | |
new(n, &block) | |
else | |
new(n) {|i| i+1} | |
end | |
end | |
def Hash.toy(n=10) | |
Hash[Array.toy(n).zip(Array.toy(n){|c| (96+(c+1)).chr})] |
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
==> Downloading http://www.libsdl.org/release/SDL-1.2.14.tar.gz | |
File already downloaded in /Users/sema/Library/Caches/Homebrew | |
/usr/bin/tar xf /Users/sema/Library/Caches/Homebrew/sdl-1.2.14.tar.gz | |
==> ./configure --prefix=/usr/local/Cellar/sdl/1.2.14 --disable-nasm | |
./configure --prefix=/usr/local/Cellar/sdl/1.2.14 --disable-nasm | |
checking for gcc... /usr/bin/llvm-gcc | |
checking for C compiler default output file name... a.out | |
checking whether the C compiler works... yes | |
checking whether we are cross compiling... no | |
checking for suffix of executables... |
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
Example::Application.routes.draw do | |
def trashable | |
post :trash, :restore, on: :member | |
end | |
resources :products do | |
trashable | |
end | |
resources :comments 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
BCX::Application.routes.draw do | |
def commentable | |
resources :comments | |
end | |
def trashable | |
post :trash, :restore, on: :member | |
end | |
def image_attachable |
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
p ["foo", "bar"].map(&:upcase) # nice | |
p ["foo", "bar"].map{ |s| s.sub(/[a-z]/, '') } # ugh | |
class Underscore < BasicObject | |
def method_missing(name, *args) | |
::Kernel.lambda{ |a| a.public_send(name, *args) } | |
end | |
end | |
UNDERSCORE = Underscore.new |
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
_____________________________________________________________________________ | |
| GemStone/S64 Object-Oriented Data Management System | | |
| Copyright (C) VMware, Inc. 1986-2011 | | |
| All rights reserved. | | |
+-----------------------------------------------------------------------------+ | |
| PROGRAM: STONE, Stone Repository Monitor | | |
| VERSION: 3.1.0, Thu Oct 27 16:21:45 2011 | | |
| BUILD: gss64_maglev_branch-27184 | | |
| BUILT FOR: Darwin (Mac) | | |
| MODE: 64 bit | |
OlderNewer