Skip to content

Instantly share code, notes, and snippets.

# svn recipes by http://github.com/htxt
# Remove deleted files
svn status | grep '\!' | awk '{print $2;}' | xargs svn rm
# Add all new files
svn add * --force
# Recursively remove .svn directories
rm -rf `find . -type d -name .svn`
# Tar a subversion working copy...without all those hidden directories!
tar --exclude='.svn' -c -f /path/to/file.tar /path/to/directory
# sync svn working copy and remote repository (auto adding new files)
# Lists the local files that are not present in the remote repository (lines beginning with ?)
# and add them.
svn status | grep '^?' | awk '{ print $2; }' | xargs svn add
# vi keybindings with info
# Info has some of the worst keybindings I've ever seen. Being a vim user, I attribute that to emacs influence. Use the --vi-keys option to # use some of the vi keybindings, although this won't change all the keybindings. Use the "infokey" program to have more control over info # keybindings.
info --vi-keys
# Refresh bash configuration
# http://www.commandlinefu.com/commands/view/1977/refresh-bash-configuration
source ~/.bashrc
alias mkdd='mkdir $(date +%Y%m%d)'
# create and check out a temporary branch at the location of the bad merge
git checkout -b tmpfix <sha1-of-merge>
# remove the incorrectly added file
git rm somefile.orig
# commit the amended merge
git commit --amend
# go back to the master branch
Make changes to .bash_profile and need to update the current session?
$ source .bash_profile
With the above command, the user does not have to logout.
package com.centerkey.utils;
import java.lang.reflect.Method;
import javax.swing.JOptionPane;
import java.util.Arrays;
/**
* <b>Bare Bones Browser Launch for Java</b><br>
* Utility class to open a web page from a Swing application
* in the user's default browser.<br>
@ptrv
ptrv / sclang.sc
Created December 7, 2009 12:12
supercollider config file on linux
GUI.swing;
SwingOSC.program = "/home/peter/scwork/SwingOSC.jar";
//SwingOSC.program = "/usr/lib/jvm/java-6-sun-1.6.0.15/jre/bin/java -Xmx64m -jar /home/peter/scwork/SwingOSC.jar";
g = SwingOSC.default;
g.waitForBoot({
Server.local.makeGui;
HelperWindow.new.minimize;