Skip to content

Instantly share code, notes, and snippets.

View aeden's full-sized avatar

Anthony Eden aeden

View GitHub Profile
#!/usr/bin/env ruby
require 'dnsimple'
# Construct a client instance.
#
# If you want to connect to production, omit the `base_url` option.
#
# Note that in this case a bogus access token is being sent to show what happens when authentication
# fails.
client = Dnsimple::Client.new(base_url: "https://api.sandbox.dnsimple.com", access_token: "fake")
Verifying that +aeden is my blockchain ID. https://onename.com/aeden
@aeden
aeden / const2fun.rb
Last active May 16, 2016 06:58
Ruby script to convert erlang define to functions, for access from Elixir
#!/usr/bin/env ruby
# Converts all Erlang macro defines to Erlang functions.
# This is useful if you want to access those values from Elixir.
#
# If the defines are in an .hrl file, you should copy all of the
# defines into a .erl file first and then run the script on that
# .erl file. The script will copy the .erl file to .erl.old and
# then will overwrite the existing .erl file.
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Fetching custom git buildpack... done
remote: -----> Go app detected
remote: -----> Installing go1.4.1... done
remote: -----> Running: godep go install -tags heroku ./...
remote: service.go:7:2: cannot find package "github.com/miekg/dns" in any of:
remote: /app/tmp/cache/go1.4.1/go/src/github.com/miekg/dns (from $GOROOT)
remote: /tmp/build_85352959ffbe30770226bc78d7259c76/.heroku/g/src/github.com/aetrion/zonestatus/Godeps/_workspace/src/github.com/miekg/dns (from $GOPATH)
@aeden
aeden / caller.coffee
Last active August 29, 2015 14:06
Example code for Go Remote Control talk
module.exports = (robot) ->
# Stop a DNSimple name server, run chef-client and start it back up
robot.respond /deploy nameserver (\w+-\w+-\w+)$/i, (msg) ->
host = msg.match[1]
callGoRemoteControl(msg, host, 'update')
@aeden
aeden / dig-ns
Last active August 29, 2015 14:06
; <<>> DiG 9.8.3-P1 <<>> @ns1.contegix.com cc.getapp.com ns
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 65194
;; flags: qr aa rd; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 0
;; WARNING: recursion requested but not available
;; QUESTION SECTION:
;cc.getapp.com. IN NS

Keybase proof

I hereby claim:

  • I am aeden on github.
  • I am aeden (https://keybase.io/aeden) on keybase.
  • I have a public key whose fingerprint is A11F AA64 C6AA B355 9387 C87E 07B9 4E5A CDA4 BFAE

To claim this, I am signing this object:

DNS records get cached, as we have seen above. So if your DNS record is cached for IP address 1.2.3.4 and the service provider changes the record to 5.6.7.8, you will send traffic for your mapped apex domain to the wrong address until the record expires in all caching resolvers.

This is true for any cached request, not just an ALIAS. As a matter of fact, the way we implement the ALIAS record is to always attempt the lookup through an upstream caching resolver, so we are effectively behaving the same way a client sending the request directly to the caching resolver would.

You also potentially break geoIP optimisations because suddenly you request the IP address from the nameserver of your DNS provider, not from your actual location. This may even get you in trouble with location restricted services (think Unblock-Us, just not in an intended way).

With Anycast the results of geocaching can potentially be mitigated because the request will be resolved at an Anycast server near the client. As you add more

@aeden
aeden / podcasts.txt
Created May 28, 2013 11:56
Podcast Playlist
Morgan Page - In The Air
Arty - Together We Are
Corsten's Countdown
The Gareth Emery Podcast
Hardwell On Air
Tiesto's Club Life
Above & Beyond - Group Therapy