This file contains hidden or 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 _system(*args) | |
system('echo', *args) | |
system(*args) | |
end | |
class CreateDependenciesFilter < Nanoc3::Filter | |
identifier :create_dependencies | |
type :binary |
This file contains hidden or 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 | |
preprocess do | |
items << Nanoc3::Item.new( | |
'', | |
{}, | |
'/exe/', | |
:binary => true) | |
end |
This file contains hidden or 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
array = [ 1, 2, 3 ] | |
array.hash | |
# => -239251530248082591 | |
dict = {} | |
dict[array] = 123 | |
array << 4 | |
array.hash | |
# => -3202532316789943903 | |
dict[array] | |
# => nil |
This file contains hidden or 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 modify(&block) | |
puts block.arity | |
end | |
modify {} | |
# 1.8.7: | |
# -1 | |
# 1.9.2: | |
# 0 |
This file contains hidden or 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" = { | |
"^m" = { | |
"?" = { | |
"!" = ("insertText:", "\U203D"); /* ‽ */ | |
}; | |
"o" = { | |
"/" = { | |
"\\~" = ("insertText:", "\U266A"); /* ♪ */ |
This file contains hidden or 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
export LESS_TERMCAP_mb=$'\E[01;31m' | |
export LESS_TERMCAP_md=$'\E[01;31m' | |
export LESS_TERMCAP_me=$'\E[0m' | |
export LESS_TERMCAP_se=$'\E[0m' | |
export LESS_TERMCAP_so=$'\E[01;44;33m' | |
export LESS_TERMCAP_ue=$'\E[0m' | |
export LESS_TERMCAP_us=$'\E[01;32m' |
This file contains hidden or 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 ToTextFilter < ::Nanoc3::Filter | |
identifier :to_text | |
type :binary => :text | |
def run(filename, params={}) | |
File.read(filename) | |
end | |
end | |
class ToBinaryFilter < ::Nanoc3::Filter | |
identifier :to_binary |
This file contains hidden or 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
# encoding: utf-8 | |
Encoding.default_internal = Encoding::UTF_8 | |
require 'pstore' | |
store = PStore.new('blah') | |
store.transaction do | |
store[:foo] = '…' | |
end |
This file contains hidden or 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
ectype ✗ ~ ▸ uptime | |
19:25:49 up 611 days, 7:41, 1 user, load average: 0.11, 0.30, 0.29 | |
ectype ✓ ~ ▸ | |
Broadcast message from root@ectype (Tue Aug 16 19:26:08 2011): | |
The system is going down for system halt NOW! | |
Connection to ectype closed by remote host. | |
Connection to ectype closed. |
This file contains hidden or 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
100 | |
"method" | |
nil | |
"local-variable" |