Skip to content

Instantly share code, notes, and snippets.

@johnmurrayvi
johnmurrayvi / 51-android.rules
Last active November 26, 2021 14:41
Udev permission for android devices
## Acer
#SUBSYSTEM=="usb", ATTR{idVendor}=="0502", MODE="0600", OWNER="<username>"
## ASUS
#SUBSYSTEM=="usb", ATTR{idVendor}=="0b05", MODE="0600", OWNER="<username>"
## Dell
#SUBSYSTEM=="usb", ATTR{idVendor}=="413c", MODE="0600", OWNER="<username>"
## Foxconn
@johnmurrayvi
johnmurrayvi / gist:7518743
Created November 17, 2013 21:52
TinyOS Paths
### TinyOS ###
export TOSROOT="/opt/tinyos/tinyos-main"
export TOSDIR="$TOSROOT/tos"
export CLASSPATH=$CLASSPATH:$TOSROOT/support/sdk/java/tinyos.jar:$TOSROOT/support/sdk/java
export MAKERULES="$TOSROOT/support/make/Makerules"
export PYTHONPATH=$PYTHONPATH:$TOSROOT/support/sdk/python
#export MOTECOM="serial@/dev/ttyUSB0:telosb"
Changes:
getSkinDescription: function getSkinDescription(internalName) {
+ dump("sbFeathersManager::getSkinDescription(internalName = "+internalName+")\n");
return this._skins[internalName];
},
...
getLayoutDescription: function getLayoutDescription(url) {
@johnmurrayvi
johnmurrayvi / gcc-4.8-pm-fix
Last active December 19, 2015 01:59
patch to fix ng build with gcc 4.8
--- /usr/lib/gcc/x86_64-linux-gnu/4.8/include/mm_malloc.h
+++ /usr/lib/gcc/x86_64-linux-gnu/4.8/include/mm_malloc.h
@@ -32,6 +32,7 @@
extern int posix_memalign (void **, size_t, size_t);
#else
-extern "C" int posix_memalign (void **, size_t, size_t) throw ();
+extern "C" int posix_memalign (void **, size_t, size_t);
#endif
static __inline void *
@johnmurrayvi
johnmurrayvi / playcount-fail
Created June 24, 2013 00:13
play count increment debugging
***** First track *****
-679024832[7f1fd6060370]: virtual nsresult sbPlaybackHistoryService::OnMediacoreEvent(sbIMediacoreEvent*): sbPlaybackHistoryService[0xb3e0e400] - OnMediacoreEvent
-679024832[7f1fd6060370]: virtual nsresult sbPlaybackHistoryService::OnMediacoreEvent(sbIMediacoreEvent*): +++++ sbIMediacoreEvent: eventType = 16384 [STREAM_BEFORE_START]
-679024832[7f1fd6060370]: virtual nsresult sbPlaybackHistoryService::OnMediacoreEvent(sbIMediacoreEvent*): sbPlaybackHistoryService[0xb3e0e400] - OnMediacoreEvent
-679024832[7f1fd6060370]: virtual nsresult sbPlaybackHistoryService::OnMediacoreEvent(sbIMediacoreEvent*): +++++ sbIMediacoreEvent: eventType = 4096 [METADATA_CHANGE]
***** About to start first track *****
-679024832[7f1fd6060370]: virtual nsresult sbPlaybackHistoryService::OnMediacoreEvent(sbIMediacoreEvent*): sbPlaybackHistoryService[0xb3e0e400] - OnMediacoreEvent
-679024832[7f1fd6060370]: virtual nsresult sbPlaybackHistoryService::OnMediacoreEvent(sbIMediacoreEvent*): +++++ sbIMediacoreEvent: e
@johnmurrayvi
johnmurrayvi / ng-backtrace
Created June 16, 2013 20:56
full backtrace of current issues
(gdb) backtrace full
#0 0x00007ffff4e34a5b in nsCOMPtr<nsIObserver>::nsCOMPtr (this=0x7fffffffc838, aRawPtr=0x7fffe0fdb2d0) at ../../../dist/include/nsCOMPtr.h:600
No locals.
#1 0x00007ffff4fb6fdc in PrefCallback::PrefCallback (this=0x7fffffffc810, aDomain=0x7ffff6ba53e0 <sFileOriginPolicyPrefName> "security.fileuri.strict_origin_policy", aObserver=0x7fffe0fdb2d0, aBranch=0x7fffe9648d80)
at /mnt/git/nightingale/deps/xulrunner/mozilla/modules/libpref/src/nsPrefBranch.h:89
No locals.
#2 0x00007ffff4fba089 in nsPrefBranch::RemoveObserver (this=0x7fffe9648d80, aDomain=0x7ffff6ba53e0 <sFileOriginPolicyPrefName> "security.fileuri.strict_origin_policy", aObserver=0x7fffe0fdb2d0)
at /mnt/git/nightingale/deps/xulrunner/mozilla/modules/libpref/src/nsPrefBranch.cpp:634
rv = 0
key = {
@johnmurrayvi
johnmurrayvi / ng-nspr-log
Created June 16, 2013 06:09
export NSPR_LOG_MODULES=all:3 ; ./nightingale
jmurray@jjmvi-AMD-ubuntu:~/git/nightingale/nightingale/compiled/dist$ export NSPR_LOG_MODULES=all:3 ; ./nightingale
(process:9783): GLib-CRITICAL **: g_slice_set_config: assertion `sys_page_size == 0' failed
nsStringStats
=> mAllocCount: 6
=> mReallocCount: 2
=> mFreeCount: 6
=> mShareCount: 1
=> mAdoptCount: 0
=> mAdoptFreeCount: 0
@johnmurrayvi
johnmurrayvi / ng-stacktrace
Last active December 18, 2015 13:38
nightingale xul-9 stacktrace
jmurray@jjmvi-AMD-ubuntu:/mnt/git/nightingale/nightingale/compiled/dist$ gdb ././nightingale-bin 9615
GNU gdb (GDB) 7.5.91.20130417-cvs-ubuntu
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
@johnmurrayvi
johnmurrayvi / bst.hpp
Created December 24, 2011 20:41
binary search tree w/ iterators and parent-aware children
#ifndef BST_H
#define BST_H
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <queue>
using namespace std;
template <class TKey>
@johnmurrayvi
johnmurrayvi / bug22958-attach17786
Created July 25, 2014 18:53
poti bug 22958, attachment 17786 - encoding in unsynchronizedlyricsframe.cpp
Index: taglib/taglib/mpeg/id3v2/frames/unsynchronizedlyricsframe.cpp
===================================================================
--- taglib/taglib/mpeg/id3v2/frames/unsynchronizedlyricsframe.cpp (revision 11368)
+++ taglib/taglib/mpeg/id3v2/frames/unsynchronizedlyricsframe.cpp (working copy)
@@ -23,16 +23,17 @@
* Alternatively, this file is available under the Mozilla Public *
* License Version 1.1. You may obtain a copy of the License at *
* http://www.mozilla.org/MPL/ *
***************************************************************************/