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
. | |
|-css | |
|-img | |
|-js | |
|-lib | |
|---markdown-js | |
|-----lib | |
|-----test | |
|-------features | |
|---------blockquotes |
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 sys = require('sys'), | |
spawn = require('child_process').spawn, | |
ls = spawn('ls', ['-lh', '/usr']); | |
ls.stdout.addListener('data', function (data) { | |
sys.print('stdout: ' + data); | |
}); | |
ls.stderr.addListener('data', function (data) { | |
sys.print('stderr: ' + data); |
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 sys = require('sys'), | |
dom = require(__dirname + '/../../lib/level1/core').dom.level1.core, | |
fs = require('fs'), | |
http = require('http'); | |
var window = global.window = require(__dirname + '/../../lib/browser').windowAugmentation(dom); | |
var document = global.document = global.window.document; | |
var location = global.location = global.window.location; | |
var navigator = global.navigator = { | |
userAgent: 'node-js' |
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
$('.hasHint').live('focus', function (event) | |
{ | |
if (!$(this).data('origin-text')) | |
{ | |
$(this).data('origin-text', $(this).val()); | |
} | |
if ($(this).data('origin-text') == $(this).val()); | |
{ | |
$(this).val(''); |
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
// package.js sprint help | |
// Example output (for a single entry): | |
/* | |
{ | |
"name":"Wrench-JS" | |
,"description":"Useful Node.js operations (recursive directory operations, etc)" | |
,"url":"http://github.com/ryanmcgrath/wrench-js/" | |
,"issues":"http://github.com/ryanmcgrath/wrench-js/issues/" | |
,"mail":"ryan@venodesigns.net" | |
,"handle":"ryanmcgrath" |
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 sys = require('sys'), | |
fs = require('fs'); | |
var libxml = require('libxmljs'); | |
fs.readFile('products.xml', function (err, data) { | |
var parser = new libxml.SaxParser(function(cb) | |
{ | |
cb.onStartDocument(function() | |
{ |
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
import urllib2 | |
import sys | |
from BeautifulSoup import BeautifulSoup | |
print sys.argv[1] | |
page = urllib2.urlopen(sys.argv[1]) | |
print page | |
soup = BeautifulSoup(page) | |
print soup.prettify() |
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
curl --silent -L "http://www.systembolaget.se/SokDrycker/Produkt?VaruNr=121303" | tidy -indent -quiet --output-xml yes | |
outputs source | |
curl --silent -L "http://www.systembolaget.se/SokDrycker/VarFinnsVaranExternt.htm?ArtikelNr=121303" | tidy -indent -quiet --output-xml yes | |
outputs (sample): | |
line 211 column 40388 - Warning: <tr> proprietary attribute "height" | |
line 211 column 40712 - Warning: <tr> proprietary attribute "height" |
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 sys = require('sys'); | |
var OAuth = require('oauth').OAuth; | |
var oauthToken = 'IcanHazToken'; | |
var oauthSecret = 'ScoobyDoo'; | |
var oa = new OAuth('http://twitter.com/oauth/request_token', 'http://twitter.com/oauth/access_token', '************', '******************', '1.0', 'HMAC-SHA1'); | |
var url = 'http://api.twitter.com/1/users/show.json?screen_name=mape'; | |
oa.getProtectedResource(url, 'GET', oauthToken, oauthSecret, function (error, data) |
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
// http://mape.me:8081/static/js/test.js | |
// http://mape.me:8081/static/css/test.css | |
var sys = require('sys'); | |
var Connect = require('Connect/lib/connect'); | |
var AssetsManager = require('./assetsManager'); | |
new Connect.Server([ | |
,{filter: 'log'} | |
,{filter: 'gzip'} |
OlderNewer