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
[Erln8] | |
color=true | |
banner=false | |
default_config=default | |
system_default=R17RC2-dirty | |
[Repos] | |
default=https://github.com/erlang/otp.git | |
[Erlangs] |
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
Everyone who has used Ruby for a little while will quickly become familiar with its custom control structures. They are easy to use and very quick to build. Here is an example implementation of Enumerable#inject: | |
def inject(initial) | |
memo = initial # note that this line is only here for clarity. It could be shorter. | |
each {|x| memo = yield(memo,x)} | |
memo | |
end | |
Now that was easy! It is easy to use and works cleanly: |
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
[Erln8] | |
color=true | |
banner=false | |
default_config=default | |
system_default=OTP-17.0-dirty | |
[Repos] | |
default=https://github.com/erlang/otp.git | |
[Erlangs] |
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 escript | |
-mode(compile). | |
-export([main/1]). | |
main(_) -> | |
Mode = subtree_mode(), | |
Repos = read_repos(), | |
ok = filelib:ensure_dir(apps_path()), |
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
{ | |
"@context": { | |
"foo": { | |
"@id": "http://example.com/foo", | |
"@container": "@set" | |
} | |
}, | |
"foo": [ | |
{ | |
"@context": {"foo": "http://example.com/other"}, |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>author</key> | |
<string>Brian Mitchell</string> | |
<key>name</key> | |
<string>Monochromatic</string> | |
<key>settings</key> | |
<array> |
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
{ | |
"auto_complete": false, | |
"bold_folder_labels": true, | |
"caret_style": "phase", | |
"color_scheme": "Packages/User/SublimeLinter/monochromatic (SL).tmTheme", | |
"draw_centered": false, | |
"ensure_newline_at_eof_on_save": true, | |
"file_exclude_patterns": | |
[ | |
"*.pyc", |
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
-module(bench). | |
-compile(export_all). | |
init(_) -> | |
{ok, null}. | |
handle_call(ping, _, St) -> | |
{reply, pong, St}. | |
start() -> |
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
zero:Scratch brian$ ruby --version # Should be similar on all versions of MRI | |
ruby 1.9.3dev (2010-06-30 trunk 28489) [x86_64-darwin10.4.0] | |
zero:Scratch brian$ ruby secure_cmp.rb | |
Rehearsal ------------------------------------------ | |
binary 4.020000 0.000000 4.020000 ( 4.012945) | |
hash 2.180000 0.000000 2.180000 ( 2.187391) | |
--------------------------------- total: 6.200000sec | |
user system total real | |
binary 4.010000 0.010000 4.020000 ( 4.003827) |
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
var vows = require('vows'); | |
vows.describe('Deep Thought', { | |
topic: function () { | |
this.thought = new DeepThought; // prototypical scopes | |
}, | |
'thought is logical': [ | |
'define axioms' : { | |
topic: function () {...}, | |
'assert something': function () {...} |
OlderNewer