Skip to content

Instantly share code, notes, and snippets.

View mindscratch's full-sized avatar

Craig Wickesser mindscratch

View GitHub Profile
@jjulian
jjulian / gist:2520936
Created April 28, 2012 18:08
Advice on moving to Baltimore

Derek Sivers wrote an interesting post (http://sivers.org/la) as advice for folks moving to LA. Here's my thoughts on the same topic, but about Baltimore, MD.

I moved into South Baltimore in 1996 and I've lived in this neighborhood ever since. Here are a few of my thoughts (please fork and edit):

  • Baltimore is made up of many different neighborhoods. Getting to know the character of each of the them will enhance your experience. Visiting the baseball stadium and going to dinner in the Inner Harbor does not make for a satisfying Baltimore-experience. You have to get it into the neighborhoods to find the truly great food, the fun bars, and genuine people.

  • "The Wire" is real, but you probably won't see it. Unless you're visiting your cousin who lives on West Lanvalle, you probably won't see much that resembles a Barksdale corner. And don't ask for a "Wire Tour" - that's not what we're about.

  • People are friendly, especially the older folks. If you have a chance, take a pause to listen to their story, o

development: &defaults
# Configure available database sessions. (required)
sessions:
# Defines the default session. (required)
default: &default_session
# Defines the name of the default database that Mongoid can connect to.
# (required).
database: delight_development
# Provides the hosts the default session can connect to. Must be an array
# of host:port pairs. (required)
function mysql_server() {
7 if [ $# -ne 1 ]; then
8 echo "usage: "
9 echo "> mysql (start|stop)"
10 return 1
11 fi
12
13 case "$1" in
14 "start")
@nrrrdcore
nrrrdcore / apple-shadow.css
Created May 17, 2012 17:19
Bending Shadows Backwards: Apple.com's Container CSS Sorcery
.shadow-stuff {
-moz-border-radius: 0% 0% 100% 100% / 0% 0% 8px 8px;
-webkit-border-radius: 0% 0% 100% 100% / 0% 0% 8px 8px;
border-radius: 0% 0% 100% 100% / 0% 0% 8px 8px;
-moz-box-shadow: rgba(0,0,0,.30) 0 2px 3px;
-webkit-box-shadow: rgba(0,0,0,.30) 0 2px 3px;
box-shadow: rgba(0,0,0,.30) 0 2px 3px;
}
.container {
@zuk
zuk / drowsy_jquery.js
Created June 5, 2012 18:50
DrowsyDromedary usage with jQuery
// This line might not be necessary, but try it if you see weird HTTP errors.
jQuery.support.cors = true;
var drowsyUrl = "http://localhost:9292";
/** List available databases **/
jQuery.ajax(drowsyUrl, {
type: 'get',
success: function (dbs) {
@rstacruz
rstacruz / git-clog
Created June 6, 2012 07:51
Git changelog helper
#!/usr/bin/env ruby
# Usage:
# git clog # prints
# git clog -w # writes
#
# https://gist.github.com/2880525
module Clog
extend self
@billyvg
billyvg / gist:2932337
Created June 14, 2012 19:20
Backbone.js ListView + RowView
class ListView extends Backbone.View
constructor: (options) ->
super
@view = options.view if options.view?
@collection.on 'add', @addRow, @
@collection.on 'remove', @removeRow, @
@collection.on 'reset', @render, @
@
@lgs
lgs / gist:3068455
Created July 7, 2012 22:50 — forked from adamlwatson/gist:1371577
Mongoid connection pooling in Goliath
require 'em-synchrony/em-mongo'
require 'mongoid'
mongoid_conn = Mongo::Connection.new 'localhost', 27017, :pool_size => 10
Mongoid.configure do |config|
begin
config.master = mongoid_conn.db('dbname')
rescue Exception=>err
abort "An error occurred while creating the mongoid connection pool: #{err}"
end
@ryin
ryin / tmux_local_install.sh
Last active May 27, 2025 08:36
bash script for installing tmux without root access
#!/bin/bash
# Script for installing tmux on systems where you don't have root access.
# tmux will be installed in $HOME/local/bin.
# It's assumed that wget and a C/C++ compiler are installed.
# exit on error
set -e
TMUX_VERSION=1.8
@trek
trek / unit.js
Created July 22, 2012 02:40
Run your mocha unit tests suite via casper.js
// get a Casper object.
// See http://casperjs.org/
var casper = require('casper').create();
// this will be evaluated inside the context of the window.
// See http://casperjs.org/api.html#casper.evaluate for notes on
// the difference between casper's running environment and the
// DOM environment of the loaded page.
function testReporter(){
// casper is webkit, so we have good DOM methods. You're