Skip to content

Instantly share code, notes, and snippets.

View nahanil's full-sized avatar
💭
Find me by the tumtum tree

Jarrod nahanil

💭
Find me by the tumtum tree
View GitHub Profile
@nahanil
nahanil / cloudflare-failover.sh
Created February 24, 2019 08:55 — forked from Ara4Sh/cloudflare-failover.sh
CloudFlare A records failover script using CloudFlare api v4 (https://api.cloudflare.com) required jq and curl to run.
#!/bin/bash
# Copyright (C) 2016 Arash Shams <https://github.com/Ara4Sh>.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@nahanil
nahanil / Raw vertical-bopomofo-ruby-text.css
Last active January 19, 2017 08:52
Vertical aligned Zhuyin/bopomofo ruby text with HTML & CSS (1st attempt)
p {
font-size: 1.9em;
color: #333;
}
ruby {
position: relative;
margin-right: 0.3em;
}
@nahanil
nahanil / validate_abn.js
Created December 7, 2016 08:36
Validate an ABN Australian Business Number
/**
* https://abr.business.gov.au/HelpAbnFormat.aspx
*/
function validateAbn(abn) {
// The Australian Business Number (ABN) is a unique 11 digit identifier issued to all entities registered in the Australian Business Register (ABR).
var digits = abn.toString().split('');
if (digits.length != 11) {
return false;
}
@nahanil
nahanil / PasswordGenerator.php
Last active November 29, 2016 01:57
Generating "Very Strong" Plesk passwords
<?php
function generatePassword($stronger = true) {
$password = "";
$length = $stronger ? 16 : 8;
$sets = array(
'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
'abcdefghijklmnopqrstuvwxyz',
'0123456789',
'!@#$%^&*?_~',