A ZSH theme optimized for people who use:
- Solarized
- Git
- Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)
For Mac users, I highly recommend iTerm 2 + Solarized Dark
PGraphics flatImg; | |
PImage img; | |
float rt3 = sqrt(3); | |
float res = 10; /* resolution */ | |
float radius = 2.1 * res / rt3; | |
float zoom = 1.0; | |
void setup() { | |
noLoop(); | |
smooth(); |
from fabric.api import * | |
from fabric.utils import abort | |
from fabric.contrib.project import rsync_project | |
from fabric.contrib.files import exists | |
env.hosts = ['igor@igor.io'] | |
target_dir = '/var/www/igor.io' | |
backup_dir = target_dir+'-backup' | |
staging_dir = target_dir+'-staging' |
// If you don't use underscore.js, use it (http://documentcloud.github.com/underscore/) | |
// Then, use underscore's mixin method to extend it with all your other utility methods | |
// like so: | |
_.mixin({ | |
escapeHtml: function () { | |
return this.replace(/&/g,'&') | |
.replace(/>/g,'>') | |
.replace(/</g,'<') | |
.replace(/"/g,'"') | |
.replace(/'/g,'''); |
window.addEventListener "DOMContentLoaded", -> | |
body = $ "body" | |
canvas = $ "#canvas" | |
chalkboard = $ "#chalkboard" | |
close = $ "#close" | |
ledge = $ "#ledge" | |
lightswitch = $ "#lightswitch" | |
output = $ "#output" | |
shade = $ "#shade" | |
share = $ "#share" |
<?php | |
/** | |
* SplClassLoader implementation that implements the technical interoperability | |
* standards for PHP 5.3 namespaces and class names. | |
* | |
* http://groups.google.com/group/php-standards/web/final-proposal | |
* | |
* // Example which loads classes for the Doctrine Common package in the | |
* // Doctrine\Common namespace. |
<?php | |
/** | |
* SplClassLoader implementation that implements the technical interoperability | |
* standards for PHP 5.3 namespaces and class names. | |
* | |
* http://groups.google.com/group/php-standards/web/final-proposal | |
* | |
* // Example which loads classes for the Doctrine Common package in the | |
* // Doctrine\Common namespace. |
# If you work with git, you've probably had that nagging sensation of not knowing what branch you are on. Worry no longer! | |
export PS1="\\w:\$(git branch 2>/dev/null | grep '^*' | colrm 1 2)\$ " | |
# This will change your prompt to display not only your working directory but also your current git branch, if you have one. Pretty nifty! | |
# ~/code/web:beta_directory$ git checkout master | |
# Switched to branch "master" | |
# ~/code/web:master$ git checkout beta_directory | |
# Switched to branch "beta_directory" |