most of these require logout/restart to take effect
# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false
# Set a shorter Delay until key repeat
git branch | wc -l |
/* | |
* This work is free. You can redistribute it and/or modify it under the | |
* terms of the Do What The Fuck You Want To Public License, Version 2, | |
* as published by Sam Hocevar. See the COPYING file for more details. | |
*/ | |
/* | |
* Easing Functions - inspired from http://gizma.com/easing/ | |
* only considering the t value for the range [0, 1] => [0, 1] | |
*/ | |
EasingFunctions = { |
#Mac OS X
// Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc | |
// jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/ | |
// author: Pawel Kozlowski | |
var myApp = angular.module('myApp', []); | |
//service style, probably the simplest one | |
myApp.service('helloWorldFromService', function() { | |
this.sayHello = function() { | |
return "Hello, World!" |
var db = new Firebase('https://demo.firebaseio.com') | |
var authenticate = (function(db) { | |
var loggedIn, | |
deferred = $.Deferred() | |
var client = new FirebaseAuthClient(db, function(err, user) { | |
loggedIn = !!user | |
if (err) { |
function map(x, in_min, in_max, out_min, out_max) { | |
return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min; | |
} |
<html ng-app="test"> | |
<head> | |
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.1.1/angular.min.js"></script> | |
<script type="text/javascript" src="https://cdn.firebase.com/v0/firebase.js"></script> | |
</head> | |
<body ng-controller="Test"> | |
<script typ="text/javascript"> | |
function TestController($scope, $q) { | |
this._q = $q; | |
this._scope = $scope; |
var canvas, stage, exportRoot; | |
function init() { | |
canvas = document.getElementById("canvas"); | |
//Setup the canvas widht and height with devicePixelRatio. And set CSS width and height properties. | |
var w = 320; | |
var h = 357; | |
canvas.width = w * window.devicePixelRatio; | |
canvas.height = h * window.devicePixelRatio; |
static UIImage * UIImageForSwatchOfColorWithSize(UIColor *color, CGSize size) { | |
UIImage *image = nil; | |
CGRect rect = CGRectMake(0.0f, 0.0f, size.width, size.height); | |
UIGraphicsBeginImageContext(rect.size); | |
{ | |
CGContextRef c = UIGraphicsGetCurrentContext(); | |
CGContextSetFillColorWithColor(c, [color CGColor]); |