Skip to content

Instantly share code, notes, and snippets.

View designermonkey's full-sized avatar

John Porter designermonkey

View GitHub Profile
@designermonkey
designermonkey / gist:89ecada4c5c0592d760f22923d71fa23
Created April 8, 2019 18:20 — forked from so0k/gist:cdd24d0a4ad92014a1bc
droplet discovery over digitalocean private networks

Digital Ocean recently released private networking support in their NYC2 Data center.

They also published a blog post on how to setup a new droplet with private networking. But one thing the post doesn't do is tell you how to scale your private network for many boxes. One approach is obviously to edit /etc/hosts (but this gets annoying when you add a new box). A better way is to create an internal DNS zone (via the digital ocean web interface) and have your droplets use it:

Steps

setup the internal DNS zone file

  1. Login to digital ocean
  2. Click "DNS" on the right hand menu
@designermonkey
designermonkey / autossh.service
Created December 6, 2015 12:28 — forked from thomasfr/autossh.service
Systemd service for autossh
[Unit]
Description=Keeps a tunnel to 'remote.example.com' open
After=network.target
[Service]
User=autossh
# -p [PORT]
# -l [user]
# -M 0 --> no monitoring
# -N Just open the connection and do nothing (not interactive)
require 'formula'
class Phpunit < Formula
homepage 'http://www.phpunit.de/manual/current/en/index.html'
url 'https://phar.phpunit.de/phpunit.phar'
sha1 'dc693b34a62644f61cfc01a22d9654ff4b8764af'
version 'HEAD'
def install
bin.install "phpunit.phar" => "phpunit"
<?xml version="1.0" encoding="UTF-8"?>
<data>
<events>
<event>
<title>Recurring Exciting Event</title>
<date>2012-01-01</date>
<end-date>2014-12-31</end-date>
<recurring>yes</recurring>
<recurring-number>2</recurring-number>
<recurring-type>weeks</recurring-type>
<?xml version="1.0" encoding="UTF-8"?>
<data>
<products>
<entry id="1">
<name>Test</name>
<public-price>10.00</public-price>
<trade-price>8.00</trade-price>
</entry>
<entry id="2">
<name>Test</name>
<data>
<products>
<entry>one</entry>
<entry>two</entry>
<entry>three</entry>
<entry>four</entry>
<entry>five</entry>
<entry>six</entry>
<entry>seven</entry>
<entry>eight</entry>
<data>
<aspectratios>
<item name="onebyone">1</item>
<item name="onebytwo">0.5</item>
<item name="onebythree">0.33333</item>
<item name="twobyone">2</item>
<item name="twobythree">0.66667</item>
<item name="twobyfive">0.4</item>
<item name="threebyone">3</item>
<item name="threebytwo">1.5</item>
@media only screen and (min-width: 320px) {
/* Small screen, non-retina */
}
@media
only screen and (-webkit-min-device-pixel-ratio: 2) and (min-width: 320px),
only screen and ( min--moz-device-pixel-ratio: 2) and (min-width: 320px),
only screen and ( -o-min-device-pixel-ratio: 2/1) and (min-width: 320px),
<data>
<preferences>
<sitename>Client - Portfolio</sitename>
<languages>
<entry id="1" handle="english" lang="en">English</entry>
<entry id="2" handle="francais" lang="fr">Francais</entry>
</languages>
<stylesheets><entry id="1"><url link="http://link-to-main.stylesheet.css"/></entry></stylesheets>
<scripts><entry id="1"><url link="http://link-to-main.stylesheet.css"/></entry></scripts>
<navlinks>
<?xml version="1.0" encoding="UTF-8"?>
<data>
<Object>
<NVMVestigingNR>12093</NVMVestigingNR>
<ObjectCompany>42209</ObjectCompany>
<ObjectAfdeling>903782</ObjectAfdeling>
<ObjectTiaraID>1207204</ObjectTiaraID>
<ObjectSystemID>1186339</ObjectSystemID>
<ObjectCode>CM10208</ObjectCode>
<ObjectDetails>