This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Setting up a local solr instance on a mac | |
# install solr with homebrew | |
brew install solr | |
# create the base solr index directory | |
mkdir -p /data/solr | |
# make sure you can write to the solr logs | |
sudo chown -R `whoami` /usr/local/Cellar/solr/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import os, shutil, subprocess, time | |
from optparse import OptionParser | |
USAGE = """%prog [options] name | |
Converts a bzr repository into a git repository and preps it for git-flow""" | |
def run(*cmds): | |
output = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REPONAME=${1%/} # trim trailing slash | |
if [ ! -d "$REPONAME" ]; then | |
# Make a temporary working directory | |
mkdir $REPONAME && cd $REPONAME | |
echo .DS_Store > .gitignore # ignore a common MacOS file | |
# make an initial commit | |
git init && git add .gitignore && git commit -m "initial commit" | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
man = help | |
unadd = reset HEAD | |
#co = checkout | |
co = "!f(){ git checkout \"$@\" && git sup; }; f" | |
feature = "!git reset HEAD && git checkout -b feature/\"$1\" && git commit --allow-empty -m \"Created feature branch $1\" && git push --set-upstream origin feature/\"$1\" && echo Branch feature/$1 published to origin" | |
cp = cherry-pick | |
sma = submodule add | |
st = status | |
br = branch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
shift # get rid of -c | |
# if no commands, just open a shell | |
if [[ $# -eq 0 ]]; then | |
/bin/bash -l | |
# if the first arg is a git- command, that means it is something like git-push, etc... so forward it | |
elif [[ $1 == git-* ]]; then | |
ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no git@localhost $* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Simple way to create a main development screen in the | |
# right base directory, or re-attach to the one that is | |
# already setup. | |
# I create a symlink or alias 's' so I am always one keystroke | |
# away from my dev screen. | |
if screen -ls | grep main > /dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
<!-- | |
// Jump to the best post (first first unread or most recent) in a thread. | |
// Originally by Todge, but completely rewritten by Ben Loveridge. | |
if(document.location.href.match('board=')&&!document.location.href.match('action=')) { | |
var table_cells = document.getElementsByTagName('td'), | |
create_cell_click_fn = function(href) { | |
return function() { if (!window.pb_bubble) { window.location.href = href; } }; | |
}, | |
cell, is_topic_cell, has_new_post, new_post_href, best_post_href, last_post_cell, last_post_groups, last_post_href; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'formula' | |
class GitFlowCompletion < Formula | |
homepage 'https://github.com/bobthecow/git-flow-completion' | |
url 'https://github.com/bobthecow/git-flow-completion/tarball/0.4.1.0' | |
md5 '95c05d1a278c1c41067bd7cc6c281ecd' | |
head 'https://github.com/bobthecow/git-flow-completion.git', :branch => 'develop' | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Function: getRandomId | |
* Generates a unique-ish hex string between 1 and 32 characters long. | |
*/ | |
rrandomidreplace : /x/g, | |
getRandomId : function(length) { | |
length = length && length > 0 && length <= 32 ? length : 32; | |
function getHexChar() { | |
var r = Math.random()*16|0; | |
return r.toString(16); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# prompt including cwd, username, hostname, git branch # | |
export PS1="\[\e[0;32m\]\u\[\e[m\]\[\e[1;33m\]@\[\e[m\]\[\e[1;32m\]\h\[\e[m\]\[\e[0;33m\]:\[\e[m\]\[\e[1;37m\]\w\[\e[m\] \[\e[0;33m\]\$(git branch 2> /dev/null | grep -e '\* ' | sed 's/^..\(.*\)/{\1} /')\[\e[0;35m\]$ \[\e[m\]" | |
export SUDO_PS1="\[\e[0;32m\]\u\[\e[m\]\[\e[1;33m\]@\[\e[m\]\[\e[1;32m\]\h\[\e[m\]\[\e[0;33m\]:\[\e[m\]\[\e[1;37m\]\w\[\e[m\] \[\e[0;33m\]\$(git branch 2> /dev/null | grep -e '\* ' | sed 's/^..\(.*\)/{\1} /')\[\e[0;35m\]$ \[\e[m\]" | |
# terminal colors # | |
export CLICOLOR='true' |
NewerOlder