Skip to content

Instantly share code, notes, and snippets.

View csrutil's full-sized avatar
🏠
Working from home

Csrutil csrutil

🏠
Working from home
  • N/A
  • Follow the white rabbit.
View GitHub Profile
@csrutil
csrutil / tmux-cheatsheet.markdown
Created March 5, 2024 03:06 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@csrutil
csrutil / signing-git-commits.md
Created August 10, 2023 07:36 — forked from phortuin/signing-git-commits.md
Set up a GPG key for signing Git commits on MacOS (M1)

Based on this blogpost.

To sign Git commits, you need a gpg key. GPG stands for GNU Privacy Guard and is the de facto implementation of the OpenPGP message format. PGP stands for ‘Pretty Good Privacy’ and is a standard to sign and encrypt messages.

Setting up

Install with Homebrew:

$ brew install gpg

ファームウェアデコード

デコード方法は公開されているOSSソースコードに含まれている。
WAX206_V1.0.4.0_Source.rar\WAX206_V1.0.4.0_Source\tools\imgencoder\ 以下
なんと鍵までOSSとして公開されている。

適当にデコードするpythonスクリプトを書いた。

Telnetの有効化

  1. WEBインターフェースにログイン
@csrutil
csrutil / uci-guest-wifi.sh
Created July 5, 2023 01:20 — forked from tongpu/uci-guest-wifi.sh
uci script for OpenWRT guest WiFi configuration
#!/bin/sh
uci batch << EOF
add network switch_vlan
set network.@switch_vlan[-1].device='switch0'
set network.@switch_vlan[-1].ports='1t 5t'
set network.@switch_vlan[-1].vlan='2'
set network.guest='interface'
set network.guest.type='bridge'
@csrutil
csrutil / psqlfix.txt
Created March 13, 2023 03:54 — forked from jyr/psqlfix.txt
Change postgres default template0 to UTF8 encoding
http://blog.desgrange.net/2012/06/05/caldav-carddav-debian-davical-ios-ical.html
mike@rbci:~$ psql -U postgres
psql (9.0.3)
Type "help" for help.
postgres=# update pg_database set datallowconn = TRUE where datname = 'template0';
UPDATE 1
postgres=# \c template0
You are now connected to database "template0".
# after the virtual disk has already been expanded (e.g. in proxmox)
apk add --no-cache cfdisk e2fsprogs-extra openssh-client
# choose partition then "Resize" > "Write" (to finalize)
cfdisk
# replace * with partition you are resizing
resize2fs /dev/*
@csrutil
csrutil / blokada-xiaomi-blocklist
Created March 11, 2019 12:43 — forked from trietphm/blokada-xiaomi-blocklist
Blokada Xiaomi Blocklist
0.0.0.0 a.stat.xiaomi.com
0.0.0.0 abtest.mistat.intl.xiaomi.com
0.0.0.0 abtest.mistat.xiaomi.com
0.0.0.0 ad.mi.com
0.0.0.0 ad.xiaomi.com
0.0.0.0 ad1.xiaomi.com
0.0.0.0 adv.sec.miui.com
0.0.0.0 api.account.xiaomi.com
0.0.0.0 api.ad.xiaomi.com
0.0.0.0 api.admob.xiaomi.com
@csrutil
csrutil / install.sh
Created February 13, 2018 09:55 — forked from tkuchiki/install.sh
nutcracker(twemproxy) for systemd
curl -L "https://drive.google.com/uc?id=0B6pVMMV5F5dfb1YwcThnaVZXbjg" -o nutcracker-0.4.1.tar.gz
tar zxf nutcracker-0.4.1.tar.gz
cd nutcracker-0.4.1
./configure --prefix=/usr
make
make install
mkdir /etc/nutcracker
cp conf/nutcracker.yml /etc/nutcracker
cat << 'EOC' > /lib/systemd/system/nutcracker.service