Skip to content

Instantly share code, notes, and snippets.

View rngadam's full-sized avatar
💭
coderbunker.ca

Ricky Ng-Adam rngadam

💭
coderbunker.ca
View GitHub Profile
@rngadam
rngadam / gist:2791886
Created May 26, 2012 03:03
ohci_irq crash
[<c01f13a0>] (ohci_irq+0xc/0x1ac) from [<c01d9374>] (usb_hcd_irq+0x34/0x44)
[<c01d9374>] (usb_hcd_irq+0x34/0x44) from [<c004c924>] (handle_irq_event_percpu+0x50/0x1cc)
[<c004c924>] (handle_irq_event_percpu+0x50/0x1cc) from [<c004cac8>] (handle_irq_event+0x28/0x38)
[<c004cac8>] (handle_irq_event+0x28/0x38) from [<c004e9c0>] (handle_level_irq+0x80/0xcc)
[<c004e9c0>] (handle_level_irq+0x80/0xcc) from [<c004c2a0>] (generic_handle_irq+0x28/0x3c)
[<c004c2a0>] (generic_handle_irq+0x28/0x3c) from [<c0009cec>] (handle_IRQ+0x30/0x98)
@rngadam
rngadam / gist:2899521
Created June 9, 2012 04:45
Information extracted from a MicroSD formatted using SD Formatter 3.1
fdisk layout
# fdisk -l /dev/sdb
Disk /dev/sdb: 7964 MB, 7964983296 bytes
255 heads, 63 sectors/track, 968 cylinders, total 15556608 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
{
// --------------------------------------------------------------------
// JSHint Configuration, Strict Edition
// --------------------------------------------------------------------
//
// This is a options template for [JSHint][1], using [JSHint example][2]
// and [Ory Band's example][3] as basis and setting config values to
// be most strict:
//
// * set all enforcing options to true
{
// --------------------------------------------------------------------
// JSHint Configuration, Strict Edition
// --------------------------------------------------------------------
//
// This is a options template for [JSHint][1], using [JSHint example][2]
// and [Ory Band's example][3] as basis and setting config values to
// be most strict:
//
// * set all enforcing options to true
@rngadam
rngadam / gist:30e60ad18235fa6ace95
Created September 11, 2014 08:56
bundle env on virtual machine
tcv@staging:~/src/webapp$ /home/tcv/.rvm/gems/ruby-2.0.0-p481/wrappers/bundle env
Bundler 1.6.2
Ruby 2.0.0 (2014-05-08 patchlevel 481) [x86_64-linux]
Rubygems 2.2.2
GEM_HOME /home/tcv/.rvm/gems/ruby-2.0.0-p481
GEM_PATH /home/tcv/.rvm/gems/ruby-2.0.0-p481:/home/tcv/.rvm/gems/ruby-2.0.0-p481@global
rubygems-bundler (1.4.4)
Bundler settings
mirror.https://rubygems.org
$ /Applications/Lantern.app/Contents/MacOS/JavaApplicationStub
log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: log.txt (Permission denied)
at java.io.FileOutputStream.openAppend(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:192)
at java.io.FileOutputStream.<init>(FileOutputStream.java:116)
at org.apache.log4j.FileAppender.setFile(FileAppender.java:294)
at org.apache.log4j.RollingFileAppender.setFile(RollingFileAppender.java:207)
at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:165)
at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:307)
@rngadam
rngadam / pip.conf
Last active August 27, 2017 13:25
pip configuration ~/.pip/pip.conf
[global]
use-mirrors=true
mirrors=https://pypi.mirrors.ustc.edu.cn/pypi
index-url=https://pypi.mirrors.ustc.edu.cn/simple
@rngadam
rngadam / rpi.md
Last active March 17, 2017 10:32
Raspberry pi installation

Raspberry pi installation

installation image

Using your Mac and the USB MicroSD card adapter, we want to flash the SD card with the Raspberry Pi Full Raspbian image.

Copy image from

  • pre-setup existing RPi on the network (accept identity, username/password is pi/raspberry)
  • use USB disk with image on it to transfer
@rngadam
rngadam / rpi-node-red-usage.md
Last active March 4, 2017 08:45
Usage of a Raspberry Pi with node-red installed

intro

We want the following layout:

Sensors -> Arduino -> Raspberry Pi / node-red -> influxdb -> Jupyter OR data visualization

Read up on node-red usage:

@rngadam
rngadam / gist:f1423ebc12f88ec617ec6d82e282e2e0
Created March 4, 2017 10:59
Extra optional steps from setup of Raspberry Pi
# SKIPPED (included in the full Jessie) node-red setup
download and copy update script to Raspberry Pi (GFW blocks access to install)
From your Mac to the RPi:
```
scp update-nodejs-and-nodered.sh pi@coderbunkerpi001.local:
```