This howto describes installing the extra kernel modules for the Tomato open-source router firmware. We will install them in the /opt/extras area.
- Router running Shibby's fork of TomatoUSB
- entware installed to a USB stick mounted at /opt
from typing import Any, Dict, List, Mapping, Union | |
# Values for JSON that aren't nested | |
JSON_v = Union[str, int, float, bool, None] | |
# If MyPy ever permits recursive definitions, just uncomment this: | |
# JSON = Union[List['JSON'], Mapping[str, 'JSON'], JSON_v] | |
# Until then, here's a multi-layer way to represent any (reasonable) JSON we | |
# might send or receive. It terminates at JSON_4, so the maximum depth of |
import re | |
from typing import List | |
from docutils import nodes | |
from docutils.nodes import Node | |
from docutils.statemachine import StringList, ViewList | |
import sphinx | |
from sphinx import addnodes | |
from sphinx.directives.other import TocTree |
#!/bin/sh | |
# The script configures simultaneous AP and Managed Mode Wifi on Raspberry Pi Zero W (should also work on Raspberry Pi 3) | |
# Usage: curl https://gist.githubusercontent.com/lukicdarkoo/6b92d182d37d0a10400060d8344f86e4/raw | sh -s WifiSSID WifiPass APSSID APPass | |
# Licence: GPLv3 | |
# Author: Darko Lukic <[email protected]> | |
# Special thanks to: https://albeec13.github.io/2017/09/26/raspberry-pi-zero-w-simultaneous-ap-and-managed-mode-wifi/ | |
MAC_ADDRESS="$(cat /sys/class/net/wlan0/address)" | |
CLIENT_SSID="${1}" | |
CLIENT_PASSPHRASE="${2}" |
from pprint import pformat | |
from typing import Any | |
from pygments import highlight | |
from pygments.formatters import Terminal256Formatter | |
from pygments.lexers import PythonLexer | |
def pprint_color(obj: Any) -> None: | |
"""Pretty-print in color.""" |
This howto describes installing entware for the Tomato open-source router firmware.
#!/bin/bash | |
# | |
# Replaces ${var:def} expressions in text files with environment variables with | |
# an optional default. | |
# | |
# Assuming VAR1 contains the value "foo" nad VAR2 is undefined, the following | |
# expressions will evaluate as given on the right side: | |
# | |
# ${VAR1} ~> foo | |
# ${VAR2:bar} ~> bar |
#! /bin/bash | |
# Description: show dependency tree | |
# Author: damphat | |
if [ $# != 1 ]; then | |
echo 'Usage: apt-rdepends-tree <package>' | |
echo 'Required packages: apt-rdepends' | |
exit 1 | |
fi |
A good commit message looks like this:
Header line: explaining the commit in one line
Body of commit message is a few lines of text, explaining things
in more detail, possibly giving some background about the issue
being fixed, etc etc.
The body of the commit message can be several paragraphs, and
please do proper word-wrap and keep columns shorter than about