Skip to content

Instantly share code, notes, and snippets.

View pingswept's full-sized avatar

Brandon Stafford pingswept

  • Tufts University
  • Somerville, Massachusetts, USA
View GitHub Profile
@pingswept
pingswept / replace.md
Last active September 3, 2015 13:52
things
  • cutting boards (have 3, all stained and worn out)
  • knives (have 1 good, small, serrated knife (orange handle))
  • sand floor near front door
  • refrigerator: loud, handle loose, shelves cracked
  • creepy lights in downstairs bathroom
  • lights under counter edge in kitchen
  • powerwash deck, or at least somehow make less slippery (especially stairs outside dining room)
@pingswept
pingswept / travel-checklist.markdown
Last active August 29, 2015 14:24
Travel checklist

Clothes

  • t-shirts
  • cotton shorts
  • synthetic shorts
  • pants
  • belt
  • sleeping shirts
  • boxers
  • synthetic socks not for running
@pingswept
pingswept / minimal.py
Last active August 29, 2015 14:18 — forked from clouetb/minimal.py
#!/usr/bin/python
from pruio import *
from time import sleep
# Create a ctypes *pointer* to the pruio structure
io = pruio_new(PRUIO_DEF_ACTIVE, 0, 0, 0)
# Note the *pointer* dereferencing using the contents member
if not io.contents.Errr:
pruio_config(io, 1, 0, 0, 0)
for i in range(4):
@pingswept
pingswept / dmesg-jessie-2015-02-15
Last active August 29, 2015 14:16
dmesg-jessie-2015-02-15
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Initializing cgroup subsys cpuacct
[ 0.000000] Linux version 3.14.33-ti-r51 (root@a6-imx6q-wandboard-2gb) (gcc version 4.9.1 (Debian 4.9.1-19) ) #1 SMP PREEMPT Fri Feb 20 17:38:44 UTC 2015
[ 0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] Machine model: TI AM335x BeagleBone Black
[ 0.000000] cma: CMA: reserved 24 MiB at 9e000000
[ 0.000000] Memory policy: Data cache writeback
@pingswept
pingswept / kernel_crash.txt
Last active August 29, 2015 14:15
kernel crash
From kernel: Linux templeman 3.8.13-bone50 #1 SMP Tue May 13 13:24:52 UTC 2014 armv7l GNU/Linux
Message from syslogd@templeman at Feb 12 22:21:11 ...
kernel:[ 428.278110] Internal error: Oops: 17 [#1] SMP THUMB2
Message from syslogd@templeman at Feb 12 22:21:11 ...
kernel:[ 428.360264] Process swapper/0 (pid: 0, stack limit = 0xc0824240)
Message from syslogd@templeman at Feb 12 22:21:11 ...
@pingswept
pingswept / supervisor-test.py
Created January 9, 2015 20:14
Test script for Supervisord logging
#!/usr/bin/python
import datetime
from time import sleep
import sys
while(1):
sys.stdout.write('The time is now: {0}\n'.format(datetime.datetime.now()))
sys.stdout.flush()
sleep(5)
@pingswept
pingswept / postgis-build.sh
Created December 10, 2014 23:00
Spew from building PostGIS 2.0.6 on Beaglebone Black
root@rascal-orange:/usr/local/postgis-2.0.6# ./configure
checking build system type... armv7l-unknown-linux-gnueabihf
checking host system type... armv7l-unknown-linux-gnueabihf
checking how to print strings... printf
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
@pingswept
pingswept / strace-of-headlessMonitor-2014-12-05.c
Last active August 29, 2015 14:11
strace-of-headlessMonitor-2014-12-05.c
rt_sigaction(SIGINT, {SIG_IGN, [], SA_RESTORER, 0xb6d81ac1}, {0xd50f9, [], SA_RESTORER, 0xb6d81ac1}, 8) = 0
rt_sigaction(SIGQUIT, {SIG_IGN, [], SA_RESTORER, 0xb6d81ac1}, {SIG_DFL, [], SA_RESTORER, 0xb6d81ac1}, 8) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
clone(child_stack=0, flags=CLONE_PARENT_SETTID|SIGCHLD, parent_tidptr=0xbeb5f778) = 1146
wait4(1146, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 1146
rt_sigaction(SIGINT, {0xd50f9, [], SA_RESTORER, 0xb6d81ac1}, NULL, 8) = 0
rt_sigaction(SIGQUIT, {SIG_DFL, [], SA_RESTORER, 0xb6d81ac1}, NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=1146, si_uid=0, si_status=0, si_utime=0, si_stime=2} ---
select(0, NULL, NULL, NULL, {5, 0}) = 0 (Timeout)
@pingswept
pingswept / uluvart.ino
Created December 1, 2014 21:15
Test code for U-LUV-ART
#include <Adafruit_NeoPixel.h>
#define PIN 6
// Parameter 1 = number of pixels in strip
// Parameter 2 = Arduino pin number (most are valid)
// Parameter 3 = pixel type flags, add together as needed:
// NEO_KHZ800 800 KHz bitstream (most NeoPixel products w/WS2812 LEDs)
// NEO_KHZ400 400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers)
// NEO_GRB Pixels are wired for GRB bitstream (most NeoPixel products)
@pingswept
pingswept / voltage-shield.html
Last active August 29, 2015 14:10
Demo of Precision Voltage Shield on Rascal
<!DOCTYPE html>
<html>
<head>
<title>Battery Voltage</title>
{% include "include/rascal-head.html" %}
<style>
#chart1 {
margin-top: 20px;
margin-left: -40px;
height: 400px;