Skip to content

Instantly share code, notes, and snippets.

@alekseyp
alekseyp / htaccess2netlify.sh
Last active April 20, 2020 20:05
htaccess to netlify
#Convert Tilda.cc htaccess to netlify _redirects
grep DirectoryIndex htaccess | awk -F' ' '{print "/", "/"$2, 200}' > _redirects
grep RewriteRule htaccess | grep -v 'robots'| awk -F' ' '{print $2, $3, 200}' | sed -e 's/\^/\//g' | sed -e 's/\$//g' >> _redirects
@alekseyp
alekseyp / 00README.md
Created April 24, 2019 16:04 — forked from smarek/00README.md
E3372s-153 from Stick mode to HiLink mode automatic installer

E3372s from STICK to HiLink mode installer

You need

  • curl, usb-modeswitch, grep, awk, sudo (not necessary, last step can fail safely)
  • balong_flash in $PATH ( https://github.com/forth32/balongflash.git )
  • atinout in $PATH ( https://github.com/beralt/atinout.git will work fine )
  • 2 files we flash (core sw update version 22.x, WebUI installer), we use these (you can probably use different balong-compatible):
    • core sw: "E3372sUpdate_22.298.03.02.965.BIN" / "E3372sUpdate_22.298.03.02.965.exe"
    • webui: "Update_WEBUI_17.100.06.00.03_Hilink_V7R2_9x25_CPIO.exe"
@alekseyp
alekseyp / cloudflare crontab
Last active April 22, 2018 03:06
HAProxy + CloudFLare
@monthly wget https://www.cloudflare.com/ips-v4 -O /etc/haproxy/cf-ips-v4 && service haproxy reload