Skip to content

Instantly share code, notes, and snippets.

View matthijskooijman's full-sized avatar

Matthijs Kooijman matthijskooijman

View GitHub Profile
void setup(){
Serial.begin(115200);
cli();
// Enable asynchronous mode for timer2 (uses external 32kHz
// crystal. This might corrupt the settings registers, so we'll
// have to (re-)set them all.
// TCCR2B.
ASSR |= (1 << AS2);
matthijs@web:~$ wwwperm -h
usage: wwwperm [-h] [-g ADMIN_GROUP] [-u APP_USER] [-R] [-v] [-y] [-w | -r]
(-F | -n | -c | -W)
files [files ...]
Fix up or check permissions on parts of the webroot.
Each part of the webroot is assumed to have a single admin-group, which
is the group of users that has write access to all files in that part
(through being the owning group of files).
@matthijskooijman
matthijskooijman / gist:27a9a2f66c4a59111378
Last active August 29, 2015 14:04
Fancy module loading stuff
class Module {
};
class ModuleInfoBase {
public:
const char *name;
virtual Module* load() const;
// For the modules linked list
ModuleInfoBase *next;
};
1 Explanation: see http://www.argon.org/~roderick/apt-pinning.html
2 Package: *
3 Pin: release o=Debian,a=stable
4 Pin-Priority: 990
5
6 Package: *
7 Pin: release o=apt.stderr.nl,a=stderr
8 Pin-Priority: 990
9
10 Package: *
# 1 "C:\\Documents and Settings\\STEFANOD\\Documenti\\Arduino\\libraries\\dcf77_library\\dcf77.cpp"
# 1 "/arduino-1.5.7//"
# 1 "<command-line>"
# 1 "C:\\Documents and Settings\\STEFANOD\\Documenti\\Arduino\\libraries\\dcf77_library\\dcf77.cpp"
# 19 "C:\\Documents and Settings\\STEFANOD\\Documenti\\Arduino\\libraries\\dcf77_library\\dcf77.cpp"
# 1 "C:\\Documents and Settings\\STEFANOD\\Documenti\\Arduino\\libraries\\dcf77_library/dcf77.h" 1
# 22 "C:\\Documents and Settings\\STEFANOD\\Documenti\\Arduino\\libraries\\dcf77_library/dcf77.h"
# 1 "/arduino-1.5.7/hardware/tools/avr/lib/gcc/avr/4.8.1/include/stdint.h" 1 3 4
# 9 "/arduino-1.5.7/hardware/tools/avr/lib/gcc/avr/4.8.1/include/stdint.h" 3 4
# 1 "/arduino-1.5.7/hardware/tools/avr/avr/include/stdint.h" 1 3 4
matthijs@grubby:/tmp/network-manager-0.9.10.0$ nmcli c show 22d58543-cfb5-4d49-b1a5-5fbf26ec86a3
connection.id: Fonera Test
connection.uuid: 22d58543-cfb5-4d49-b1a5-5fbf26ec86a3
connection.interface-name: eth0.10
connection.type: vlan
connection.autoconnect: yes
connection.timestamp: 1412755955
connection.read-only: no
connection.permissions:
connection.zone: --
Oct 9 10:53:17 grubby NetworkManager[20716]: <info> (eth0.10): device state change: activated -> deactivating (reason 'user-requested') [100 110 39]
Oct 9 10:53:17 grubby NetworkManager[20716]: <info> (eth0.10): device state change: deactivating -> disconnected (reason 'user-requested') [110 30 39]
Oct 9 10:53:17 grubby NetworkManager[20716]: <info> (eth0.10): deactivating device (reason 'user-requested') [39]
Oct 9 10:53:17 grubby NetworkManager[20716]: <info> (eth0.10): device state change: disconnected -> unmanaged (reason 'removed') [30 10 36]
Oct 9 10:53:19 grubby NetworkManager[20716]: <info> sleep requested (sleeping: no enabled: yes)
Oct 9 10:53:19 grubby NetworkManager[20716]: <info> sleeping...
Oct 9 10:53:19 grubby NetworkManager[20716]: <info> (eth0): device state change: activated -> unmanaged (reason 'sleeping') [100 10 37]
Oct 9 10:53:19 grubby NetworkManager[20716]: <info> (eth0): deactivating device (reason 'sleeping') [37]
/*
To test:
- Upload this sketch to the Arduino Due
- Open the serial monitor at 115200
- Connect a jumper wire to ground and touch the other end to pins 25 and 26, alternating between them
*/
void int25() {
Serial.println("INT25");
}
extended-r Thread <main> In: PinoccioShell::eval Line: 179 PC: 0x8140
#1 0x00019c1e in badsym () at /home/matthijs/docs/Electronics/Pinoccio/firmware-pinoccio/libraries/bitlash/src/bitlash-parser.c:487
#2 0x000199a6 in getsym () at /home/matthijs/docs/Electronics/Pinoccio/firmware-pinoccio/libraries/bitlash/src/bitlash-parser.c:170
#3 0x0001bbe0 in execscript (scripttype=1 '\001', scriptaddress=19888, scriptname=0x0 <__vectors>)
at /home/matthijs/docs/Electronics/Pinoccio/firmware-pinoccio/libraries/bitlash/src/bitlash-instream.c:130
#4 0x00008140 in PinoccioShell::eval (this=<incomplete type>, out=0x0 <__vectors>, cmd=...)
at /home/matthijs/docs/Electronics/Pinoccio/firmware-pinoccio/libraries/pinoccio/src/Shell.h:179
#5 0x00008aaa in commandConfirm (req=0x804af7) at /home/matthijs/docs/Electronics/Pinoccio/firmware-pinoccio/libraries/pinoccio/src/Shell.h:160
#6 0x0001d12c in NWK_TaskHandler () at /home/ma
matthijs@grubby:~$ pinoccio rest get /v1/sync
{"data":{"account":"1859","troop":"3","type":"connection","value":{"status":"offline"},"time":1415462807978.001}}
{"data":{"account":"1859","troop":"3","scout":"1","type":"led","value":{"type":"led","led":[0,0,0],"torch":[0,255,0],"at":232153,"_t":1415463026044},"time":1415463026044}}
{"data":{"account":"1859","troop":"3","scout":"1","type":"mesh","value":{"type":"mesh","scoutid":1,"troopid":3,"routes":0,"channel":20,"rate":"250 kb/s","power":"3.5 dBm","at":108140,"_t":1415462902045},"time":1415462902045}}
{"data":{"account":"1859","troop":"3","scout":"1","type":"power","value":{"type":"power","battery":31,"voltage":389,"charging":true,"vcc":true,"at":421282,"_t":1415463215171},"time":1415463215171}}
{"data":{"account":"1859","troop":"3","scout":"1","type":"temp","value":{"type":"temp","c":33,"f":91,"offset":0,"at":301283,"_t":1415463095176},"time":141