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
var semver = require('semver') | |
function gettest(range) { | |
return function(version) { | |
var isok = semver.satisfies(version, range) ? 'is' : 'is not' | |
console.log('v%s %s supported for range %s', version, isok, range) | |
} | |
} | |
['0.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
var Event = require('events').EventEmitter; | |
function Person(name) { | |
this.name = name | |
} | |
function getname() { | |
return this.name | |
} |
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
/** | |
* Calculates the static handler URL for the resource. | |
* @private | |
* @method _calcResourceURL | |
* @param {object} res the resource for which to calculate the URL | |
* @param {object} mojitRes the resource for the mojit | |
* @return {nothing} | |
*/ | |
_calcResourceURL: function(res, mojitRes) { | |
var fs = res.source.fs, |
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
% cloc --exclude-dir=tests lib/ | |
129 text files. | |
115 unique files. | |
739 files ignored. | |
http://cloc.sourceforge.net v 1.56 T=2.0 s (46.0 files/s, 10662.5 lines/s) | |
------------------------------------------------------------------------------- | |
Language files blank comment code | |
------------------------------------------------------------------------------- | |
Javascript 87 3327 5012 12925 |
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/perl | |
# Copyright (c) William Uther ([email protected]) 2001 | |
# All rights reserved. | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions are met: | |
# | |
# * Redistributions of source code must retain the above copyright notice, | |
# this list of conditions and the following disclaimer. |
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/python | |
# -*- coding: utf-8 -*- | |
# BBErrors: Script to display compiler output messages in BBEdit browser window | |
# Copyright Jay Lieske Jr. | |
# 14 July 2012 | |
import sys, re, os | |
if sys.stdin.isatty(): |
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 node | |
var assert = require('assert'), | |
shell = require('shelljs'), | |
path = require('path'), | |
BASEDIR = path.resolve(__dirname, '../') + '/', | |
NEWSAPP = BASEDIR + 'examples/newsboxes/'; | |
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
var net = require('net') | |
var sock = net.connect(1337) | |
process.stdin.pipe(sock) | |
sock.pipe(process.stdout) | |
sock.on('connect', function () { | |
process.stdin.resume(); | |
process.stdin.setRawMode(true) |
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
/** | |
* Requires node v0.7.7 or greater. | |
* | |
* To connect: $ curl -sSNT. localhost:8000 | |
*/ | |
var http = require('http') | |
, repl = require('repl') | |
, buf0 = new Buffer([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
% mojito create app hybrid hyb | |
creating app type named 'hyb' | |
(using "hybrid" archetype) | |
✔ app: hyb created! | |
✔ mojito done. | |
% ( cd hyb && mojito build hybridapp ../hyb-bld -r -n name -t tag --context build:debug ) | |
warn: (mojito-perf): microtime not found. Recorded times will not have microsecond accuracy | |
debug: (mojito-dispatcher): Dispatcher created | |
warn: (mojito-resource-store): Url collision for /favicon.ico. Choosing: /Users/isao/Repos/mojito/apps/hyb/assets/favicon.ico over /Users/isao/Repos/mojito/myfork/lib/app/assets/favicon.ico |