Couldn't find the text of this for a while...
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
| /* | |
| * Helper functions for treating node Buffer instances as C "pointers". | |
| */ | |
| #include "v8.h" | |
| #include "node_buffer.h" | |
| /* | |
| * Called when the "pointer" is garbage collected. |
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
| // manage a webapp. | |
| // place <link rel="app-manifest" href="path-to-manifest.webapp"> in your <head> | |
| // mozApp.install() attempts installation | |
| // mozApp.uninstall() removes | |
| // mozApp.isRunning() indicates whether the app is currently installed and open | |
| var mozApp = (function() { | |
| var manLink = document.querySelector('link[rel="app-manifest"]'), | |
| manifestURL = manLink.href; | |
| var self = false; |
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
| app.use(express.methodOverride()); | |
| // ## CORS middleware | |
| // | |
| // see: http://stackoverflow.com/questions/7067966/how-to-allow-cors-in-express-nodejs | |
| var allowCrossDomain = function(req, res, next) { | |
| res.header('Access-Control-Allow-Origin', '*'); | |
| res.header('Access-Control-Allow-Methods', 'GET,PUT,POST,DELETE'); | |
| res.header('Access-Control-Allow-Headers', 'Content-Type, Authorization'); | |
There are a number of additional dependencies required for getting things installed on OS X. Starting with a blank slate OS X machine, this is the process it takes:
# Install Xcode Command Line Tools
# Install Homebrew
ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go)"
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
| #include <stdio.h> | |
| #include <string.h> | |
| #include <stdlib.h> | |
| // initialize the tape with 30,000 zeroes | |
| unsigned char tape[30000] = {0}; | |
| // set the pointer to point at the left-most cell of the tape | |
| unsigned char* ptr = tape; |
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
| pm list packages -f |
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 | |
| ###################################################################### | |
| # | |
| # File : split_bootimg.pl | |
| # Author(s) : William Enck <[email protected]> | |
| # Description : Split appart an Android boot image created | |
| # with mkbootimg. The format can be found in | |
| # android-src/system/core/mkbootimg/bootimg.h | |
| # | |
| # Thanks to alansj on xda-developers.com for |
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.watch polyfill | |
| * | |
| * 2012-04-03 | |
| * | |
| * By Eli Grey, http://eligrey.com | |
| * Public Domain. | |
| * NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. | |
| */ |
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
| " Vim syntax file | |
| " Language: HTML (version 5) | |
| " Maintainer: Rodrigo Machado <[email protected]> | |
| " URL: http://gist.github.com/256840 | |
| " Last Change: 2010 Aug 26 | |
| " License: Public domain | |
| " (but let me know if you liked it :) ) | |
| " | |
| " Note: This file just adds the new tags from HTML 5 | |
| " and don't replace default html.vim syntax file |