Skip to content

Instantly share code, notes, and snippets.

View morganrallen's full-sized avatar

Morgan 'ARR!' Allen morganrallen

  • Allen Industries
  • Oakland
View GitHub Profile
#!/usr/bin/env python2
from os import sys
import argparse
import copy
import pcbnew
import string
import sys
import math
import numpy as np
@morganrallen
morganrallen / .arc
Created January 13, 2018 20:28
arc sandbox session test
@app
count_test
@html
post /
get /
@morganrallen
morganrallen / history.md
Last active March 13, 2017 23:47
Macchina M2-B Hacking Notes

cli history

miniterm.py `udevserial -v ID_MODEL=Arduino_Due -v SUBSYSTEM=tty` 115200 --raw
esptool32 --port `udevserial -v ID_MODEL=Arduino_Due -v SUBSYSTEM=tty` --before no_reset --after no_reset --baud 115200 write_flash 0x10000 ./build/gatt_server_demos.bin
@morganrallen
morganrallen / config.xml
Last active November 15, 2016 00:52
This demonstrates my Cordova/Phonegap development flow using Chrome Inspector to minimize app rebuilds when only application code changes.
<?xml version='1.0' encoding='utf-8'?>
<widget id="io.cordova.hellocordova" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>HelloCordova</name>
<description>
A sample Apache Cordova application that responds to the deviceready event.
</description>
<author email="dev@cordova.apache.org" href="http://cordova.io">
Apache Cordova Team
</author>
<content src="http://192.168.1.100:8000/index.html" />
@morganrallen
morganrallen / esp-idf.md
Created September 27, 2016 18:31
ESP32 esp-idf

Component/Module Structure

By default the project.md file declares one SRCDIR as

SRCDIRS ?= main

Overriding this in local project Makefile didn't appear to change anything. This is because every src directory requires a component.mk

@morganrallen
morganrallen / esp8266-function-pointer-failure.c
Created February 9, 2016 02:55
Minimal example showing the address of a function pointer being incorrect after a system callback
#include <c_types.h>
#include <osapi.h>
#include <user_interface.h>
#include <espconn.h>
#include <mem.h>
#include <gpio.h>
typedef int (* oGetValueCB)();
typedef void (* oSetValueCB)(int, int);
@morganrallen
morganrallen / package.json
Created January 22, 2016 17:40
Abusing tape reporting stream to provide post-test cleanup
{
"name": "test",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "tape test*.js"
},
"author": "",
"license": "ISC"
@morganrallen
morganrallen / esp32.md
Last active January 6, 2022 13:57
ESP32 hacking notes

Basic hookup

As I plan to make a custom breakout board I wanted to solder as few connections as possible. I was able to boot the device, with UART (out at least) soldering the following.

PIN NAME
0 GND
1 3V3
2 EN
/home/morgan/devel/ESP8266/crosstool-NG/builds/xtensa-lx106-elf/lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: build/rom0.elf section `.text' will not fit in region `iram1_0_seg'
/home/morgan/devel/ESP8266/esp_iot_sdk_v1.4.0//lib/libc.a(mallocr.o):(.literal+0x10): undefined reference to `_sbrk_r'
/home/morgan/devel/ESP8266/esp_iot_sdk_v1.4.0//lib/libc.a(mallocr.o): In function `_malloc_r':
C:\build\build\RC-2010.1\lxinnovation\delivery\lx106\104196\xbuild\Target-libs\newlib\xtensa-elf\newlib\libc\stdlib/\build\tree\RC-2010.1_kuma\p4root\Xtensa\Target-libs\newlib\newlib\libc\stdlib/mallocr.c:2152: undefined reference to `_sbrk_r'
C:\build\build\RC-2010.1\lxinnovation\delivery\lx106\104196\xbuild\Target-libs\newlib\xtensa-elf\newlib\libc\stdlib/\build\tree\RC-2010.1_kuma\p4root\Xtensa\Target-libs\newlib\newlib\libc\stdlib/mallocr.c:2189: undefined reference to `_sbrk_r'
/home/morgan/devel/ESP8266/esp_iot_sdk_v1.4.0//lib/libc.a(freer.o): In function `_malloc_trim_r':
C:\build\build\RC-2010.1
@morganrallen
morganrallen / bin1.diff
Created September 22, 2015 21:50
Dumps and diff of rom1 slot before and after OTA
371,380c371,380
< 0001720: a032 1306 c5ec ff3d 0c4d 0192 0100 1cc5 .2.....=.M......
< 0001730: 1099 a029 5928 81c5 efff c8a1 d8b1 0891 ...)Y(..........
< 0001740: 12c1 300d f000 0000 21fd fa12 c1d0 c981 ..0.....!.......
< 0001750: d991 e9a1 2802 0971 e832 2812 3d0e 0160 ....(..q.2(.=..`
< 0001760: fac0 0000 d2c2 fc22 a370 0107 fbc0 0000 .......".p......
< 0001770: 3d01 cd02 1cc4 3b2d 202e 8201 04fb c000 =.....;- .......
< 0001780: 0042 a370 2201 000c 1320 2393 2241 003d .B.p".... #."A.=
< 0001790: 0c2a 2d1b 2220 2e82 01fd fac0 0000 0871 .*-." .........q
< 00017a0: d891 2d0c e8a1 c881 12c1 300d f000 0000 ..-.......0.....