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 ruby | |
| require 'rubygems' | |
| require 'aws-sdk' | |
| require 'base64' | |
| require 'benchmark' | |
| AWS_ACCESS_KEY_ID = '' | |
| AWS_SECRET_ACCESS_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
| /* | |
| * a backwards compatable implementation of postMessage | |
| * by Josh Fraser (joshfraser.com) | |
| * released under the Apache 2.0 license. | |
| * | |
| * this code was adapted from Ben Alman's jQuery postMessage code found at: | |
| * http://benalman.com/projects/jquery-postmessage-plugin/ | |
| * | |
| * other inspiration was taken from Luke Shepard's code for Facebook Connect: | |
| * http://github.com/facebook/connect-js/blob/master/src/core/xd.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 () { | |
| var go = function go () { | |
| }; | |
| if (window.addEventListener) { | |
| window.addEventListener('load', go, false); | |
| } else if (window.attachEvent) { | |
| window.attachEvent('onload', 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
| networksetup -listallnetworkservices | |
| networksetup -setv6off Ethernet | |
| networksetup -setv6off Wi-Fi |
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
| # become root | |
| sudo -i | |
| # flush all existing rules | |
| iptables -F | |
| # Accept traffic from existing connections | |
| iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT | |
| # accept SSH connections |
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 walk = require('./walk'); | |
| var TEST_DIRECTORY = process.cwd() + '/public/test/app'; | |
| var renderView = function (res, filenames) { | |
| var conf = { filenames: filenames }; | |
| view = process.cwd() + '/assets/test/runner.hbs'; | |
| res.render(view, conf); | |
| }; |
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
| // to be used only when all the corners have the same radius (and unit) | |
| .border-radius(@radius) { | |
| -webkit-border-radius: @radius; | |
| border-radius: @radius; | |
| } | |
| // specify radius per corner (and probably units) | |
| .border-radius(@top-left, @top-right, @bottom-right, @bottom-left) { | |
| border-top-left-radius: @top-left; | |
| border-top-right-radius: @top-right; |
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
| # generates URL functions for each of the routes | |
| # | |
| # #### Example: | |
| # | |
| # Given the following routes | |
| # | |
| # routes: | |
| # '/posts/:id' : 'showPost' | |
| # '/posts/:id/comments' : 'comments' | |
| # |
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
| //Download jquery.js and place it in the build, do not use require-jquery.js | |
| //in the build, since each of the build layers just needs almond and not the | |
| //full require.js file. | |
| //This file is run in nodejs to do the build: node build.js | |
| //Load the requirejs optimizer | |
| var requirejs = require('./r.js'); | |
| //Set up basic config, include config that is | |
| //common to all the requirejs.optimize() calls. |