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
#!/bin/bash | |
# | |
# Enable TRIM support for 3rd Party SSDs. Works for Mountain Lion, should work on earlier OSes too. | |
# Tested on 10.8.2, 10.8.3, 10.8.5, 10.9.0, 10.9.1, 10.9.2, 10.9.3, and 10.9.4 | |
# | |
# You may have to re-apply the fix after some system updates, including but not limited to those below: | |
# 10.9.X to 10.9.4 | |
# 10.9.X to 10.9.3 | |
# 10.9.X to 10.9.2 | |
# 10.8.X to 10.8.3 |
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 STATIC_ASSET_REGEX = /\..*/; | |
var routingTable = { | |
'/foo': true, | |
'/bar': true | |
}; | |
module.exports.routes = { | |
'get /*': function(req, res, next) { | |
// Fast check for static assets | |
if (STATIC_ASSET_REGEX.test(req.path)) return next(); |
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
{ | |
"directory": "components" | |
} |
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
unless Function::bind | |
Function::bind = (oThis) -> | |
# closest thing possible to the ECMAScript 5 internal IsCallable function | |
if typeof this isnt "function" | |
throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable") | |
aArgs = Array::slice.call(arguments, 1) | |
fToBind = this | |
fNOP = -> |
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
if (!Function.prototype.bind) { | |
Function.prototype.bind = function (oThis) { | |
if (typeof this !== "function") { | |
// closest thing possible to the ECMAScript 5 internal IsCallable function | |
throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable"); | |
} | |
var aArgs = Array.prototype.slice.call(arguments, 1), | |
fToBind = this, | |
fNOP = 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
{ | |
"name": "", | |
"description": "", | |
"version": "0.0.0", | |
"private": true, | |
"author": "Brian Frichette", | |
"homepage": "", | |
"contributors": [ "Brian Frichette <[email protected]> (https://github.com/brian-frichette)" ], | |
"bugs": { "url": "" }, | |
"scripts": { "start": "nodemon app.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
### | |
Initialize a new `Emitter`. | |
@api public | |
### | |
module.exports = Emitter = (obj) -> | |
return mixin(obj) if obj | |
@_callbacks = {} | |
### |
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
# This is really just an interaction wrapper for amplify | |
# I prefer this syntax for interacting with storage. | |
class Stor | |
# Constructor sets defaults for amplify | |
# and optionally for expiration and key | |
constructor: (key, exp) -> | |
@key = if key? then key else undefined | |
@exp = if exp? then exp else null | |
@amp = amplify.store |
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
# Requires jQuery.slideFade.coffee gist | |
# https://gist.github.com/4425644 | |
app.directive 'slideFadeShow', -> | |
(scope, elem, attrs) -> | |
$elem = $(elem) | |
exp = attrs.slideFadeShow | |
duration = 600 | |
slideElem = (toShow, init = false) -> |
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
### | |
Adapted from jqMobi (appMobi) | |
https://github.com/appMobi/jQ.Mobi | |
MIT License | |
### | |
window.UserAgent = -> | |
self = @ | |
self.ua = navigator.userAgent | |
self.os = {} |
NewerOlder