http://ln.hixie.ch/?start=1037910467&count=1
http://ln.hixie.ch/?start=1137740632&count=1
// ResolveService.js | |
angular.module('module').factory("ResolveService", function($q) { | |
var resolved; | |
// Dictionary for deferred | |
// object lookup | |
resolved = {}; | |
return { | |
document.getElementById( 'loading' ).style.display = 'none'; | |
var speed = .001; // changes the rate of rotation | |
var distance = 4; // changes the distance the point travels | |
function _update() { | |
bAmDrawing = true; | |
lastMouseX = 0; lastMouseY = 0; | |
var a = speed * performance.now(); | |
var x = distance * Math.cos( a ); | |
var y = distance * Math.sin( a ); | |
stage.mousemove( { data: { global : { x: x, y: y } } } ) |
class ApplicationController < ActionController::Base | |
... | |
# FORCE to implement content_for in controller | |
def view_context | |
super.tap do |view| | |
(@_content_for || {}).each do |name,content| | |
view.content_for name, content | |
end | |
end | |
end |
git commit --allow-empty -m "empty commit" | |
git push heroku master | |
git reset HEAD~ | |
git push -f heroku master |
#!/bin/sh | |
# | |
# redis Startup script for Redis Server | |
# | |
# chkconfig: - 90 10 | |
# description: Redis is an open source, advanced key-value store. | |
# | |
# processname: redis-server | |
# config: /etc/redis.conf | |
# pidfile: /var/run/redis.pid |
#!/bin/sh | |
# Sets Terminal to case insensitive | |
# http://blog.nickburwell.com/blog/2008/11/mac-os-x-terminal-case-insensitive-auto | |
echo "set completion-ignore-case On" >> ~/.inputrc | |
# Disables the creation of .DS_Store files on external volumes | |
# http://danilo.ariadoss.com/how-to-recursively-remove-ds_store-files-on-mac-os-x/ | |
defaults write com.apple.desktopservices DSDontWriteNetworkStores true | |
# Make Your Keyboard Keys Repeat Properly When Held Down | |
# http://lifehacker.com/5826055/make-your-keyboard-keys-repeat-properly-when-held-down-in-mac-os-x-lion |
import Foundation | |
@objc(EnvConfig) | |
class EnvConfig: NSObject { | |
#if ENVConfigStaging | |
class var isProduction:Bool { | |
return false | |
} |
//: Playground - noun: a place where people can play | |
import Foundation | |
// MARK: Protocols | |
protocol UserRequestProtocol { | |
var name: String { get set } | |
var age: Int { get set } | |
var password: String { get set } | |
var likesBacon: Bool { get set } |