Skip to content

Instantly share code, notes, and snippets.

install php

with mysql pgsql intl support

$ brew install php --with-apache --with-mysql --with-pgsql --with-intl

set php timezone in php ini

date.timezone = Europe/Vienna
@christian-smith
christian-smith / snippet.xml
Created November 20, 2012 02:05 — forked from JeffreyWay/snippet.xml
Laravel Resource - Sublime Text 2 Snippet
<snippet>
<content><![CDATA[
// ${1} Resource
Route::get('${1}s', array('as' => '${1}s', 'uses' => '${1}s@index'));
Route::get('${1}s/(:any)', array('as' => '${1}', 'uses' => '${1}s@show'));
Route::get('${1}s/new', array('as' => 'new_${1}', 'uses' => '${1}s@new'));
Route::get('${1}s/(:any)edit', array('as' => 'edit_${1}', 'uses' => '${1}s@edit'));
Route::post('${1}s', '${1}s@create');
Route::put('${1}s/(:any)', '${1}s@update');
Route::delete('${1}s/(:any)', '${1}s@destroy');
@christian-smith
christian-smith / global.js
Created November 14, 2012 14:16 — forked from frockenstein/global.js
JavaScript: Global Pub Sub
var global = {
// pub sub lifted from http://jsperf.com/pub-sub-implementations/13
cache: {},
publish: function(topic, args) {
var self = this;
if (self.cache[topic]) {
var currentCache = self.cache[topic],
currentArgs = args || [];
@christian-smith
christian-smith / tricks.css
Created November 14, 2012 14:16 — forked from frockenstein/tricks.css
CSS: Image Replacement
/* image replacement in lieu of text-indent */
.ir {
border: 0;
font: 0/0 a;
text-shadow: none;
color: transparent;
background-color: transparent;
}
@christian-smith
christian-smith / Document Ready
Created November 14, 2012 14:15 — forked from martinodehnal/Document Ready
jQuery: document ready
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
// Handler for .ready() called.
});
</script>
@christian-smith
christian-smith / gameengines.md
Created November 14, 2012 14:14 — forked from bebraw/gameengines.md
List of JS game engines. You can find a wikified version at https://github.com/bebraw/jswiki/wiki/Game-Engines. Feel free to modify that. I sync it here every once in a while.

IMPORTANT! Remember to check out the wiki page at https://github.com/bebraw/jswiki/wiki/Game-Engines for the most up to date version. There's also a "notes" column in the table but it simply does not fit there... Check out the raw version to see it.

This table contains primarily HTML5 based game engines and frameworks. You might also want to check out the [[Feature Matrix|Game-Engine-Feature-Matrix]], [[Game Resources]] and [[Scene Graphs]].

Name Size (KB) License Type Unit Tests Docs Repository Notes
Akihabara 453 GPL2, MIT Classic Repro no API github Intended for making classic arcade-style games in JS+HTML5
AllBinary Platform Platform Dependent AllBinary 2D/2.5D/3D n
@christian-smith
christian-smith / gist:4072306
Created November 14, 2012 14:11 — forked from padolsey/gist:527683
JavaScript: IE Detect
// ----------------------------------------------------------
// A short snippet for detecting versions of IE in JavaScript
// without resorting to user-agent sniffing
// ----------------------------------------------------------
// If you're not in IE (or IE version is less than 5) then:
// ie === undefined
// If you're in IE (>=5) then you can determine which version:
// ie === 7; // IE7
// Thus, to detect IE:
// if (ie) {}
@christian-smith
christian-smith / awesome-php.md
Created November 14, 2012 14:05 — forked from ziadoz/awesome-php.md
Awesome PHP Libraries