This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
#!/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" |
(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))) |
/** | |
* ## 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) { |
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
/* | |
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 |
#!/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 | |
# |
//******************************************* | |
// 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 |
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 |
<%# 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 %> |
# 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' |