docker-compose.yml
proxysql:
image: proxysql/proxysql
ports:
- 16032:6032
# Performance settings (it's defaults in OEM firmware, but need to by ajusted for NetApp disks) | |
ACTION=="add|change", KERNEL=="sd[a-z]*", ENV{ID_BUS}="scsi", RUN+="/usr/bin/sdparm -s --clear=RCD /dev/%k" | |
ACTION=="add|change", KERNEL=="sd[a-z]*", ENV{ID_BUS}="scsi", RUN+="/usr/bin/sdparm -s --clear=DRA /dev/%k" | |
ACTION=="add|change", KERNEL=="sd[a-z]*", ENV{ID_BUS}="scsi", RUN+="/usr/bin/sdparm -s --set=PERF /dev/%k" | |
ACTION=="add|change", KERNEL=="sd[a-z]*", ENV{ID_BUS}="scsi", RUN+="/usr/bin/sdparm -s --set=WCE /dev/%k" | |
# Background media scan (for SAS disks) | |
ACTION=="add|change", KERNEL=="sd[a-z]*", ENV{ID_BUS}="scsi", RUN+="/usr/bin/sdparm -p bc -s EN_BMS=1 /dev/%k" | |
ACTION=="add|change", KERNEL=="sd[a-z]*", ENV{ID_BUS}="scsi", RUN+="/usr/bin/sdparm -p bc -s BMS_I=48 /dev/%k" | |
ACTION=="add|change", KERNEL=="sd[a-z]*", ENV{ID_BUS}="scsi", RUN+="/usr/bin/sdparm -p bc -s MIN_IDLE=2000 /dev/%k" | |
ACTION=="add|change", KERNEL=="sd[a-z]*", ENV{ID_BUS}="scsi", RUN+="/usr/bin/sdparm -p bc -s MAX_SUSP=500 /dev/%k" |
U-Boot 2009.11-00043-gf4c39d3-serengeti_DEV_1.19.01 (Feb 15 2012 - 10:40:18) | |
CPU: AMCC PowerPC 460 APM86290 at 1000 MHz PLB=500 MHz | |
(SOC=1000 AXI=250 AHB=166 APB=83 EBC=100) | |
Internal PCI arbiter disabled | |
32 kB I-Cache 32 kB D-Cache | |
Board: Fullerene-2 - Meraki Fullerene Cloud Managed Router | |
I2C: ready | |
DRAM: -2 GB at 800MHz | |
Default enable MDIO for ETH0 |
Caveats!! a human brain must be used !!!
First, get ALL your access IPs from your HTTP server
cut -d' ' -f1 /var/log/nginx/access.log | sort | uniq > /tmp/all_ips
Now we can use a docker image to have the IPtoASN API https://iptoasn.com/ running locally
docker run -itd --name my-iptoasn -p 80:53661 ilyaglow/iptoasn-webservice
apiVersion: v1 | |
kind: Namespace | |
metadata: | |
name: echoserver | |
--- | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: echoserver | |
namespace: echoserver |
### Keyboard config | |
d-i debian-installer/locale string en_US.UTF-8 | |
d-i console-setup/ask_detect boolean false | |
d-i keyboard-configuration/layoutcode string us | |
d-i keyboard-configuration/xkb-keymap us | |
d-i keyboard-configuration/xkb-keymap select us | |
d-i keyboard-configuration/toggle select No toggling | |
d-i keyboard-configuration/variantcode string American English | |
### Network configuration |
I've been playing around with a Raspberry Pi hosted with Mythic Beasts and wanted a way to keep a large number of infrequently-accessed files on the server. A cost-effective place to store such data is on Amazon S3. After looking around at ways to mount an S3 bucket on the Raspberry Pi and have it appear as a regular filesystem, I came across s3backer. This provides a single file, divided into blocks, each of which is stored as an S3 object. A filesystem is mounted onto this file using a loopback mount. This setup has many benefits which are explained well in the README. Here's how to set it up on the Raspberry Pi.
I'm going to assume that you have an S3 bucket mybucket created and a user with credentials to access it. Although not explicitly specified, some of the commands below need to be run as root.
First, install prerequisites (the first line is
#!/bin/bash | |
export DEBCONF_FRONTEND=noninteractive | |
apt-get -y purge console-setup | |
apt-get update | |
apt-get -o Dpkg::Options::="--force-confold" -o Dpkg::Options::="--force-confdef" install -yq libghc-zlib-dev gperf build-essential make wget libreadline-dev git ccache libmicrohttpd-dev libssl-dev cmake libgflags-dev --allow-downgrades --allow-remove-essential --allow-change-held-packages | |
apt-get -o Dpkg::Options::="--force-confold" -o Dpkg::Options::="--force-confdef" dist-upgrade -yq | |
cd /usr/src | |
git clone --recurse-submodules -j8 https://github.com/ton-blockchain/ton | |
mkdir /tmp/ton-build | |
cd /tmp/ton-build |
#!/bin/bash | |
# Place me in /etc/hotplug.d/iface/99-keepwanalive | |
IFNAME='wlan0' | |
if [ "$ACTION" = "ifdown" -a "$INTERFACE" = "$IFNAME" ]; then | |
COUNTER=0 | |
PASS=0 | |
while [ $PASS -eq 0 ] |
#!/bin/bash | |
nethex=`echo ${1}|cut -f2 -d_|sed 's/HOTBOX//'|tr '[:upper:]' '[:lower:]'` | |
dict='/tmp/hothex.dict' | |
append_hex () { | |
while read pref | |
do | |
from=00 to=ff | |
if test "${#from}" -gt "${#to}"; then | |
format="$pref%0${#from}x$nethex\n" |