Skip to content

Instantly share code, notes, and snippets.

View h4ckee's full-sized avatar

h4ckee h4ckee

View GitHub Profile
Go to
- https://firmware-selector.openwrt.org/?target=ramips%2Fmt7621&id=dlink_dir-2660-a1
- https://firmware-selector.openwrt.org/?target=ath79%2Fgeneric&id=tplink_tl-wdr3500-v1
- https://firmware-selector.openwrt.org/?target=ath79%2Fgeneric&id=glinet_gl-ar300m16
Select new version.
Install:
kmod-tcp-bbr
Install on D-Link:
# sudo strace -wcp 7813
strace: Process 7813 detached
% time seconds usecs/call calls errors syscall
------ ----------- ----------- --------- --------- ----------------
58.85 0.569705 9 59334 59322 recvmsg
...
------ ----------- ----------- --------- --------- ----------------
100.00 0.968044 95221 59424 total
# sudo strace -p 7813 2>&1 | grep recvmsg | sort | uniq
Wifi on LiveCD
kldload wlan_wep wlan_tkip wlan_ccmp wlan_gcmp iwn
ifconfig wlan0 create wlandev iwn0
ifconfig wlan0 up scan
wpa_passphrase SSID password > /tmp/wpa_supplicant.conf
wpa_supplicant -B -Dbsd -iwlan0 -c/tmp/wpa_supplicant.conf # "wired" driver for cable connection
dhclient wlan0
pkg version -vIL= # Checks for new versions in the ports index database
#!/bin/sh
import -window root png:- | \
convert png:- -blur 0x2 png:- | \
convert png:- ~/.config/bspwm/lock.png -gravity center -composite -matte /tmp/i3lock.png && \
i3lock -i /tmp/i3lock.png && \
rm /tmp/i3lock.png
#!/bin/bash
#
# System build script
#
if (( UID != 0 )); then
echo >&2 "===> Run ${0##*/} as root"
exit 1
elif [ ! -f /usr/bin/xorrisofs ]; then
echo >&2 "xorrisofs is not installed"
#!/bin/sh
VERSION="12.1-STABLE"
TYPE="snapshots"
SRCPATH="http://ftp2.ru.freebsd.org/pub/FreeBSD/${TYPE}/amd64/${VERSION}"
SRCFILE="src.txz"
OBJDIR="/usr/obj"
SRCDIR="/usr/src"
BKPDIR="/var/backups"
DSTDIR="/usr/local"
@h4ckee
h4ckee / pp
Last active August 19, 2020 20:48
#!/bin/sh
PRTDIR="/usr/ports"
[ -d ${PRTDIR}/editors/pico-alpine ] && rm -rf ${PRTDIR}/editors/pico-alpine
[ -d ${PRTDIR}/math/mumps ] && rm -rf ${PRTDIR}/math/mumps
sed -E -i '' \
-e 's/(^[ ]+)(indexinfo)/\1[ "$(which indexinfo)" ] \&\& \2/' \
${PRTDIR}/Keywords/info.ucl
export DOCKER_HOST=tcp://10.6.210.126:2375
export CONSUL_HTTP_TOKEN=a6379b6f-8c4b-3948-b95f-fd72f8bb3d63
export CONSUL_HTTP_ADDR=https://localhost:8501
export CONSUL_CACERT=consul-agent-ca.pem
export CONSUL_CLIENT_CERT=dc1-cli-consul-0.pem
export CONSUL_CLIENT_KEY=dc1-cli-consul-0-key.pem
doas -u consul consul agent -data-dir=/var/db/consul -config-dir=/usr/local/etc/consul.d
doas -u nomad nomad agent -data-dir=/var/db/nomad -config=/usr/local/etc/nomad
doas -u vault vault server -config=/usr/local/etc/vault.hcl -log-level=debug