This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# turn a crosware master.zip into a git checkout with jgit | |
# | |
cd /usr/local | |
curl -kLO https://github.com/ryanwoodsmall/crosware/archive/master.zip | |
unzip -o master.zip | |
mv crosware-master crosware |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ssh stream tcp nowait root /usr/sbin/dropbear dropbear -i -R | |
# set type = UNLISTED to run on an off port | |
service ssh | |
{ | |
socket_type = stream | |
protocol = tcp | |
wait = no | |
port = 22 | |
user = root |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "max pid is $(cat /proc/sys/kernel/pid_max)" | |
for i in {1..132000} ; do | |
if [ $((${i}%1000)) -eq 0 ] ; then | |
echo "${i} $(realpath /proc/self)" | |
else | |
realpath /proc/self >/dev/null 2>&1 | |
fi | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# XXX - need to pre-build daa=1 for "set -eu" scripts | |
function remove_dupes() { | |
local dstring="${1}" | |
local dsep="${2}" | |
local -A daa | |
local -a du | |
for dl in $(echo "${dstring}" | tr "${dsep}" "\n") ; do | |
if [ -z "${daa[${dl}]}" ] ; then | |
daa["${dl}"]=1 | |
du+=( "${dl}" ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask | |
from flask import request | |
from os import environ | |
import json | |
romethods = ['GET', 'HEAD', 'OPTIONS'] | |
rwmethods = ['DELETE', 'POST', 'PUT'] | |
allmethods = romethods + rwmethods | |
app = Flask(__name__) | |
environ['FLASK_DEBUG'] = '1' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
/bin/test -e /etc/fstab && /bin/mount -a | |
/bin/test -e /dev/urandom || /bin/mknod -m 666 /dev/urandom c 1 9 | |
/bin/test -e /dev/zero || /bin/mknod -m 666 /dev/zero c 1 5 | |
/bin/test -e /dev/null || /bin/mknod -m 666 /dev/null c 1 3 | |
/bin/syslogd | |
/bin/ifconfig eth0 0.0.0.0 up | |
/bin/udhcpc -b -v |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# | |
# erase the esp8266 flash | |
# sudo $(which esptool.py) --port /dev/ttyUSB0 erase_flash | |
# write the micropython firmware | |
# sudo $(which esptool.py) --port /dev/ttyUSB0 --baud 460800 write_flash --flash_size=detect -fm dio 0 /tmp/esp8266-20190125-v1.10.bin | |
# save this file to esp8266_wifi.py | |
# add your wireless network/password to the wifi.connect() line | |
# run: | |
# echo "f=open('/main.py','w')" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for i in {1..7} ; do | |
echo $i 1>&2 | |
cat the_caretaker-an_empty_bliss_beyond_this_world.mp3 | |
done \ | |
| lame \ | |
--preset standard \ | |
--mp3input \ | |
- \ | |
the_caretaker-an_empty_bliss_beyond_this_world-6hr_loop.mp3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://stackoverflow.com/questions/246725/how-do-i-add-tab-completion-to-the-python-shell | |
# https://gist.github.com/twneale/5245670 | |
# | |
# add to ~/.pythonrc | |
# set environment: | |
# export PYTHONSTARTUP="$HOME/.pythonrc" | |
# | |
# enable syntax completion | |
try: | |
import readline |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SOLIPSISTIC ECLIPSE PUBLIC LICENSE | |
Version 1, NOVEMBER 2014 | |
Copyright (C) 2014 | |
Everyone is permitted to copy and distribute verbatim copies of this license | |
document. Modified copies of this document are permitted provided that they | |
denounce BOTH the original AND their copy as mere sense data with no verifiable | |
cause outside the mind. | |
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION |