Skip to content

Instantly share code, notes, and snippets.

Avatar

Michał Siatkowski atais

View GitHub Profile
@atais
atais / ddns-update
Last active Mar 25, 2020
update ddns on OVH
View ddns-update
#!/bin/sh
###
# Based on
# https://github.com/RMerl/asuswrt-merlin/wiki/Custom-DDNS#google-domains
# https://github.com/RMerl/asuswrt-merlin/wiki/Custom-DDNS#bind9-ddns-using-nsupdate
###
set -u
@atais
atais / ddns-check
Last active Mar 25, 2020
Check if ip is up to date
View ddns-check
#/bin/sh
CIP=$(curl http://192.168.0.1/sysbus/NMC:getWANStatus -XPOST | jq .data.IPAddress -r)
DIP=$(ping -c 1 -w 1 domain.pl | awk -F'[()]' '/PING/{print $2}')
if [ "$CIP" != "$DIP" ] ; then
echo "[$(date)] $CIP != $DIP"
/share/CE_CACHEDEV1_DATA/Web/ddns/ddns-update $CIP
else
echo "[$(date)] $CIP == $DIP"
@atais
atais / ubuntu_install.sh
Last active Jun 15, 2020
my apps, backup for clean install
View ubuntu_install.sh
#!/bin/bash
### no clutter
cd /tmp
### OpenVPN
# VPN: https://necromuralist.github.io/posts/openvpn-on-ubuntu-1804/
sudo apt install -y openvpn network-manager-openvpn network-manager-openvpn-gnome
### Git
@atais
atais / cookiebot.js
Last active Feb 7, 2018 — forked from jeresig/cookiebot.js
Simple bot for Particle Clicker
View cookiebot.js
clicker = {
start: function() {
this.clickInterval = setInterval(function(){
// Click the large cookie as fast as possible!
document.getElementById("detector-events").click();
}, 1);
},
stop: function() {
clearInterval(this.clickInterval);
}
@atais
atais / DisplayProductID-0
Last active Jun 1, 2019
Mac OS inverted colours problem
View DisplayProductID-0
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
<plist version="0.9">
<dict>
<key>DisplayProductID</key>
<integer>0</integer>
<key>DisplayVendorID</key>
<integer>16652</integer>
<key>IODisplayEDID</key>
<data>
@atais
atais / handbrake.sh
Created Jul 10, 2017
Batch convert DVD videos (with VIDEO_TS folder) to MKV using HandBrake CLI
View handbrake.sh
#!/bin/bash
###########
#
# Batch convert DVD Videos with HandBrake CLI
# The script will recursively look for "VIDEO_TS" folders and parse them
#
# Read this to understand:
# https://mattgadient.com/2013/06/12/a-best-settings-guide-for-handbrake-0-9-9/
# http://www.thewebernets.com/2015/02/28/easiest-best-optimal-settings-for-handbrake-dvd-video-conversion-on-mac-windows-and-linux/
#
View cask_backup.sh
## Other apps:
## Irfanview.app
## Video Container Switcher.app
## Snapseed.app
brew tap caskroom/versions
brew tap homebrew/boneyard
brew tap buo/cask-upgrade
brew install \
@atais
atais / cask_upgrade.sh
Last active Jun 4, 2020
Script upgrading outdated brew casks
View cask_upgrade.sh
#!/usr/bin/env bash
(set -x; brew update;)
(set -x; brew cleanup;)
(set -x; brew cask cleanup;)
red=`tput setaf 1`
green=`tput setaf 2`
reset=`tput sgr0`
You can’t perform that action at this time.