Skip to content

Instantly share code, notes, and snippets.

View mbbx6spp's full-sized avatar
🎯
Focusing

Susan Potter mbbx6spp

🎯
Focusing
View GitHub Profile
@mbbx6spp
mbbx6spp / .gitconfig
Created July 25, 2010 14:43
Susan Potter's .gitconfig file from November 2007 blog post. Updated since November 2007 with new aliases or options.
# Migrating my old .gitconfig blog post from 2007 to here so I can update it easier.
# Original URL:
# http://geek.susanpotter.net/2007/11/my-gitconfig.html
[user]
name = Susan Potter # make sure you change this
email = me@susanpotter.net # make sure you change this
[color]
diff = auto
status = auto
branch = auto
@mbbx6spp
mbbx6spp / Jekyll site generator on Ruby 1.9 error
Created August 6, 2010 19:55
Jekyll error output running on Ruby 1.9
[supo@XXXX ~/YYYY]% jekyll --pygments
WARNING: Could not read configuration. Using defaults (and options).
Invalid configuration - ~/YYYY/_config.yml
RVMROOT/lib/ruby/1.9.1/time.rb:263:in `parse': no time information in "" (ArgumentError)
from RVMROOT/gems/jekyll-0.6.2/lib/jekyll/site.rb:31:in `reset'
from RVMROOT/gems/jekyll-0.6.2/lib/jekyll/site.rb:26:in `initialize'
from RVMROOT/gems/jekyll-0.6.2/bin/jekyll:124:in `new'
from RVMROOT/gems/jekyll-0.6.2/bin/jekyll:124:in `<top (required)>'
from RVMROOT/bin/jekyll:19:in `load'
from RVMROOT/bin/jekyll:19:in `<main>'
@mbbx6spp
mbbx6spp / .vimrc
Created August 31, 2010 20:57
Start configuration for vim for new shell accounts. this starter config depends on the following Vim plugins: rails, pathogen, vimchat, sessionman, bufexplorer, fuzzy finder, NERDTree, gist. Primary development languages: Erlang, Haskell, Ruby, Zsh scrip
" Author: Susan Potter
" Using ~/.vim/supo as placeholder initialization VimScripts location.
" Didn't want to use ~/.vim/init in case init had or starts to have special meaning for Vim plugins or loading.
source $HOME/.vim/supo/global.vim
source $HOME/.vim/supo/functions.vim
@mbbx6spp
mbbx6spp / timeout_mixin.rb
Created September 16, 2010 20:08
Pre-fix to work around timeout + Thread#join issue in Ruby 1.8 when using Twitter4R.
# in your application code
require 'twitter'
module MyAppNamespace::Twitter4RTimeoutMixin
def self.included(base)
base.send(:include, InstanceMethods)
base.class_eval do
# assumes you already depend on ActiveSupport,
# but you can mimick with alias_method and more cruft code
alias_method_chain :rest_consumer, :timeout
@mbbx6spp
mbbx6spp / clusters.yml
Created September 24, 2010 03:49
SysV Init mongrel cluster script
redmine:
config: /webapps/redmine/current/config/mongrel_cluster.yml
@mbbx6spp
mbbx6spp / setup-git-hg-repo.sh
Created October 4, 2010 15:12
Sets up a Git-hg repository, cloning from Hg remote repo, converting to Git format, pushing to Git remote repo.
#!/usr/bin/env bash
# Assumes: git-hg is in your PATH.
# Customize defaults for your needs
BASE_DIR=${HOME}/code
PROJECT_DIR=zotonic
HG_REPO_URL=https://zotonic.googlecode.com/hg/
GIT_REPO_URL=git@github.com:mbbx6spp/zotonic.git
@mbbx6spp
mbbx6spp / cleanup-openldap.sh
Created October 5, 2010 19:48
Script to cleanup screwed up OpenLDAP installation. Seems to work after seeing following errors: bdb_db_open: database "dc=yourdomain,dc=local": db_open(/var/lib/ldap/id2entry.bdb) failed: No such file or directory (2). backend_startup_one (type=bdb, suf
#!/usr/bin/env bash
# Appears to fix the following errors when running slaptest:
# bdb_db_open: database "dc=yourdomain,dc=local": db_open(/var/lib/ldap/id2entry.bdb) failed: No such file or directory (2).
# backend_startup_one (type=bdb, suffix="dc=yourdomain,dc=local"): bi_db_open failed! (2)
# Assumes you have customized the following configuration files:
# - /etc/openldap/slapd.conf
# - /etc/openldap/ldap.conf
@mbbx6spp
mbbx6spp / nodejs.spec
Created October 19, 2010 20:27
RPM spec for Node.js v0.4.2.
%define _base node
Name: %{_base}js
Version: 0.4.2
Release: 1%{?dist}
Summary: Evented I/O for V8 Javascript.
Packager: Susan Potter <susan@managedopensource.com>
Vendor: http://nodejs.org
Group: Development/Libraries
License: MIT License
@mbbx6spp
mbbx6spp / install_user_npm.sh
Created October 23, 2010 17:39
Install user based NodeJS Pakcage Manager (NPM). You might also want to see the RPM spec for NodeJS if you are running an RPM based Linux distro for a clean NodeJS install too: http://gist.github.com/635036
#!/usr/bin/env bash
CURL=$(which curl)
NPM_DIR=${HOME}/.npmjs
mkdir -p ${NPM_DIR}/{bin,share/man,packages}
cat >>${HOME}/.npmrc <<NPMRC
root = ${NPM_DIR}/packages
binroot = ${NPM_DIR}/bin
manroot = ${NPM_DIR}/share/man
@mbbx6spp
mbbx6spp / gist:652165
Created October 28, 2010 19:38
Twitter4R initializer for Rails 2.3 and 3.0+
We couldn’t find that file to show.