Skip to content

Instantly share code, notes, and snippets.

View matthewrankin's full-sized avatar

Matthew Rankin matthewrankin

  • Independence, MO
View GitHub Profile
@davidvthecoder
davidvthecoder / round.go
Created April 9, 2014 19:58
Arggh Golang does not include a round function in the standard math package. So I wrote a quick one.
package main
import (
"log"
"math"
)
func Round(val float64, roundOn float64, places int ) (newVal float64) {
var round float64
pow := math.Pow(10, float64(places))
@kitmonisit
kitmonisit / instrument.py
Created April 4, 2012 13:42
Controlling a GPIB instrument with Python and pyVISA
import time
import datetime
import visa
import numpy as np
class YokogawaWT1600(visa.GpibInstrument):
__GPIB_ADDRESS = 2
def __init__(self, reset=True):
visa.GpibInstrument.__init__(self, self.__GPIB_ADDRESS, timeout=3)
@devth
devth / .vimrc
Created June 14, 2011 22:10
A simple presentation-mode starting point for vim using the solarized light colorscheme: http://ethanschoonover.com/solarized
" Presentation colors and config
function! PresentationMode()
colorscheme solarized
set bg=light
set nolist
endfunction
nmap <leader>PR :call PresentationMode()<cr>
@adamstac
adamstac / TODO
Created February 11, 2011 18:50
A Rubyist’s guide to setting up a Mac OS X development environment using Homebrew, RVM, Git and Bundler
* Review this article and add new steps as needed: http://blog.therubymug.com/blog/2010/05/20/the-install-osx.html