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
npm ! WARNING ! | |
npm ! WARNING ! Symlinking the lib directory is deprecated | |
npm ! WARNING ! Please don't rely on this feature, as it will be removed. | |
npm ! WARNING ! Use the 'main' module instead. | |
npm ! WARNING ! | |
npm install failed Error: Libs dir not found /usr/local/lib/node/.npm/sequelize/0.2.4/package/sequelize | |
at /usr/local/lib/node/.npm/npm/0.1.25/package/lib/build.js:267:23 | |
at node.js:762:9 |
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
{ | |
"name": "sequelize", | |
"description": "MySQL ORM for Node.JS", | |
"version": "0.2.4", | |
"author": "Sascha Depold <[email protected]>", | |
"contributors": [ | |
{ "name": "Sascha Depold", "email": "[email protected]" } | |
], | |
"dependencies": {}, | |
"keywords": ["mysql", "orm", "nodejs", "object relational mapper"], |
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
>> h = Hash.new { |h, k| h[k] = Hash.new(&h.default_proc) } | |
=> {} | |
>> h[1][2] = 3 | |
=> 3 | |
>> h[1][2][4] | |
=> 0 | |
>> # wtf? |
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 IO-like clone system for javascript. thoughts? | |
Object.prototype.clone = function() { | |
return Object.create(this); | |
} | |
Object.prototype.merge = function(obj) { | |
var | |
keys = Object.keys(obj), | |
self = this |
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
# ~/.bashrc | |
trap on_exit EXIT | |
on_exit() { | |
mail -s "Bash: logging out at $(date)" [email protected] < ( | |
echo "Commands run:" | |
history | |
) | |
} |
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
# Assuming this directory structure: | |
# | |
# MyModule/ | |
# init.io # => Object clone do( foo := "bar" ) | |
# slot1.io # => "LOL" | |
# slot2.io # => method("running slot2" println; self) | |
# slot3/ | |
# subslot1.io # => "this is subslot1" | |
import("/path/to/MyModule") |
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
Ion spec( | |
# this stanza is for administrative metadata | |
metadata( | |
author("A Cool Developer") | |
email("[email protected]") | |
homepage("http://www.example.com/") | |
summary("This is a really cool library!") | |
description(""" | |
Really, I swear it is. | |
""") |
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
Maybe = require './Maybe' | |
Maybe(1) # => Maybe(1) | |
Maybe({a: 1})('a') # => Maybe(1) | |
Maybe({a: 1})('a').value # => 1 | |
Maybe({a: 1})('b') # => Nothing | |
Maybe({a: 1})('b')('c')('d')('e') # => Nothing |
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
Object.prototype.send = function(fn) { return fn.call(this, this); }; | |
Object.prototype.tap = function(fn) { this.send(fn); return this; }; |
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 negative(a) | |
-a | |
end | |
# whee! | |
[1,2,3].sort_by &method(:negative) # => [3,2,1] |
OlderNewer