Skip to content

Instantly share code, notes, and snippets.

@williscool
williscool / p4merge
Created August 24, 2012 20:18 — forked from henrik242/p4merge
Helper script for p4merge and Git on MacOSX
#!/bin/bash
for arg; do [[ $arg = /* ]] || arg=$PWD/$arg; absargs+=("$arg"); done;
/Applications/p4merge.app/Contents/Resources/launchp4merge "${absargs[@]}"
@williscool
williscool / .gitconfig
Last active January 20, 2021 07:29
Standard Global gitconfig
[user]
name = William <REDACTED>
email = <REDACTED>
[color]
ui = true
branch = true
diff = true
status = true
log = true
[alias]
@williscool
williscool / useful_commands.md
Last active October 30, 2023 11:31
Commands that I've found to be useful. Mostly general command line, bash, and rails stuff

Useful commands:

TODO: rearrange this to bottom = oldest and top = newst (2-27-2020) below dashed line

fix tmux resurrect

ln -f -s $(/bin/ls -t tmux_resurrect_*.txt | head -n 1) last

tmux useful comands

@williscool
williscool / .bashrc
Last active April 27, 2018 01:20
my general bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# enable forward search
# http://ruslanspivak.com/2010/11/25/bash-history-incremental-search-forward/
# https://bugs.launchpad.net/ubuntu/+source/bash/+bug/80635/comments/12
stty -ixon
$graph = {a: [:b, :c], b: [:d, :e], c: [:f, :g]}
def dfs_nr(node)
queue = [node]
seen = {}
while queue.size > 0
node = queue.pop
puts node
seen[node] = true
if $graph[node]
@williscool
williscool / testapp.js
Created April 6, 2011 17:38
Testing out a vhost setup
// Expose modules in ./support for demo purposes
/**
* Module dependencies.
*/
var express = require('express');
// Edit /etc/vhosts