Skip to content

Instantly share code, notes, and snippets.

@cdwilson
cdwilson / Folder Preferences
Created August 4, 2012 02:47 — forked from chrisyour/Folder Preferences
Show hidden files and hidden folders (except .git) in your TextMate project drawer
# Want to show hidden files and folders in your TextMate project drawer? Simple, just modify the file and folder patterns in TextMate's preferences.
# Instructions:
# Go to TextMate > Preferences...
# Click Advanced
# Select Folder References
# Replace the following:
# File Pattern (original)
@cdwilson
cdwilson / reinstall.md
Created July 30, 2012 23:52
Reinstall OSX Tips and Tricks
@cdwilson
cdwilson / setup_bridged_vpn.sh
Created July 7, 2012 21:49
Setup Bridged VPN on Ubuntu
#!/bin/sh
# Ubuntu 12.04
# https://help.ubuntu.com/12.04/serverguide/openvpn.html
# don't actually run this as a script
exit 0
# setup airport to port forward 1194 to OpenVPN server
@cdwilson
cdwilson / setup_jenkins_ci.sh
Created July 7, 2012 21:17
Setup Jenkins CI on Ubuntu
#!/bin/sh
# http://pkg.jenkins-ci.org/debian/
# https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins+on+Ubuntu
wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -
sudo sh -c 'echo deb http://pkg.jenkins-ci.org/debian binary/ > /etc/apt/sources.list.d/jenkins.list'
sudo aptitude update
sudo aptitude install jenkins
@cdwilson
cdwilson / setup_apc_ups.sh
Created July 7, 2012 19:55
Setup APC USB UPS on Ubuntu
#!/bin/sh
# https://help.ubuntu.com/community/apcupsd
# don't actually run this
exit 0
# install apcupsd
sudo apt-get -y install apache2 apcupsd apcupsd-cgi
@cdwilson
cdwilson / build_libusb_lion_64bit.sh
Created April 6, 2012 23:29
Rebuild libusb for OSX Lion 64-bit
#!/bin/sh
# If you're getting errors like:
#
# dyld: Library not loaded: /usr/local/lib/libusb-1.0.0.dylib
# Referenced from: /Users/cwilson/stow/bin/JLinkExe
# Reason: no suitable image found. Did find:
# /opt/local/lib/libusb-1.0.0.dylib: mach-o, but wrong architecture
# Trace/BPT trap: 5
@cdwilson
cdwilson / install-clearsilver-0.10.5-lion.sh
Created April 6, 2012 17:21
How to install Clearsilver-0.10.5 on Mac OSX Lion
#!/bin/sh
tar zxvf tar xzvf clearsilver-0.10.5.tar.gz
cd clearsilver-0.10.5
./configure --disable-apache --disable-java --disable-ruby \
--disable-csharp \
--with-python=/usr/bin/python \
--with-perl=/usr/bin/perl \
--enable-gettext \
--prefix=/stow/repository/clearsilver-0.10.5
@cdwilson
cdwilson / fix_mail_sort_descending.sh
Created January 22, 2012 00:53
Fix mail.app plists to sort all mailboxes by date in descending order
#!/bin/bash
: ${MAILDIR:="$HOME/Library/Mail"}
find "$MAILDIR" -type f -name Info.plist -print0 | xargs -0 perl -i -pe 'BEGIN{undef $/;} s/\t<key>SortedDescending<\/key>\n\t<string>NO<\/string>/\t<key>SortedDescending<\/key>\n\t<string>YES<\/string>/smg'
@cdwilson
cdwilson / build.sh
Created December 18, 2011 11:17
Build the latest mspgcc toolchain on Mac OSX Lion
#!/bin/sh
# adapted from http://code.google.com/p/osx-launchpad/source/browse/build.sh
# to build using MacPorts and install via GNU Stow
set -e
# Force root
if [ $EUID -ne 0 ]; then
echo "You must be root"
@cdwilson
cdwilson / null.c
Created December 18, 2011 11:11
Example mspgcc null source
#include <msp430.h>
int main(void)
{
return 0;
}