Skip to content

Instantly share code, notes, and snippets.

View sberryman's full-sized avatar
🏠
Working from home

Shaun Berryman sberryman

🏠
Working from home
View GitHub Profile
@chuckg
chuckg / SPLUNK_RECIPES.md
Last active May 18, 2020 17:37
Splunk Storm recipes for Heroku logs.

Splunk Recipes for Heroku

A collection of Splunk recipes for Heroku logs. Instructions for setting up Splunk Storm with Heroku can be found here. For the vast majority of these recipes you'll need to have enabled the Heroku labs feature, log-runtime-metrics, for your application.

@jdiamond
jdiamond / mongoose-as-promised.js
Created December 30, 2012 18:58
Mongoose as Promised
var mongoose = require('mongoose');
var Q = require('q');
mongoose.Promise.prototype.then = function(fulfilled, rejected) {
var deferred = Q.defer();
this.addCallback(deferred.resolve);
this.addErrback(deferred.reject);
return deferred.promise.then(fulfilled, rejected);
@johnthethird
johnthethird / http_client_with_cache.coffee
Created September 1, 2010 03:38
HTTPClientWithCache for Titanium in CoffeeScript
###
------> HTTPClientWithCache <------
This class is a wrapper around the standard Titanium.Network.HTTPClient(), but it adds a
few nice features:
* A cache backed by a SQLite database. All HTTPClientWithCache instances use the same database table, with
the primary cache key being a hash of the full URL (and any data parameters in a POST)
* The cache is automatically pruned before each query
* A retry mechanism, so that you can retry a particular query a number of times before failing.
@martinisoft
martinisoft / jquery_setup.rake
Created July 6, 2010 01:24
Rake task to setup a Rails 3 app for jQuery instead of Prototype
# Rails 3 jQuery Install Rakefile
# by Aaron Kalin
# Compiled from http://www.railsinside.com/tips/451-howto-unobtrusive-javascript-with-rails-3.html
#
# Note: this assumes you use git, if not then use the optional usage
#
# Usage: rake install_query
#
# Optional usage: rake install_jquery[nogit]
#