Skip to content

Instantly share code, notes, and snippets.

--- idf_monitor on /dev/ttyUSB0 115200 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
ets Jun 8 2016 00:22:57
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:6400
@trygvis
trygvis / DMP3056 check.ipynb
Last active July 6, 2018 18:16
Datasheet vs SPICE
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@trygvis
trygvis / box.py
Created May 2, 2016 18:58
Macro for FreeCAD to create boxes suitable for laser cutting
# Macro for FreeCAD to create boxes suitable for laser cutting
from FreeCAD import Base, Vector, Matrix
import Part
class BoxCfg:
def __init__(self, thickness, notches):
self.thickness = thickness
self.notches = notches
self.piece_size = 60
@trygvis
trygvis / keybase.md
Last active September 21, 2016 09:15

Keybase proof

I hereby claim:

  • I am trygvis on github.
  • I am trygvis (https://keybase.io/trygvis) on keybase.
  • I have a public key ASAtPpnRqOhwzepj4plLJzy0mI2u9vdjN7VNltyzqtXC5Ao

To claim this, I am signing this object:

@trygvis
trygvis / 00README.md
Last active September 13, 2015 21:21
usage: arp-to-mqtt [-t <prefix>] [-h host] [-i <interface>]

A utility script to dump an ARP table to a set of MQTT topics.

For each MAC with an IP publish a message to

<prefix>/<mac of interface>/<mac of device>/ip

and

@trygvis
trygvis / mdx-15.ulp
Last active December 12, 2015 12:49
Eagle ULP for generating a Roland Modella MXP-15/20 program.
void drill(int x, int y) {
// printf("M % 5.0f,% 5.0f; \r\n", u2mil(x), u2mil(y));
printf("PU % 5.0f,% 5.0f; \r\n", u2mil(x), u2mil(y));
printf("PD % 5.0f,% 5.0f; \r\n", u2mil(x), u2mil(y));
printf("PU % 5.0f,% 5.0f; \r\n", u2mil(x), u2mil(y));
}
board(B) {
string fn = filesetext(B.name, ".drill.txt");
@trygvis
trygvis / bashrc.sh
Created September 7, 2012 06:17
Useful snippet to select the correct terminal on Linux and OSX.
# http://vim.wikia.com/wiki/256_colors_in_vim
if [ -z "$SSH_CLIENT" ]
then
if [ -r /usr/share/terminfo/x/xterm-256color -o -r /lib/terminfo/x/xterm-256color -o `uname -s` = Darwin ]
then
export TERM='xterm-256color'
else
export TERM='xterm-color'
fi
fi
@trygvis
trygvis / feed.xml
Created May 3, 2012 22:50
OpenSearch 'sort' extension brain dump.
<feed xmlns="http://www.w3.org/2005/Atom"
xmlns:os="http://a9.com/-/spec/opensearch/1.1/"
xmlns:sort="http://purl.org/opensearch-sort/1.0">
<!--
A sort form lists the fields that can be sorted with the available
sorting functions used to sort the field. If a field doesn't list
a sorting function the server has a default sort function available.
This would normally be numerical order for numbers and lexicographical
for text.
@trygvis
trygvis / Build.scala
Created March 31, 2012 15:51
An improved sbt build file for Scalatron
// Based off http://jmhofer.johoop.de/?p=292 / https://gist.github.com/2260897
// Put this file under project/Build.scala
// Copy Scalatron/bin/Scalatron.jar to lib/ before compiling
// Tested with sbt version 0.11.2
import sbt._
import Keys._
object Build extends Build {
val botDirectory = SettingKey[File]("bot-directory")