Skip to content

Instantly share code, notes, and snippets.

@HenryNe
HenryNe / failover.sh
Last active April 26, 2017 22:49 — forked from Apsu/failover.sh
An example failover script for dual WAN, using a ping healthcheck and managing default routes appropriately
#!/bin/bash
#
# Based on https://gist.github.com/Apsu/5021255 with two network interfaces,
# gateways can conneted on different network interfaces or in same network.
# Set defaults if not provided by environment
CHECK_DELAY=${CHECK_DELAY:-5}
CHECK_LOOPS=${CHECK_LOOPS:-3}
CHECK_IP=${CHECK_IP:-8.8.8.8}
PRIMARY_GW=${PRIMARY_GW:-192.168.0.1}
@HenryNe
HenryNe / vba_russian_transliterate.vb
Last active March 21, 2017 21:17 — forked from jenikm/vba_russian_transliterate.vb
VBA Russian transliterate function
'http://www.utf8-chartable.de/unicode-utf8-table.pl?start=1024&utf8=-&unicodeinhtml=dec
'use numerical HTML column
Function Transliterate(Russian As String)
letters = Array("A", "B", "V", "G", "D", "E", "Yo", "Zh", "Z", "I", "J", "K", "L", "M", "N", "O", "P", "R", "S", "T", "U", "F", "H", "Tz", "Ch", "Sh", "Shh", "", "Y", "", "Je", "Yu", "Ya", "a", "b", "v", "g", "d", "e", "yo", "zh", "z", "i", "j", "k", "l", "m", "n", "o", "p", "r", "s", "t", "u", "f", "h", "tz", "ch", "sh", "shh", "", "y", "", "je", "yu", "ya", "#")
i = 1040
For Each letter In letters
Dim val As String
Select Case letter
Case "Yo"
val = ChrW(1025)