Skip to content

Instantly share code, notes, and snippets.

@cdwilson
cdwilson / Makefile
Created December 18, 2011 11:11
Example mspgcc Makefile for null app
#
# Makefile for msp430
#
# 'make' builds everything
# 'make clean' deletes everything except source files and Makefile
# You need to set TARGET, MCU and SOURCES for your project.
# TARGET is the name of the executable file to be produced
# $(TARGET).elf $(TARGET).hex and $(TARGET).txt nad $(TARGET).map are all generated.
# The TXT file is used for BSL loading, the ELF can be used for JTAG use
#
@cdwilson
cdwilson / windows7_toggle_driver_signing
Created December 3, 2011 19:40
Enable / disable driver signing in Windows 7
bcdedit -set loadoptions DISABLE_INTEGRITY_CHECKS
bcdedit -set TESTSIGNING ON
bcdedit /deletevalue loadoptions
bcdedit -set TESTSIGNING OFF
@cdwilson
cdwilson / gist:1344165
Created November 7, 2011 04:19
Enable 9650SE-2LP RAID controller on VMware ESXi 5.0.0
# download 3ware 9650SE-2LP vib from http://kb.lsi.com/KnowledgebaseArticle15753.aspx#vmware
# ftp://tsupport:[email protected]/private/3Ware/kbarticledrivers/scsi-3w-9xxx-3.26.08.036-1OEM.500.0.0.406165.x86_64.vib
# Upload the vib to the datastore on the ESXi host
# Put the ESXi host into maintenance mode
# Enable ssh on the ESXi host from within vSphere Client
# ssh to the ESXi host and run:
@cdwilson
cdwilson / start_tftp_server.sh
Created November 3, 2011 01:00
Start tftp server on OSX
#!/bin/sh
# files go into /private/tftpboot/
sudo launchctl load -F /System/Library/LaunchDaemons/tftp.plist
sudo launchctl start com.apple.tftpd
@cdwilson
cdwilson / add_empty_dirs.sh
Created October 7, 2011 17:27 — forked from justinfrench/Recursively add .gitignore files to empty dirs
Add .gitignore to empty directories
#!/bin/sh
# Recursively add a .gitignore file to all directories
# in the working directory which are empty and don't
# start with a dot. Helpful for tracking empty dirs
# in a git repository.
for i in $(find . -type d -regex ``./[^.].*'' -empty); do touch $i"/.gitignore"; done;
@cdwilson
cdwilson / progressbar.exp
Created June 22, 2011 21:41
progress bar in expect
#!/usr/bin/expect
set total 10
proc progress {cur tot} {
# if you don't want to redraw all the time, uncomment and change ferquency
#if {$cur % ($tot/300)} { return }
# set to total width of progress bar
set total 74
@cdwilson
cdwilson / clearsilver_cherokee_arm_linux_setup.sh
Created June 12, 2011 00:08
clearsilver and cherokee setup for ARM linux
# using DigiEL 5.2 Rev B
# del_toolchain comes with python 2.5.1 (http://www.python.org/download/releases/2.5.1/) cross-compile patch, and builds for host and target..."that was easy!"
export STEELYARD_TOOLCHAIN="$HOME/src/steelyard_toolchain"
cd $STEELYARD_TOOLCHAIN/del_toolchain/packages/python/
make
make install
@cdwilson
cdwilson / sl_rails_setup.sh
Created June 7, 2011 17:33
Snow Leopard Rails setup
#!/bin/sh
if [ `whoami` != root ]; then
echo Please run this script as root or using sudo
exit
fi
port selfupdate
port upgrade outdated
port upgrade sqlite3
@cdwilson
cdwilson / submit_patch_help.md
Created May 22, 2011 19:26
Submit patches to git
@cdwilson
cdwilson / ups
Created May 8, 2011 22:33
ubuntu apache config for ups virtual host - /etc/apache2/conf.d/ups
<VirtualHost *:80>
ServerName ups.cdwilson.us
ServerAdmin [email protected]
DocumentRoot /usr/lib/cgi-bin/apcupsd/
<Directory /usr/lib/cgi-bin/apcupsd/>
Options FollowSymLinks ExecCGI
AddHandler cgi-script cgi
DirectoryIndex multimon.cgi
</Directory>