- Install latest software update
- Enable touch ID
- Make Dock hide and remove some silly apps (photobooth, ...) disable recently used apps
- Finder:
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
load 'deploy' | |
# Uncomment if you are using Rails' asset pipeline | |
load 'deploy/assets' | |
Dir['vendor/gems/*/recipes/*.rb','vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) } | |
load 'config/deploy' # remove this line to skip loading any of the default tasks |
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
$/=%q(/) | |
$\=%Q(\t) | |
while DATA.gets | |
BEGIN {puts "START #{$0}"} | |
END {puts "DONE."} | |
puts $_[/a(.{2})/,1] || '--' | |
end |
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
class Hash | |
def transform | |
inject(self.class.new){|acc, (k, v)| acc[k] = yield(v); acc } | |
end | |
def transform! | |
each{|k,v| self[k]=yield(v)} | |
end |
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
# Originally from http://sharebear.co.uk/blog/2009/09/17/very-simple-python-caching-proxy/ | |
# | |
# Usage: | |
# A call to http://localhost:80000/example.com/foo.html will cache the file | |
# at http://example.com/foo.html on disc and not redownload it again. | |
# To clear the cache simply do a `rm *.cached`. To stop the server simply | |
# send SIGINT (Ctrl-C). It does not handle any headers or post data. | |
import BaseHTTPServer | |
import hashlib |
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
# A class-based template for jQuery plugins in Coffeescript | |
# | |
# $('.target').myPlugin({ paramA: 'not-foo' }); | |
# $('.target').myPlugin('myMethod', 'Hello, world'); | |
# | |
# Check out Alan Hogan's original jQuery plugin template: | |
# https://github.com/alanhogan/Coffeescript-jQuery-Plugin-Template | |
# | |
do ($=jQuery) -> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset=utf-8 /> | |
<title>3D Icosahedron based on Javascript and Canvas</title> | |
<style> | |
* {padding:0;margin:0;} | |
body {text-align:center;font-size:8px;} | |
</style> | |
</head> |
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
resource :res do | |
def create_action action = :action | |
Proc.new {get action} | |
end | |
namespace :ns0, &create_action | |
namespace :nsp, path: "nspp/nsppi", &create_action | |
namespace :nsf, module: false, &create_action | |
namespace :nsm, module: :mod, &create_action | |
scope &create_action(:sco_a) | |
scope module: 'scm', &create_action(:scm_a) |
This is my "I love Java, but..." document. And now follows some ranting about Java:
super()
must be the first statement in the constructor. This is just nonsense, as you can work around this and add more statements by calling methods on the parameters to super(). Thus, all checks involving use of this
must be implemented in the compiler anyways.
Nile. Length: 6852 km. Linear: 3700 km. Sinuosity: 1.85. Amazon. Length: 6448 km. Linear: 3000 km. Sinuosity: 2.15.