Skip to content

Instantly share code, notes, and snippets.

View andrewc12's full-sized avatar

Andrew Innes andrewc12

  • Perth, Australia
View GitHub Profile
try:
import usocket as socket
except:
import socket
import uio
import uos
#based on
#https://github.com/micropython/micropython/blob/master/examples/network/http_server.py
#https://github.com/azmodie/espwebserver/blob/master/main.py
@andrewc12
andrewc12 / buupdate.sh
Last active March 15, 2017 02:34
Update BU from source
#!/bin/bash
#update packages
sudo apt-get update
sudo apt-get install -y \
ccache eatmydata \
git build-essential libtool autotools-dev automake pkg-config \
libssl-dev libevent-dev bsdmainutils libboost-all-dev
# try to get the source
@andrewc12
andrewc12 / gist:cb1ce8804629a2c6ce10a2b62bc4842a
Last active May 8, 2017 10:20
Preliminary collection of files that need to be touched
arch/mips/ath79/Kconfig
config ATH79_MACH_KK_SP3
bool "KANKUN Small K support"
select SOC_AR933X
select ATH79_DEV_ETH
select ATH79_DEV_GPIO_BUTTONS
select ATH79_DEV_LEDS_GPIO
select ATH79_DEV_M25P80
select ATH79_DEV_USB
@andrewc12
andrewc12 / buildenv and quilt_rev10.txt
Created May 10, 2017 23:35
Build firmware for Kankun small k (KK-SP3) EXPERIMENTAL!!!
#GOAL: To document how to build a clone of the original firmware using lede 17
#TODO: Clean up descriptions, provide links to the manual pages, remove cruft, automate more
#BUG: Button doesn't factory restore properly
sudo ve install subversion g++ zlib1g-dev build-essential git python -y
sudo apt-get install libncurses5-dev gawk gettext unzip file libssl-dev wget -y
sudo apt-get install ccache -y
sudo apt-get install quilt -y
vi /etc/rc.button/reset
#!/bin/sh
. /lib/functions.sh
OVERLAY="$( grep ' /overlay ' /proc/mounts )"
case "$ACTION" in
pressed)
[ -z "$OVERLAY" ] && return 0
#GOAL: To document how to build a clone of the original firmware using lede 17
#TODO: Clean up descriptions, provide links to the manual pages, remove cruft, automate more
sudo apt-get install subversion g++ zlib1g-dev build-essential git python -y
sudo apt-get install libncurses5-dev gawk gettext unzip file libssl-dev wget -y
sudo apt-get install ccache -y
sudo apt-get install quilt -y
#!/bin/sh
MY_DEVICE=my_device
RELAY_CTRL=/sys/class/leds/tp-link:blue:relay/brightness
#send relay status via mqtt
sendstatus(){
#get relay status
STATUS=$(cat $RELAY_CTRL)
#send MQTT status message
case "$STATUS" in
#!/bin/sh
# Example frobnication hook script
PREREQ=""
BASE_MODULES="f2fs crc32_generic crc32-pclmul libcrc32c crc32c_generic crc32c-intel"
prereqs()
{
echo "$PREREQ"
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@andrewc12
andrewc12 / .gntrc
Created May 9, 2018 10:23 — forked from kabturek/.gntrc
finch config for irssi layout ~/.gntrc
[general]
shadow = 0
# There is experimental mouse support
mouse = 0
# To use some custom window-manager
wm = /usr/lib/gnt/irssi.so