Skip to content

Instantly share code, notes, and snippets.

View fahad19's full-sized avatar

Fahad Heylaal fahad19

View GitHub Profile
@markstory
markstory / cakephp_version_bump.py
Created January 30, 2010 02:48
a simple script for helping do cakephp releases
#! /usr/bin/env python
import os, re
from optparse import OptionParser
"""
Helper script for making releases
- Bumps version numbers
- Updates changelog urls
@jperras
jperras / .gitconfig
Created July 31, 2010 18:03
.gitconfig
[color]
diff = auto
status = auto
branch = auto
[color "branch"]
current = yellow reverse
local = yellow
[color "diff"]
meta = yellow
frag = magenta bold
@m3nt0r
m3nt0r / default.tpl
Created September 21, 2010 05:58
TwigView for CakePHP
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
{{ html.charset() }}
<title>{{ 'CakePHP: the rapid development php framework'|trans }}: {{ title_for_layout }}</title>
{{ html.meta('icon') }}
{{ html.css('cake.generic') }}
{{ scripts_for_layout }}
</head>
<body>
@jakebellacera
jakebellacera / ICS.php
Last active June 2, 2024 02:20
A convenient script to generate iCalendar (.ics) files on the fly in PHP.
<?php
/**
* This is free and unencumbered software released into the public domain.
*
* Anyone is free to copy, modify, publish, use, compile, sell, or
* distribute this software, either in source code form or as a compiled
* binary, for any purpose, commercial or non-commercial, and by any
* means.
*
@briancavalier
briancavalier / simple-promise-retry.js
Created February 24, 2011 18:35
A few general patterns for retries using promises
function keepTrying(otherArgs, promise) {
promise = promise||new Promise();
// try doing the important thing
if(success) {
promise.resolve(result);
} else {
setTimeout(function() {
keepTrying(otherArgs, promise);
@dmitry
dmitry / gist:1296732
Created October 18, 2011 21:09
Creating a Backbone.js View Manager
/**
Big thanks to Derick Bailey for his post here:
http://lostechies.com/derickbailey/2011/09/15/zombies-run-managing-page-transitions-in-backbone-apps/
*/
(function(Account) {
/** LOTS OF MODEL, COLLECTION, AND VIEW CREATION GOING ON UP HERE, LEFT IT OUT FOR SIMPLICITY */
/**
* Define Routing.
@garth
garth / template.js
Created November 30, 2011 14:15
Use requirejs to dynamically load sproutcore20 handlebars templates
// dynamically load sproutcore20 handlebars templates
// add this file to the same dir as your data-main js to load a template as a dependency do
//
// define(['template!template'] function(){
// //do some SproutCore[ing]
// });
//
// templates should be located in templates folder and have a .handlebars extension
// removed partial support {{> partial}} which doesn't work in SC.Handlebars use
@wookiehangover
wookiehangover / Cakefile
Created December 24, 2011 08:25
a pretty-good build script, with Cake
# Dependencies
fs = require('fs')
{_} = require('underscore')
path = require('path')
tmpl = require('handlebars-jst')
{log} = require('util')
growl = require('growl')
stitch = require('stitch')
uglify = require('uglify-js')
@zilkey
zilkey / ember-precompile.js
Created March 10, 2012 22:30 — forked from garth/Jakefile.js
Precompile .handlebars templates with node js
var fs = require('fs');
var vm = require('vm');
var emberjs = fs.readFileSync('public/javascripts/vendor/ember-0.9.5.min.js', 'utf8');
var templatesDir = 'templates';
var destinationDir = 'public/javascripts/templates';
function compileHandlebarsTemplate(templatesDir, fileName) {
var file = templatesDir + '/' + fileName;
@ceeram
ceeram / .travis.yml
Created March 14, 2012 19:02
Travis configuration file for CakePHP, add to the root of the repo.
language: php
php:
- 5.3
- 5.4
env:
- DB=mysql
- DB=pgsql
- DB=sqlite