Skip to content

Instantly share code, notes, and snippets.

/** use DWT counter to delay */
void dwt_sleep(u32 time)
{
static volatile u32 *DWT_CYCCNT = (u32 *) 0xE0001004;
static volatile u32 *DWT_CONTROL = (u32 *) 0xE0001000;
static volatile u32 *SCB_DEMCR = (u32 *) 0xE000EDFC;
/* reset the counter */
*DWT_CYCCNT = 0;
/* start DWT counter */
=ERROR REPORT==== 2013-02-07 18:28:50 ===
** State machine <0.630.0> terminating
** Last message in was {ircstring,":niven.freenode.net 433 * danielh :Nickname is already in use."}
** When State == wait_for_registration
** Data == {error,
{xmlelement,"error",
[{"code","409"},{"type","cancel"}],
[{xmlelement,"conflict",
[{"xmlns",
"urn:ietf:params:xml:ns:xmpp-stanzas"}],
# valgrind lv-tool -i alsa -a blursk
==17249== Memcheck, a memory error detector
==17249== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
==17249== Using Valgrind-3.6.1 and LibVEX; rerun with -h for copyright info
==17249== Command: lv-tool -i alsa -a blursk
==17249==
lv-tool v0.1
Loading actor 'blursk'...
Loading input 'alsa'...
==17249== Syscall param ioctl(arg) contains uninitialised byte(s)
# valgrind --leak-check=full --show-reachable=yes lv-tool -d stdout >/dev/null
==9738== Memcheck, a memory error detector
==9738== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
==9738== Using Valgrind-3.6.1 and LibVEX; rerun with -h for copyright info
==9738== Command: lv-tool -d stdout
==9738==
^C==9738== Jump to the invalid address stated on the next line
==9738== at 0x3A6: ???
==9738== by 0x4020FC3: ??? (in /lib/ld-2.15.so)
/storage/code/libvisual/libvisual.git/libvisual-plugins/plugins/input/jack/input_jack.cpp: In function 'const VisPluginInfo* get_plugin_info()':
/storage/code/libvisual/libvisual.git/libvisual-plugins/plugins/input/jack/input_jack.cpp:82:5: error: cannot convert 'int (*)(VisPluginData*) {aka int (*)(_VisPluginData*)}' to 'const char*' in initialization
/storage/code/libvisual/libvisual.git/libvisual-plugins/plugins/input/jack/input_jack.cpp:82:5: error: invalid conversion from 'VisObject* {aka _VisObject*}' to 'int' [-fpermissive]
At global scope:
cc1plus: error: unrecognized command line option "-Wno-tautological-compare" [-Werror]
cc1plus: all warnings being treated as errors
make[2]: *** [plugins/input/jack/CMakeFiles/input_jack.dir/input_jack.cpp.o] Error 1
make[1]: *** [plugins/input/jack/CMakeFiles/input_jack.dir/all] Error 2
make: *** [all] Error 2
@rigid
rigid / gist:3073746
Created July 9, 2012 01:41
output of ./PixelController.sh
classpath: lib/minim-spi-2.0.2.jar:lib/tritonus_aos-2.0.2.jar:lib/jsminim-2.0.2.jar:lib/processing-blinkenlight-0.5.jar:lib/commons-lang-2.5.jar:lib/ecj-3.5.1.jar:lib/minim-2.0.2.jar:lib/jargs-1.0.jar:lib/core-1.2.1.jar:lib/jna-3.2.7.jar:lib/rxtx-2.2pre5.jar:lib/serial-1.2.1.jar:lib/commons-collections-3.2.1.jar:lib/artnet4j-0001.jar:lib/tritonus_share-2.0.2.jar:lib/net-1.2.1.jar:lib/pde-1.2.1.jar
09.07.2012 03:35:31 com.neophob.PixelController setup
INFO:
09.07.2012 03:35:31 com.neophob.PixelController setup
INFO: -----------------------------------
09.07.2012 03:35:31 com.neophob.PixelController setup
INFO: --- PixelController Setup START ---
09.07.2012 03:35:31 com.neophob.PixelController setup
INFO: Config loaded, 26 entries
09.07.2012 03:35:31 com.neophob.sematrix.properties.PropertiesHelper <init>
$ hackrf_transfer -r foo.wav
call hackrf_sample_rate_set(10000000 Hz/10.000 MHz)
call hackrf_baseband_filter_bandwidth_set(9000000 Hz/9.000 MHz)
call hackrf_set_freq(900000000 Hz/900.000 MHz)
Stop with Ctrl-C
0.3 MiB / 1.000 sec = 0.3 MiB/second
User cancel, exiting...
Total time: 1.00010 s
hackrf_stop_rx() done
@rigid
rigid / gist:691eddb1e3c3b0aa7d3d
Created June 29, 2015 11:10
sequential check if single point is within polygon VS multipoint intersection with polygon
# ------------------------------------------------------------------------------
# this works fine (finds correct amount of objects within an area)
# walk all areas
for area in areas:
polygon = ogr.CreateGeometryFromWkt(area.polygon)
within_count = 0
# walk all objects
for obj in all_objects:
@rigid
rigid / gist:5074630cecf3650354ec
Created June 26, 2015 18:32
"super class" that iterates through multiple iterateable subclasses
class A(object):
def __iter__(self):
# inits something
return self
def next(self):
return something
class B(object):
@rigid
rigid / gist:823d0b4036888f6f9ad2
Created May 13, 2015 23:41
QGIS 2.8.x install fail on linux mint
:: removed old version
# sudo apt-get autoremove --purge qgis
:: with deb http://qgis.org/debian jessie main
:: update
# sudo apt-get update