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.1.100 or a browser with console | |
| function newShape(x, y) { | |
| return { | |
| toString: function () { | |
| return 'Shape at ' + x + ', ' + y; | |
| } | |
| }; | |
| } |
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
| echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
| . ~/.bashrc | |
| mkdir ~/local | |
| mkdir ~/node-latest-install | |
| cd ~/node-latest-install | |
| curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
| ./configure --prefix=~/local | |
| make install # ok, fine, this step probably takes more than 30 seconds... | |
| curl https://www.npmjs.org/install.sh | sh |
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
| /* | |
| * Complete reworking of JS from https://gist.github.com/803410 | |
| * Removes external `request` dependency | |
| * Caveats: | |
| * * No error checking | |
| * * Largely a POC. `data` URI is accurate, but this code cannot simply be inserted into an `express` app | |
| */ | |
| var URL = require('url'), | |
| sURL = 'http://nodejs.org/logo.png', | |
| oURL = URL.parse(sURL), |
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
| #!/bin/bash | |
| # https://gist.github.com/949831 | |
| # http://blog.carbonfive.com/2011/05/04/automated-ad-hoc-builds-using-xcode-4/ | |
| # command line OTA distribution references and examples | |
| # http://nachbaur.com/blog/how-to-automate-your-iphone-app-builds-with-hudson | |
| # http://nachbaur.com/blog/building-ios-apps-for-over-the-air-adhoc-distribution | |
| # http://blog.octo.com/en/automating-over-the-air-deployment-for-iphone/ | |
| # http://www.neat.io/posts/2010/10/27/automated-ota-ios-app-distribution.html |
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
| <?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>items</key> | |
| <array> | |
| <dict> | |
| <key>assets</key> | |
| <array> | |
| <dict> |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>My awesome app</title> | |
| </head> | |
| <body> | |
| <h2>beta builds</h2> | |
| <a href="itms-services://?action=download-manifest&url=http://dl.dropbox.com/u/1001/manifest.plist">Awesome App v 0.0.16</a></body> | |
| <h2>alpha builds</h2> |
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
| #get root access | |
| $su - | |
| $ cd /tmp | |
| #Remove old Ruby | |
| $ yum remove ruby | |
| # Install dependencies | |
| $ yum groupinstall "Development Tools" | |
| $ yum install zlib zlib-devel |
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
| josh@onix:/tmp/http-repl$ curl -sSNT. localhost:8000 | |
| Actual repl over http. NOW WITH A LIMITED CONTEXT!! | |
| >> help | |
| 'Exits are North, South and Dennis.' | |
| >> .exit | |
| Terminal exiting. | |
| You'll want to mash ctrl-c. | |
| ^C | |
| josh@onix:/tmp/http-repl$ |
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
| #!/bin/sh | |
| VERSION=0.8.6 | |
| PLATFORM=darwin | |
| ARCH=x64 | |
| PREFIX="$HOME/node-v$VERSION-$PLATFORM-$ARCH" | |
| mkdir -p "$PREFIX" && \ | |
| curl http://nodejs.org/dist/v$VERSION/node-v$VERSION-$PLATFORM-$ARCH.tar.gz \ | |
| | tar xzvf - --strip-components=1 -C "$PREFIX" |
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
| // This is a testcase for a suspected bug in node.js | |
| // server doesn't fire close/end events if the connection was closed in the response before request finished sending data | |
| var http = require('http'), util = require('util'), PORT = 8080; | |
| // sample HTTP server | |
| // responds immediately and closes response | |
| var s = http.createServer(function(req, res) { | |
| req.on('close', function() { return console.error('!!!REQUEST CLOSED'); }); | |
| req.on('end', function() { return console.error('!!!REQUEST ENDED'); }); |
OlderNewer