Skip to content

Instantly share code, notes, and snippets.

View sbchisholm's full-sized avatar

Stephen Chisholm sbchisholm

View GitHub Profile
int ledPins[] = {2,3,4,5,6,7,8,9};
int ledCount = 8;
void setup() {
for (int i = 0; i < ledCount; i++)
pinMode(ledPins[i], OUTPUT);
}
void loop() {
oneAfterAnotherNoLoop();
@sbchisholm
sbchisholm / .vimrc
Last active December 14, 2015 01:29
vimrc
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim/
call vundle#rc()
" let Vundle manage Vundle
" required!
Bundle 'gmarik/Vundle.vim'
/* ---------------------------------------------------------
* | Arduino Experimentation Kit Example Code |
* | CIRC-05 .: 8 More LEDs :. (74HC595 Shift Register) |
* ---------------------------------------------------------
*
* We have already controlled 8 LEDs however this does it in a slightly
* different manner. Rather than using 8 pins we will use just three
* and an additional chip.
*
*
hardstatus alwayslastline "%{b}[%{B}%H%{b}][%{k}%?%-Lw%?%{b}(%{R}%n %t%?(%u)%?%{b})%{k}%?%+Lw%?%?%= %{b}][%{B}%d/%m %{k}%C%{b}]"
msgwait 1
vbell off
scrollback 3000
@sbchisholm
sbchisholm / backup.py
Last active December 15, 2015 23:19
Backs up the files/folders according to the configuration in config.json. Will send an reporting the success or failure of the rsyncs.
#!/usr/bin/python
#
# Backs up the files/folders according to the configuration in config.json. Will
# send an reporting the success or failure of the rsyncs.
import json, os, smtplib, ast, datetime
from email.mime.text import MIMEText
def email_backup_failures(config, failed_backups, failed = True):
# build message body
@sbchisholm
sbchisholm / config.json
Created April 8, 2013 18:04
backup configuration
{
"backup_sources": [
"/home/username/Documents",
"/home/username/Mail"
],
"rsync_excludes": "",
"backup_server_location": "/mnt/backup",
"log_file": "log/backup.log",
"log_file_path_relative": true,
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
hardstatus alwayslastline "%{b}[%{B}%H%{b}][%{k}%?%-Lw%?%{b}(%{R}%n %t%?(%u)%?%{b})%{k}%?%+Lw%?%?%= %{b}][%{B}%d/%m %{k}%C%{b}]"
msgwait 1
vbell off
shell "/bin/bash"
scrollback 3000
diff --git a/ansi.c b/ansi.c
index d88e153..088ab0b 100644
--- a/ansi.c
+++ b/ansi.c
@@ -193,6 +193,7 @@ register struct win *p;
p->w_insert = 0;
p->w_revvid = 0;
p->w_mouse = 0;
+ p->w_mouse_protocol = 0;
p->w_curinv = 0;
@sbchisholm
sbchisholm / log
Created July 29, 2014 13:13
backtrace
Warning: could not import Base.foldl into NumericExtensions
Warning: could not import Base.foldr into NumericExtensions
Warning: could not import Base.sum! into NumericExtensions
Warning: could not import Base.maximum! into NumericExtensions
Warning: could not import Base.minimum! into NumericExtensions
ERROR:
in abstract_call_gf at inference.jl:605
in abstract_call at inference.jl:701
in abstract_eval_call at inference.jl:789
in abstract_eval at inference.jl:814