Skip to content

Instantly share code, notes, and snippets.

View morganchristiansson's full-sized avatar

Morgan Christiansson morganchristiansson

View GitHub Profile
@morganchristiansson
morganchristiansson / extract-123-reg-zonefile.js
Created March 15, 2017 13:30 — forked from biinari/extract-123-reg-zonefile.js
Script to extract the DNS entries from 123-reg advanced dns page
var table = document.getElementsByClassName('advanced_dns')[0];
var rows = table.getElementsByTagName('tr');
var i, len, row;
var hostname, type, priority, ttl, destination;
var output = '';
output += '$TTL 600\n'; // start with default TTL
// skip header and last two rows (add new entry, delete all entries)
for (i = 1, len = rows.length - 2; i < len; i++) {
#!/usr/bin/env rackup
require 'forward'
run Rack::Forwarder.new('google.com')
[alias]
unmerged = !vim -o $(git-unmerged-files)