Skip to content

Instantly share code, notes, and snippets.

Alex Harford alexjh

  • Vancouver, BC
Block or report user

Report or block alexjh

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View timer.rs
#![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;
View keybase.md

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:

@alexjh
alexjh / KoBo N647B Console
Created Jan 17, 2014
Dump of a Kobo model N647B
View KoBo N647B Console
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
@alexjh
alexjh / bash-bug.md
Created Jan 10, 2014
Very annoying subtle bug!
View bash-bug.md

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))

You can’t perform that action at this time.