Skip to content

Instantly share code, notes, and snippets.

View martijnthe's full-sized avatar

Martijn Thé martijnthe

View GitHub Profile
@martijnthe
martijnthe / bootstrap.py
Last active July 1, 2019 14:47
Testing 123
print("hi")
print(dir())
@martijnthe
martijnthe / gist:712a92d1353ae01881dc17e73e0cbf28
Created March 13, 2019 13:58
lora vs flash ISR error logging
diff --git a/drivers/sx127x/sx1272/sx1272.c b/drivers/sx127x/sx1272/sx1272.c
index c25d3c4..7e9c51e 100644
--- a/drivers/sx127x/sx1272/sx1272.c
+++ b/drivers/sx127x/sx1272/sx1272.c
@@ -947,8 +947,44 @@ void SX1272SetPublicNetwork( bool enable )
}
}
+#include "soc/uart_reg.h"
+
$ vagrant rsync --debug
INFO global: Vagrant version: 2.0.3
INFO global: Ruby version: 2.4.3
INFO global: RubyGems version: 2.6.14
INFO global: VAGRANT_DEFAULT_PROVIDER="vmware_fusion"
INFO global: VAGRANT_INSTALLER_VERSION="2"
INFO global: VAGRANT_INSTALLER_ENV="1"
INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="/opt/vagrant/embedded"
INFO global: VAGRANT_EXECUTABLE="/opt/vagrant/embedded/gems/2.0.3/gems/vagrant-2.0.3/bin/vagrant"
INFO global: VAGRANT_LOG="debug"
#include <stdint.h>
#include <stdio.h>
#define OUTPUT_SOMEWHERE(...) \
printf(__VA_ARGS__);
typedef struct
{
size_t something;
size_t something_else;
Verifying that "martijnthe.id" is my Blockstack ID. https://onename.com/martijnthe
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "–//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.ubnt.unifi.controller.plist</string>
<key>ProgramArguments</key>
<array>
<string>java</string>
<string>-jar</string>
@martijnthe
martijnthe / wait_until_all_threads_finish.py
Created February 8, 2015 23:32
unittest vs threading helper
import threading
def wait_until_all_threads_finish():
all_threads = threading.enumerate()
all_threads.remove(threading.current_thread())
for t in all_threads:
t.join()
import imp
try:
imp.find_module("gdb")
except ImportError:
raise Exception("This file is a GDB script.\n"
"It is not intended to be run outside of GDB.\n"
"Hint: to load a script in GDB, use `source this_file.py`")
import gdb
import re
@martijnthe
martijnthe / floatsign.sh
Last active December 28, 2015 09:29 — forked from Weptun/floatsign.sh
# !/bin/bash
# Copyright (c) 2011 Float Mobile Learning
# http://www.floatlearning.com/
# Extension Copyright (c) 2013 Weptun Gmbh
# http://www.weptun.de
#
# Extended by Ronan O Ciosoig January 2012
#
# Extended by Patrick Blitz, April 2013
@martijnthe
martijnthe / menu_app.c
Created May 19, 2013 01:10
MenuLayer code fragment
#define BUFFER_SIZE 25
static const uint8_t s_music_launcher_icon_pixels[] = {
0xff, 0xff, 0x1f, 0x00, 0xff, 0xff, 0x01, 0x00, 0xff, 0x3f, 0x00, 0x00, 0xff, 0x03, 0x00, 0x00, /* bytes 0 - 16 */
0x7f, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x18, 0x00, 0x7f, 0x00, 0x1f, 0x00, /* bytes 16 - 32 */
0x7f, 0xf0, 0x1f, 0x00, 0x7f, 0xfc, 0x1f, 0x00, 0x7f, 0xfc, 0x1f, 0x00, 0x7f, 0xfc, 0x1f, 0x00, /* bytes 32 - 48 */
0x7f, 0xfc, 0x1f, 0x00, 0x7f, 0xfc, 0x1f, 0x00, 0x7f, 0xfc, 0x1f, 0x00, 0x7f, 0xfc, 0x1f, 0x00, /* bytes 48 - 64 */
0x7f, 0xfc, 0x1f, 0x00, 0x7f, 0xfc, 0x1f, 0x00, 0x7f, 0xfc, 0x00, 0x00, 0x7f, 0x7c, 0x00, 0x00, /* bytes 64 - 80 */
0x03, 0x3c, 0x00, 0x00, 0x01, 0x3c, 0x00, 0x00, 0x00, 0x3c, 0x80, 0x00, 0x00, 0x3c, 0xc0, 0x00, /* bytes 80 - 96 */