Skip to content

Instantly share code, notes, and snippets.

@dirkk0
dirkk0 / layout.jade
Created February 8, 2012 16:54
layout.jade for Twitters Bootstrap 2 (kudos httpwww.andyjarrett.co.ukblogindex.cfm20111221layoutjade-for-Twitters-Bootstrap )
!!!
html
head
title= title
link(rel='stylesheet', href='/bootstrap.css')
link(rel='stylesheet', href='/bootstrap-responsive.css')
body
div.navbar.navbar-fixed-top
div.navbar-inner
@bialecki
bialecki / gist:1293556
Created October 17, 2011 19:40
Backbone View that listens to more events.
(function () {
// Cached regex to split keys for `delegate`.
var eventSplitter = /^(\S+)\s*(.*)$/;
var ExtendedView = Backbone.View.extend({
delegateViewEvents : function (events) {
if (!(events || (events = this.viewEvents))) return;
@arnaudsj
arnaudsj / phonegap-sc.rb
Created November 28, 2010 03:00 — forked from wagenet/phonegap-sc.rb
PhoneGap with SproutCore
#######################
#### DOCUMENTATION ####
#######################
#
# Run as:
#
# ruby phonegap-sc.rb APP_NAME
# ruby phonegap-sc.rb APP_NAME PROJECT_PATH
# ruby phonegap-sc.rb APP_NAME PROJECT_PATH OUTPUT_PATH
#
@HenrikJoreteg
HenrikJoreteg / JS Util solution using underscore.js
Created October 22, 2010 21:20
Rather than creating some other util global, just extend underscore.js with any additional methods you want.
// 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,'&lt;')
.replace(/"/g,'&quot;')
.replace(/'/g,'&#39;');
#!/usr/bin/python
# By Paul Schreiber <paulschreiber at gmail.com>
# Free to use as you see fit. Credit appreciated.
#
# version 1.3
#
# Retrieved 2010-10-12:
# City and Town Clerks: http://gist.github.com/623148
# County Clerks: http://gist.github.com/623121
@smajda
smajda / aggregate-feed.php
Created October 7, 2009 16:41
Merge multiple RSS feeds with SimplePie
<?php
/* Merge multiple RSS feeds with SimplePie
*
* Just modify the path to SimplePie and
* modify the $feeds array with the feeds you want
*
* You should probably also change the channel title, link and description,
* plus I added a CC license you may not want
*
* Help from: http://www.webmaster-source.com/2007/08/06/merging-rss-feeds-with-simplepie/