Skip to content

Instantly share code, notes, and snippets.

@csammis
csammis / vimrc
Last active September 28, 2017 02:13
My vimrc - used for gvim on Win7 and Macvim on OS X
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Preamble: OS detection, path setup, local functions
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
if !exists("g:os")
if has("win64") || has("win32")
let g:os = "Windows"
let g:VIMHOME = $HOME . "/_vim/"
else
let g:os = substitute(system('uname'), '\n', '', '')
let g:VIMHOME = $HOME . "/.vim/"
@csammis
csammis / main.map
Created January 20, 2016 15:40
Linker map generated by MSPGCC
/usr/local/msp430-uniarch-20110716/bin/msp430-gcc main.o -mmcu=msp430g2231 -Wl,-M -L /usr/local/msp430-uniarch-20110716/include -o main.elf
Archive member included because of file (symbol)
/usr/local/msp430-uniarch-20110716/lib/gcc/msp430/4.5.3/libgcc.a(_divmodsi4.o)
main.o (__divmodsi4)
/usr/local/msp430-uniarch-20110716/lib/gcc/msp430/4.5.3/libgcc.a(_udivmodsi4.o)
/usr/local/msp430-uniarch-20110716/lib/gcc/msp430/4.5.3/libgcc.a(_divmodsi4.o) (__udivmodsi4)
/usr/local/msp430-uniarch-20110716/lib/gcc/msp430/4.5.3/libcrt0.a(_reset_vector__.o)
/usr/local/msp430-uniarch-20110716/lib/gcc/msp430/4.5.3/crt0ivtbl16.o (_reset_vector__)
/usr/local/msp430-uniarch-20110716/lib/gcc/msp430/4.5.3/libcrt0.a(__init_stack.o)
@csammis
csammis / main.map
Last active January 20, 2016 15:37
Linker map generated by TI msp430-gcc
~/Projects/ti/gcc/bin/msp430-elf-gcc main.o -mmcu=msp430g2231 -Wl,-M -L ~/Projects/ti/gcc/include -T msp430g2231.ld -o main.elf
Archive member included to satisfy reference by file (symbol)
/Users/csammis/Projects/ti/gcc/bin/../lib/gcc/msp430-elf/5.2.1/430/libgcc.a(lib2divSI.o)
main.o (__mspabi_divli)
/Users/csammis/Projects/ti/gcc/bin/../lib/gcc/msp430-elf/5.2.1/430/libgcc.a(epilogue.o)
/Users/csammis/Projects/ti/gcc/bin/../lib/gcc/msp430-elf/5.2.1/430/libgcc.a(lib2divSI.o) (__mspabi_func_epilog_6)
/Users/csammis/Projects/ti/gcc/bin/../lib/gcc/msp430-elf/5.2.1/430/libgcc.a(_udivdi3.o)
/Users/csammis/Projects/ti/gcc/bin/../lib/gcc/msp430-elf/5.2.1/430/libgcc.a(lib2divSI.o) (__mspabi_divull)
/Users/csammis/Projects/ti/gcc/bin/../lib/gcc/msp430-elf/5.2.1/430/libgcc.a(_lshrdi3.o)
@csammis
csammis / Math.random in code under test
Last active August 29, 2015 14:14
Jasmine description demonstrating random-with-tolerance test
// Choose the RHS from among the production choices
if (system[rule].productions[0].probability == 1.0) {
rhs = system[rule].productions[0].rhs;
} else {
var choice = Math.random();
var last = 0.0;
for (var i = 0; i < system[rule].productions.length; i++) {
if (choice >= last && choice < (last + system[rule].productions[i].probability)) {
rhs = system[rule].productions[i].rhs;
break;
@csammis
csammis / gist:5090914
Last active December 14, 2015 13:08
zoomin' circles
<div id="drawing">
<h1>Drawing stuff</h1>
<canvas id="canvas" width="400" height="400" style="border:1px solid #d3d3d3;"></canvas>
<script language="javascript">
var zoomingcircles =
{
start : function ()
{
var context = this.getContext();