Skip to content

Instantly share code, notes, and snippets.

View alexjh's full-sized avatar

Alex Harford alexjh

  • Vancouver, BC
View GitHub Profile
@alexjh
alexjh / bash-bug.md
Created January 10, 2014 21:25
Very annoying subtle bug!

This line was used to create a timestamp in /etc/rc.sysinit

echo $(($(date +'%s * 1000 + %N/1000000'))) > /tmp/timestamp

It created a very subtle bug, can you spot it?

The proper solution:

echo $(($(date +%s%N)/1000000))

@alexjh
alexjh / KoBo N647B Console
Created January 17, 2014 02:09
Dump of a Kobo model N647B
U-Boot 2009.01-rc1-dirty-svn ( 9月 02 2011 - 20:10:59)
Marvell version: 1.1.1.1 PXAxxx
I2C: ready
DRAM: 128 MB
MMC: SD2_CMD MFP_X=0x00004c41
pxa-sdh0: 0 ,pxa-sdh1: 1
Using default environment

Keybase proof

I hereby claim:

  • I am alexjh on github.
  • I am alexh (https://keybase.io/alexh) on keybase.
  • I have a public key whose fingerprint is 9B6E 4ABB EDF6 904B 8C38 6BCE 5E52 77E3 5253 AFE0

To claim this, I am signing this object:

#![feature(asm, lang_items, unwind_attributes, abi_avr_interrupt)]
#![no_std]
#![no_main]
extern crate arduino;
use arduino::*;
use core::ptr::write_volatile;
use core::ptr::read_volatile;