Skip to content

Instantly share code, notes, and snippets.

Dmitry Anisimov made-with-care

Block or report user

Report or block made-with-care

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@made-with-care
made-with-care / yandex-dyndns.sh
Created Apr 23, 2018
DynDNS for Yandex DNS Hosting
View yandex-dyndns.sh
#!/bin/sh
DOMAIN="example.com" # Domain name
RECORD_ID="12345678" # Record ID, you can grub it from https://pdd.yandex.ru on domain page
YANDEX_PDD_TOKEN="WUAP1LCGC5M1ERZ5KFGY6BNYAJMAZKID4S164FBE8E2ZHGKD4ACWO" # Generate it for your domain https://pddimp.yandex.ru/api2/admin/get_token
OLD_IP_PATH="/tmp/old_ip"
OLD_IP=$(cat $OLD_IP_PATH || export OLD_IP="1.1.1.1")
NEW_IP=$(curl -s https://yandex.ru/internet/ | grep -Eo -e '<div class="client__desc">([0-9\.]{8,16})</div>' | grep -Eo '[0-9\.]{8,16}')
if [[ "$NEW_IP" != "$OLD_IP" ]]
then
@made-with-care
made-with-care / Files or directories moved from OSX to Synology NAS is inaccessible.md
Created Apr 21, 2018
Files or directories moved from OSX to Synology NAS is inaccessible
View Files or directories moved from OSX to Synology NAS is inaccessible.md

Files or directories moved from OSX to Synology NAS is inaccessible

If files or directory is inaccessible you need to normalize it from UTF-8 C (OSX) to D (Linux)

  • Enable NFS on NAS
  • Setup NFS permission on NAS for target directory
  • From linux connect to NFS share (CentOS: mount.nfs -w 192.168.1.100:/volume1/datastore/ /mnt/)
  • Install convmv tool (CentOS: yum install convmv)
  • Open mounted directory
  • Run command convmv -r -f utf8 -t utf8 --nfc . (dry-run)
@made-with-care
made-with-care / RoyalTSX-Command-Task
Last active May 24, 2016
Mounting CIFS share from RoyalTSX
View RoyalTSX-Command-Task
0. Download mountCifs.scpt
1. Create command in Tasks subfolder
2. In Command tab specify
a. Command: osascript
b. Arguments: mountCifs.scpt $URI$ C$ "$EffectiveUsernameWithoutDomain$" "$EffectivePassword$"
c. Working Directory: path to mountCifs.scpt
3. In Credentials tab select "Use the context credentials" (for getting credentials from remote connection)
4. Mark task as favorite
5. Execute task on remote connection
6. (For Royal TSX 3.0.0.14 beta or newer) To hide terminal window pop-up disable "Run in Terminal" checkbox at General tab of task
You can’t perform that action at this time.