I hereby claim:
- I am stigtsp on github.
- I am sgo (https://keybase.io/sgo) on keybase.
- I have a public key ASAt9v_4tDFD4RAsNoFM5kN93SbQG8efeZrvjpxeDhUuCwo
To claim this, I am signing this object:
git log -1000 --pretty="format:%ai%%%ae%%%s" --abbrev-commit --date=local |
I hereby claim:
To claim this, I am signing this object:
#!/usr/local/bin/python | |
# -*- coding: utf-8 -*- | |
import paho.mqtt.client as mqtt | |
import json | |
import struct | |
def on_connect(client, userdata, flags, rc): | |
client.subscribe("dsl/enviro") |
# need usb-serial driver on macos | |
SERIAL=/dev/cu.wchusbserial1410 | |
wget http://micropython.org/resources/firmware/esp8266-20170108-v1.8.7.bin | |
esptool.py --port $SERIAL write_flash -fm dio -fs 32m -ff 40m 0x00000 esp8266-20170108-v1.8.7.bin | |
http://garybake.com/getting-started-with-the-wemos-d1-and-micropython.html |
#!/bin/bash | |
# This is my personal recipe to put a Caddy webserver running on Debian 8 (Jessie) from scratch. | |
# This installs some unrelated stuff as well, such as fail2ban, dstat... Feel free to modify it to your needs. | |
# Run: wget https://gist.githubusercontent.com/Nixtren/ae34d0308355884b9c7431ecab699eb4/raw -O /dev/stdout | bash | |
if [[ $EUID -ne 0 ]]; then | |
echo "This script must be run as root" 1>&2 | |
exit 1 | |
fi |
esptool.py --port /dev/cu.SLAB_USBtoUART --baud 115200 write_flash --verify --flash_freq 80m --flash_mode dio --flash_size 32m 0x0000 "boot_v1.6.bin" 0x1000 espruino_esp8266_user1.bin 0x3FC000 esp_init_data_default.bin 0x37E000 blank.bin
/* Copyright (c) 2018 Gordon Williams, Pur3 Ltd. See the file LICENSE for copying permission. */ | |
var C = { | |
WHO_AM_I : 0x20, | |
WHO_AM_I_VALUE : 0x81, | |
STATUS : 0x00, | |
STATUS_ERROR : 0x01, | |
STATUS_DATA_READY : 0x08, | |
STATUS_APP_VALID : 0x10, |
docker run --restart=always -p80:80 -p443:443 -v /root/.caddy:/root/.caddy -v/srv:/srv:ro -v/etc/Caddyfile:/etc/Caddyfile:ro orbsmiv/caddy-rpi:latest |
set DATABASE name_of_database_goes_here | |
for table in (mysql $DATABASE -NBe "SELECT table_name FROM INFORMATION_SCHEMA.TABLES WHERE engine = 'InnoDB' and table_schema='$DATABASE'"); | |
echo "alter table $DATABASE.$table engine=tokudb;"; | |
end |