with mysql pgsql intl support
$ brew install php --with-apache --with-mysql --with-pgsql --with-intl
date.timezone = Europe/Vienna
/* The API controller | |
Exports 3 methods: | |
* post - Creates a new thread | |
* list - Returns a list of threads | |
* show - Displays a thread and its posts | |
*/ | |
var Thread = require('../models/thread.js'); | |
var Post = require('../models/post.js'); |
(ns latinsq.core | |
(:use [clojure.set :only (difference)])) | |
(defn replace-at | |
"in string s, replaces character at index p with c" | |
[s p c] | |
(str | |
(.substring s 0 p) | |
c |
#!/bin/sh | |
# place in {repo}/.git/hooks/update | |
# chmod +x update | |
name="$1" | |
old="$2" | |
new="$3" | |
user_name=$(git log -1 --pretty=format:%aN $new) | |
#branch=$(git rev-parse --symbolic --abbrev-ref $1) | |
branch=${name#refs/heads/} |
/* | |
* L.TileLayer is used for standard xyz-numbered tile layers. | |
*/ | |
L.Google = L.Class.extend({ | |
includes: L.Mixin.Events, | |
options: { | |
minZoom: 0, | |
maxZoom: 18, | |
tileSize: 256, |
Here's how this works:
git_hooks/
directory in your project, with these two files (plus other hooks if you want, written in a similar style)."npm"
to your devDependencies
in package.json
, so that the pre-commit
hook can do its magic.test
and lint
scripts to your package.json
, e.g. "scripts": {
"test": "mocha",
"lint": "jshint ./lib --show-non-errors"
#!/bin/sh | |
# | |
# Automatically adds branch name and branch description to every commit message. | |
# | |
NAME=$(git branch | grep '*' | sed 's/* //') | |
DESCRIPTION=$(git config branch."$NAME".description) | |
TEXT=$(cat "$1" | sed '/^#.*/d') | |
if [ -n "$TEXT" ] | |
then |
module Y { | |
interface Anim extends Base { | |
} | |
interface App extends App_Base, App_Content, App_Transitions, PjaxContent { | |
(config?: any); | |
This article has been given a more permanent home on my blog. Also, since it was first written, the development of the Promises/A+ specification has made the original emphasis on Promises/A seem somewhat outdated.
Promises are a software abstraction that makes working with asynchronous operations much more pleasant. In the most basic definition, your code will move from continuation-passing style:
getTweetsFor("domenic", function (err, results) {
// the rest of your code goes here.
wget ftp://ftp.graphicsmagick.org/pub/GraphicsMagick/1.3/GraphicsMagick-1.3.15.tar.gz | |
tar -xvf GraphicsMagick-1.3.15.tar.gz | |
cd GraphicsMagick-1.3.15 | |
./configure | |
make |