Skip to content

Instantly share code, notes, and snippets.

@msmith
msmith / couchdb-ec2-install.sh
Created August 25, 2011 17:26
Set up CouchDB on EC2
#!/bin/bash
#
# This script installs and configures couchdb on a fresh Amazon Linux AMI instance.
#
# Must be run with root privileges
# Tested with Amazon Linux AMI release 2011.02.1.1 (ami-8c1fece5)
#
export BUILD_DIR="$PWD"
@swannodette
swannodette / gist:1161596
Created August 22, 2011 03:28
regex.clj
(ns match.regex
(:use [match.core :only [IPatternCompile match-1 to-source
emit-pattern pattern-equals
pattern-compare]]))
(defrecord RegexPattern [regex]
IPatternCompile
(to-source [this ocr]
`(re-matches ~regex ~ocr)))
@wesen
wesen / backbone-mixin.js
Created August 21, 2011 10:38
Merge backbone views (mixin pattern)
/**
* ## Merging mixin views in backbone.js ##
*
* really just more a test for tumblr gistr
*/
/**
* Merge the mixin (a Backbone.View) into another Backbone.View. Automatically merge events, defaults, and call the parent initializer.
**/
function mergeMixin(view, mixin) {
@fogus
fogus / about.md
Created August 11, 2011 00:28 — forked from jasonrudolph/about.md
Programming Achievements: How to Level Up as a Developer
@copenhas
copenhas / gist:1010318
Created June 6, 2011 14:03
example couchdb map/reduce
/*
So with documents as such:
{
one_id : 1,
another_id : 22,
created_at : "2011-05-26 23:22:11",
a_name : "Lisa"
}
We want to get a count of the unique 'a_name' values possibly
@przemoc
przemoc / siemens.gawk
Last active February 6, 2018 13:18
Siemens ringtone converter v. 0.3 // taken from pcspk 0.0.6: http://wiki.przemoc.net/projects/pcspk
#!/usr/bin/gawk -f
# SPDX-License-Identifier: GPL-2.0-only
## (C) Copyright 2007-2008 Przemyslaw Pawelczyk <[email protected]>
##
## This script is licensed under the terms of the GNU GPL v2 only license.
## https://www.gnu.org/licenses/gpl-2.0.html
#
# Siemens ringtone converter v. 0.3
#
@jrburke
jrburke / apiexamples.js
Created April 7, 2011 05:50
Description of browser-friendly module APIs: AMD and Loader Plugins
//*******************************************
// Level 1, basic API, minimum support
//*******************************************
/*
Modules IDs are strings that follow CommonJS
module names.
*/
//To load code at the top level JS file,
//or inside a module to dynamically fetch
@dbenson
dbenson / elasticsearch.yml
Created February 24, 2011 18:44
elasticsearch.yml
name: ${HOSTNAME}
# The cluster should be named with the name of the AD domain
cluster:
name: bldrprod-0.14.0
routing:
allocation:
# As small as possible, very large performance hits during recovery
concurrent_recoveries: 1
@bleything
bleything / ubuntu-lucid-ree.erb
Created February 17, 2011 19:02
A chef bootstrapper that provisions the machine with REE
<%# chef bootstrap script %>
<%# made by Estately, Inc. placed in the public domain. %>
bash -c '
<%# let's get this party started %>
apt-get update
apt-get -y install build-essential wget
<%# install REE if necessary %>
@thbar
thbar / Gemfile
Created February 13, 2011 17:46
How to use a bundler group to define a reduced-memory consumption environment for your workers
# these gems won't be loaded by our Rakefile with WORKER_ENVIRONMENT enabled
gem 'rails', '3.0.3'
gem 'haml', '3.1.0.alpha.147'
# ...
# load these both for the app and the workers
group :default, :worker do
gem 'mongo', '1.1.5'
gem 'bson', '1.1.5'
gem 'bson_ext', '1.1.5'