Skip to content

Instantly share code, notes, and snippets.

View rbarraud's full-sized avatar

Roger Barraud rbarraud

  • Robar Systems (New Zealand)
  • Up a Mountain, of course - just like all good Guru's should be ;-) - Wellington, New Zealand
View GitHub Profile

Case for Bus Pirate v3.6 (Dangerous Prototypes/Seeedstudio version)

Case for Bus Pirate v3.6

This is a case for the Bus Pirate v3.6 from Dangerous Prototypes as listed on Thingiverse to be printed on a 3D printer.

In order to compile this file to an STL you'll need OpenSCAD and also the file oshw.scad which you can find here on Thingiverse.

# Our simple example of a Turnstile state machine.
class Turnstile
def initialize
@state = "Locked"
end
def push!
@state = "Locked" if unlocked?
end
@rbarraud
rbarraud / hello_macho64
Created January 27, 2015 23:50
Hello_dump_macho64
# Assembly output for main.c
# Generated at 1:16:05 am on Wednesday, January 28, 2015
# Using Debug configuration, x86_64 architecture for hello_test_macho64 target of hello_test_macho64 project
.section __TEXT,__text,regular,pure_instructions
.section __DWARF,__debug_info,regular,debug
Lsection_info:
.section __DWARF,__debug_abbrev,regular,debug
Lsection_abbrev:
.section __DWARF,__debug_aranges,regular,debug
@rbarraud
rbarraud / hello_macho64__release
Created January 28, 2015 00:23
Hello_dump_macho64
# Assembly output for main.c
# Generated at 1:22:35 pm on Wednesday, January 28, 2015
# Using Release configuration, x86_64 architecture for hello_test_macho64 target of hello_test_macho64 project
.section __TEXT,__text,regular,pure_instructions
.section __DWARF,__debug_info,regular,debug
Lsection_info:
.section __DWARF,__debug_abbrev,regular,debug
Lsection_abbrev:
.section __DWARF,__debug_aranges,regular,debug
use32
UMB_START = 0x00100000
org UMB_START
MB_MAGIC = 1BADB002h
MB_F_BOOTALIGNED = 1
MB_F_MEMINFO = (1 shl 1)
MB_F_VIDEOTABLE = (1 shl 2)
MB_F_USE_MBOFFSETS = (1 shl 16)
MB_FLAGS = MB_F_BOOTALIGNED or MB_F_MEMINFO or \
BTW some context re. Wired...
http://archive.wired.com/wired/archive/3.06/xanadu.html
http://en.wikipedia.org/wiki/Ted_Nelson
http://www.internettime.com/2010/10/ted-nelsons-unbook/
http://c2.com/cgi/wiki?TedNelson
http://www.ics.uci.edu/~ejw/csr/nelson_pg.html
@rbarraud
rbarraud / supervisord.service
Created March 15, 2017 07:04 — forked from tonyseek/supervisord.service
Running supervisord with systemd.
[Unit]
Description=supervisord - Supervisor process control system for UNIX
Documentation=http://supervisord.org
After=network.target
[Service]
Type=forking
ExecStart=/usr/bin/supervisord -c /etc/supervisord.conf
ExecReload=/usr/bin/supervisorctl reload
ExecStop=/usr/bin/supervisorctl shutdown
@rbarraud
rbarraud / 20160101_freebsd_build_upgrade_via_source.md
Created May 7, 2017 10:06 — forked from dch/20160101_freebsd_build_upgrade_via_source.md
freebsd upgrade using git or svn source & making a low-fat bootable image aka memstick

overview

FreeBSD OS upgrades are done in 3 phases:

  • install new kernel
  • install new userland
  • upgrade all packages

Around these 3 stages, we use zfs snapshot and a git snapshot of /etc to make rollback and diffing any releases easier. freebsd-version -ku has been used

@rbarraud
rbarraud / colortest.py
Created June 19, 2017 04:38 — forked from justinabrahms/colortest.py
Small utility to test terminal support for 256-color output.
#!/usr/bin/env python
# Ported to Python from http://www.vim.org/scripts/script.php?script_id=1349
print "Color indexes should be drawn in bold text of the same color."
print
colored = [0] + [0x5f + 40 * n for n in range(0, 5)]
colored_palette = [
"%02x/%02x/%02x" % (r, g, b)
for r in colored
;; Compiling form (DEFMETHOD DECOMPRESS ((OUTPUT STREAM) (STATE DECOMPRESSION-STATE) (INPUT STREAM) ...) ...).
Unable to REQUIRE module PNG-READ.
Available restarts:
20800043F000 80F8B942 SYSTEM.INTERNALS::BACKTRACE
20800043F090 80F84AEC (LAMBDA :IN SYSTEM.INTERNALS::ENTER-DEBUGGER)
20800043F560 8016CDD1 SYSTEM.INTERNALS::%WITH-STANDARD-IO-SYNTAX
20800043F820 80F8AC74 SYSTEM.INTERNALS::ENTER-DEBUGGER
20800043F840 80F7E54D INVOKE-DEBUGGER
20800043F8B0 80F7A430 ERROR
20800043F990 801F29DD REQUIRE