Skip to content

Instantly share code, notes, and snippets.

View TerAnYu's full-sized avatar

Teremshonok Anton TerAnYu

  • Russia, Novosibirsk
View GitHub Profile
@danielvijge
danielvijge / upgrade-all-packages
Last active January 21, 2023 17:31
Upgrade all packages on OpenWRT router
#!/bin/ash
source /etc/openwrt_release
echo "$DISTRIB_ID $DISTRIB_RELEASE"
rm -f /tmp/releases.html
wget -q https://downloads.openwrt.org/releases/ -O /tmp/releases.html
LATEST_RELEASE=`grep -o 'href="[0-9.]*/"' /tmp/releases.html | tail -1 | cut -d'"' -f2 | cut -d'/' -f1`
rm -f /tmp/releases.html
@v12
v12 / yandex-ddns
Last active April 23, 2021 15:24
RouterOS (MikroTik) Yandex DNS subdomain A record updater.
########
# Name: yandex-ddns
# Author: v12
# URL: https://gist.github.com/v12/8892066
########
### Settings section
# There is no way of getting token automatically via script, so you should get it manually: https://pddimp.yandex.ru/get_token.xml?domain_name=example.com
@bzerangue
bzerangue / macs-on-active-directory.md
Last active October 12, 2023 21:07
Binding and Unbinding to Active Directory from Mac OS via Command Line

Binding and Unbinding to Active Directory from Mac OS via Command Line

  • Open the Terminal Application
  • Type in sudo -i and type in your Mac Administrator account password. sudo gives you root level or administrator level privileges.

To View current Active Directory Settings

dsconfigad -show

To Unbind a Computer from an Active Directory Domain

@KartikTalwar
KartikTalwar / Documentation.md
Last active May 9, 2024 12:59
Rsync over SSH - (40MB/s over 1GB NICs)

The fastest remote directory rsync over ssh archival I can muster (40MB/s over 1gb NICs)

This creates an archive that does the following:

rsync (Everyone seems to like -z, but it is much slower for me)

  • a: archive mode - rescursive, preserves owner, preserves permissions, preserves modification times, preserves group, copies symlinks as symlinks, preserves device files.
  • H: preserves hard-links
  • A: preserves ACLs