Skip to content

Instantly share code, notes, and snippets.

View vimagick's full-sized avatar
🐰
🐰🐰🐰🐰🐰🐰🐰🐰🐰

K̶e̶v̶i̶n̶ vimagick

🐰
🐰🐰🐰🐰🐰🐰🐰🐰🐰
View GitHub Profile
@vimagick
vimagick / build-shadowsocks-libev.sh
Last active December 15, 2023 09:37
Enable Logging for shadowsocks-libev 🈲️
sudo apt-get install --no-install-recommends gettext build-essential autoconf libtool libpcre3-dev libev-dev libc-ares-dev automake libmbedtls-dev libsodium-dev pkg-config
git clone --depth=1 --recurse-submodules https://github.com/shadowsocks/shadowsocks-libev.git
cd shadowsocks-libev
vim -p src/server.c src/resolv.c
./autogen.sh
CFLAGS="-Wno-unused-function" ./configure --prefix=/usr --disable-documentation
make -j$(getconf _NPROCESSORS_ONLN)
make install
#!/bin/bash
#
# https://music.xn--41a.ws/
#
BASE_URL=https://music.xn--41a.ws
TOTAL_PAGES=$(curl -s $BASE_URL | pup 'ul.listalka > li:last-child > a text{}')
for p in $(seq 1 $TOTAL_PAGES)
do
@vimagick
vimagick / shadowsocks
Last active July 27, 2023 17:16
(OpenWrt) /etc/config/shadowsocks && /etc/init.d/ss-tunnel
config port_forward 'world'
option local_port '5300'
option destination '8.8.4.4:53'
option mtu '1492'
list server 'nil'
config port_forward 'china'
option protocol 'udp'
option local_port '5353'
option destination '223.5.5.5:53'
#!/bin/bash
source /etc/profile.d/ecm_env.sh
source /etc/profile.d/hdfs.sh
now=$(date +%F)
ago=$(date -d '7 days ago' +%F)
echo "###### $now ######"
#!/bin/bash
#
# https://kodi.wiki/view/Databases/MyVideos
#
echo "select strFilename, lastPlayed from files where playCount > 0 order by lastPlayed desc limit 10" |
sqlite3 ~/.kodi/userdata/Database/MyVideos121.db
#/bin/bash
#
# Device Listing in Linksys Smart Wi-Fi
#
IPADDR=x.x.x.x
PASSWD=********
ACTION=devicelist/GetDevices
curl -s -H 'Content-Type: application/json' -H "X-JNAP-Authorization: Basic $(echo -n "admin:$PASSWD" | base64)" -H "X-JNAP-Action: http://linksys.com/jnap/$ACTION" http://$IPADDR/JNAP/ -d '{}' |
#!/bin/bash
#
# IPv4 Address by Country
#
declare -A URLS=(
[afrinic]='http://ftp.afrinic.net/pub/stats/afrinic/delegated-afrinic-extended-latest'
[apnic]='http://ftp.apnic.net/pub/stats/apnic/delegated-apnic-extended-latest'
[arin]='http://ftp.arin.net/pub/stats/arin/delegated-arin-extended-latest'
[ripe]='http://ftp.ripe.net/pub/stats/ripencc/delegated-ripencc-extended-latest'
#!/bin/bash
ufw status | awk '/telegram/ && /DENY FWD/{print $1}' | xargs -rt -n1 -I{} ufw route delete deny to {}
ufw status | awk '/telegram/ && /DENY OUT/{print $1}' | xargs -rt -n1 -I{} ufw rule delete deny out to {}
curl -s https://core.telegram.org/resources/cidr.txt | grep -v :: | xargs -rt -n1 -I{} ufw route insert 1 deny to {} comment telegram
curl -s https://core.telegram.org/resources/cidr.txt | grep -v :: | xargs -rt -n1 -I{} ufw rule insert 1 deny out to {} comment telegram
@vimagick
vimagick / imdb-top-1000.tsv
Last active April 16, 2025 05:56
IMDB Top 1000 (2025-04-16)
id title year rating votes genres
tt0111161 The Shawshank Redemption 1994 9.3 3032717 Drama
tt0068646 The Godfather 1972 9.2 2117036 Crime,Drama
tt0468569 The Dark Knight 2008 9 3009281 Action,Crime,Drama
tt0167260 The Lord of the Rings: The Return of the King 2003 9 2070954 Adventure,Drama,Fantasy
tt0108052 Schindler's List 1993 9 1517396 Biography,Drama,History
tt0071562 The Godfather Part II 1974 9 1424575 Crime,Drama
tt0050083 12 Angry Men 1957 9 921208 Crime,Drama
tt0110912 Pulp Fiction 1994 8.9 2326885 Crime,Drama
tt0120737 The Lord of the Rings: The Fellowship of the Ring 2001 8.9 2100870 Adventure,Drama,Fantasy