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
$ npm install -g dev | |
> [email protected] install /home/Wizek/local/node-0.4.7/lib/node_modules/dev/node_modules/inotify | |
> node-waf configure build | |
Checking for program g++ or c++ : /usr/bin/g++ | |
Checking for program cpp : /usr/bin/cpp | |
Checking for program ar : /usr/bin/ar | |
Checking for program ranlib : /usr/bin/ranlib | |
Checking for g++ : ok |
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
Object.defineProperty(Object.prototype, '_proto', | |
{ enumerable: false | |
, writable: true | |
, value: function(name, fn) { | |
Object.defineProperty( this.prototype, name, | |
{ enumerable: false | |
, writable: true | |
, value: fn } ) | |
} | |
} |
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
[core] | |
symlinks = false | |
autocrlf = true | |
[pack] | |
packSizeLimit = 2g | |
[help] | |
format = html | |
[http] | |
sslCAinfo = /bin/curl-ca-bundle.crt |
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
// Add lib, models and node_modules to path | |
var path = require('path') | |
require.paths.unshift( | |
path.join(__dirname, '/../lib') | |
, path.join(__dirname, '/../lib/models') | |
, path.join(__dirname, '/../node_modules') | |
) | |
var hlpr = require('helpers') | |
, db = require('db') |
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
console.log('main.js loaded') | |
var requisits = [ | |
'/scripts/jquery-1.5-mod.js' | |
, '/scripts/underscore-min.js' | |
, '/scripts/order.js' | |
, '/scripts/text.js' | |
, 'qunit.js' | |
] |
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
function inherits(ctor, base) { | |
ctor.prototype = Object.create(base); | |
ctor.prototype.constructor = ctor | |
return ctor | |
} | |
function extend(tgt) { var sources | |
sources = Array.prototype.slice.call(arguments, 1) | |
sources.forEach(function(source){ | |
Object.keys(source).forEach(function(key){ | |
tgt[key] = source[key] })}) |
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
/*\ | |
* Sometimes I'm amused by how versatile and expressive JavaScript | |
* can be when it comes to even the smallest of details at its core; | |
* like declaring inheritance patterns. | |
* [Or global variable declaration.](http://goo.gl/iqk1J) | |
* | |
* We are here to talk about the former, because other times it's a | |
* baffling experience to choose the right way. | |
* | |
* I've listed 5 ways of performing roughly the same task below. |
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
test("new Entry()", function() { | |
expect(8) | |
var obj = { | |
"id": 1 | |
, "position": 0 | |
, "headline": "headline " + Math.random() | |
, "body": "body " + Math.random() | |
} | |
, html = '<li>' | |
+ '\r\n <span class="headline">'+obj.headline+'</span>' |
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
Code is protected by copyright? | |
Code can be used in closed source projects? | |
Program that uses (incorporates) the software can be sold commercially? | |
Source to bug fixes and modifications must be released? | |
Provides explicit patent license? |
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 progress(str): | |
print('Info: '+str) | |
progress('Initializing...') | |
import csv | |
import re | |
import operator | |
# Global constants |