Skip to content

Instantly share code, notes, and snippets.

@cdwilson
cdwilson / keybase.md
Created March 31, 2019 00:54
Keybase proof

Keybase proof

I hereby claim:

  • I am cdwilson on github.
  • I am cdwilson (https://keybase.io/cdwilson) on keybase.
  • I have a public key ASAfS3DmPJyhSnWuak37rea-Kof7Xk9MKuArM-5Dy0z99wo

To claim this, I am signing this object:

@cdwilson
cdwilson / build_gerbv_macos.sh
Last active July 28, 2018 05:53
How to build gerbv on macOS (with dependencies from MacPorts)
# install gerbv & dependencies using MacPorts
sudo port install gerbv stow
# uninstall MacPorts gerbv since we're going to build it ourselves from source
sudo port uninstall gerbv
# clone gerbv source
git clone git://git.geda-project.org/gerbv.git
# build gerbv
@cdwilson
cdwilson / test_gist.rb
Created August 24, 2014 20:32
Test Gist
def foo
puts 'foo'
end
# Adapted from http://brettterpstra.com/2014/01/20/open-together-notes-in-marked/
# Save as ~/Library/Scripts/Applications/Together 3/Open Note in Marked.applescript
tell application "Together 3"
set _sel to selected items
repeat with _note in _sel
set _file to original filename of _note
tell application "Marked" to open POSIX path of _file
tell application "Marked" to activate
end repeat
end tell
@cdwilson
cdwilson / python_tips_and_tricks.rst
Last active May 18, 2016 04:36
Python tips and tricks
@cdwilson
cdwilson / clone_vm.sh
Created November 20, 2012 20:27
Clone a VM on VMware ESXi with a thin vmdk
#!/bin/sh
# modified from script found at http://serverfault.com/questions/311459/how-to-backup-virtual-machines-on-a-standalone-esxi-host to allow VMs with spaces in the file name
if [ $# != 2 ]; then
echo "Usage: $(basename $0) <SOURCE VM PATH> <DESTINATION PATH>"
echo
echo " 1) Only works with VMs with a single .vmdk"
echo " 2) VM must be powered off"
echo " 3) VM must have no active snapshots"
@cdwilson
cdwilson / byobu_mountain_lion.txt
Created October 14, 2012 19:17
byobu on Mountain Lion
byobu requires the newt python libraries, however the libnewt provided by Macports is configured with the "--without-python" flag.
Since we only need the python .so's, we can just build newt and copy the python bits by hand into the Macports python directories.
- sudo port install coreutils gsed python2.7
- Make sure the depends_lib from https://trac.macports.org/browser/trunk/dports/devel/libnewt/Portfile are installed (i.e. sudo port install gettext popt tcl slang2)
- cd ~/Downloads
- Download https://fedorahosted.org/releases/n/e/newt/newt-0.52.14.tar.gz
- tar zxvf newt-0.52.14.tar.gz
- cd newt-0.52.14
@cdwilson
cdwilson / vmware_tools_upgrade.sh
Created August 27, 2012 22:00
Upgrade VMware tools on Ubuntu
sudo ./vmware-install.pl --default --clobber-kernel-modules=vmxnet3,pvscsi,vmmemctl
@cdwilson
cdwilson / virtualenv_setup.sh
Created August 26, 2012 21:49
virtualenv setup
# virtualenv
# http://pypi.python.org/pypi/virtualenv
# virtualenvwrapper
# http://pypi.python.org/pypi/virtualenvwrapper
# http://blog.doughellmann.com/2010/01/virtualenvwrapper-tips-and-tricks.html
# yolk
# http://pypi.python.org/pypi/yolk
@cdwilson
cdwilson / macports_mspgcc.sh
Created August 12, 2012 00:39
Install mspgcc toolchain on Mac OSX via MacPorts
sudo port install -v msp430-binutils-devel msp430-gcc-devel msp430-gdb-devel msp430-libc-devel msp430mcu-devel srecord mspdebug