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 / 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;
### Keybase proof
I hereby claim:
* I am pingswept on github.
* I am brandonstafford (https://keybase.io/brandonstafford) on keybase.
* I have a public key whose fingerprint is 96E3 30F7 534B B328 14BD 92AF F3B1 AADE 8B45 35C0
To claim this, I am signing this object:
@pingswept
pingswept / smack-blog.py
Last active August 29, 2015 14:03
Code for monitoring the 3D printers at Happy Workhorse Farms
# Add in cat /etc/supervisor/conf.d/smack-blog.conf
#
# [program:smack-blog]
# command=/root/smack-blog.py
#!/usr/bin/python
import Adafruit_BBIO.UART as UART
import os, pytumblr, serial, time
@pingswept
pingswept / evolver.py
Last active August 29, 2015 14:02
Skeleton of Python code for Evolver
import time
TUBES = range(1,49)
while(1):
ReadOpticalSensors()
ReadTemperatures()
ReadFluidFlowStatus()
(speeds, temps, flows) = DecideExperimentSpecificStuff() # This is where the custom stuff goes!