Skip to content

Instantly share code, notes, and snippets.

View philippbosch's full-sized avatar

Philipp Bosch philippbosch

View GitHub Profile
@philippbosch
philippbosch / git-blast
Created November 30, 2016 14:24 — forked from wolever/git-blast
git-blast: show git branches sorted by last commit date
#!/usr/bin/env python
"""
Shows git branches sorted by last commit date, noting when branch has been
merged:
$ git blast
* master 33 minutes ago
david 4 days ago [M]
unholy-david-payments 4 days ago
handsontable-2 5 days ago
@philippbosch
philippbosch / .htaccess
Last active August 29, 2015 14:20 — forked from thoop/.htaccess
# Change YOUR_TOKEN to your prerender token and uncomment that line if you want to cache urls and view crawl stats
# Change http://example.com (at the end of the last RewriteRule) to your website url
<IfModule mod_headers.c>
#RequestHeader set X-Prerender-Token "YOUR_TOKEN"
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
@philippbosch
philippbosch / redmine_heroku_deploy.sh
Created August 7, 2011 12:13 — forked from brototyp/redmine_heroku_deploy
Deploy Redmine to Heroku
#!/bin/bash
set -e
REDMINE_URL="http://rubyforge.org/frs/download.php/75097/redmine-1.2.1.tar.gz"
S3_ACCESS_KEY_ID=""
S3_SECRET_ACCESS_KEY=""
S3_BUCKET_NAME=""
HEROKU_APP_NAME=""
require "chunky_png"
require "base64"
module Sass::Script::Functions
def background_noise(kwargs = {})
opts = {}
Sass::Util.map_hash({
"intensity" => [0..1, "", :Number, Sass::Script::Number.new(0.5) ],
"opacity" => [0..1, "", :Number, Sass::Script::Number.new(0.08)],
"size" => [1..512, "px", :Number, Sass::Script::Number.new(200) ],
from tastypie import fields
from tastypie.authentication import Authentication
from tastypie.authorization import Authorization
from tastypie.bundle import Bundle
from tastypie.exceptions import NotFound
from tastypie.resources import Resource
# a dummy class representing a row of data
class Row(object):
// Get that document
people.get(me.key, function(r){
console.log(r);
});
// Returns all documents as an array to a callback
people.all(function(r){
console.log(r);
});