Skip to content

Instantly share code, notes, and snippets.

View fardog's full-sized avatar

Nathan Wittstock fardog

View GitHub Profile
@fardog
fardog / curls.txt
Created April 3, 2018 05:40
cloudflare dns-over-https broken json
➜ ~ curl https://cloudflare-dns.com/dns-query\?ct\=application/dns-json\&name\=example.com\&type\=TXT
{"Status": 0,"TC": false,"RD": true, "RA": true, "AD": true,"CD": false,"Question":[{"name": "example.com.", "type": 16}],"Answer":[{"name": "example.com.", "type": 16, "TTL": 28, "data": ""v=spf1 -all""},{"name": "example.com.", "type": 16, "TTL": 28, "data": ""$Id: example.com 4415 2015-08-24 20:12:23Z davids $""}]}
➜ ~ curl https://cloudflare-dns.com/dns-query\?ct\=application/dns-json\&name\=example.com\&type\=TXT | python -m json.tool
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 319 100 319 0 0 2614 0 --:--:-- --:--:-- --:--:-- 2593
Expecting ',' delimiter: line 1 column 191 (char 190)
➜ ~
@fardog
fardog / .travis.yml
Last active August 26, 2017 20:57
Automatically publishing static websites
# go is not actually required for the build process, but I've
# had issues with golang on some lightweight distributions
# such as alpine; using the go image ensures that the build
# will not have any issues running hugo
language: go
go:
- 1.7
env:
global:
- HUGO_VERSION=0.26 # set in the environment to make it easy
@fardog
fardog / docker-nginx-proxy.md
Last active November 19, 2015 07:40
Deploying Web Services on Docker with nginx-proxy

Deploying Web Services on Docker with nginx-proxy

Note: This is an effort on keeping better notes on things I've set up and what works; please don't expect anything in this doc to be "right" or best practice. It's better to keep this than dig back through zsh history. :)

Project

I recently deployed [mkwords][], a web application built fully in Clojure/ClojureScript for selecting random words from a high quality default

@fardog
fardog / setup.md
Created October 25, 2015 07:14
uBlock Origin (or other blockers) and Google Contributor

[uBlock Origin][ublock] and [Google Contributor][contributor]

The following instructions were able to get Google Contributor working for me, without a complete compromise of my browser settings. Some compromise, but that's what this is all about.

I'll keep this document updates as I learn more.

Sign up for Google Contributor

Keybase proof

I hereby claim:

  • I am fardog on github.
  • I am milkandtang (https://keybase.io/milkandtang) on keybase.
  • I have a public key whose fingerprint is C63C 654B 61A2 24E9 6C6C 40E5 523D 140E 2CB7 29C1

To claim this, I am signing this object:

@fardog
fardog / functions.php
Last active February 5, 2017 19:46
A function for sending Wordpress Advanced Custom Fields (ACF) Repeater Field, Flexible Content Field, Gallery Field data with Thermal API.
<?php
function north_cast_api_data($content) {
if (is_numeric($content)) $content = intval($content);
else {
$unserialized_content = @unserialize($content);
// we got serialized content
if ($unserialized_content !== false) {
// make sure that integers are represented as such, instead of str
foreach ($unserialized_content as $fn => &$c) {
@fardog
fardog / gist:7147563
Created October 25, 2013 00:33
npm-debug.log file from a failure to install sails
0 info it worked if it ends with ok
1 verbose cli [ 'node', '/usr/local/bin/npm', 'install' ]
2 info using npm@1.3.11
3 info using node@v0.10.21
4 verbose readDependencies using package.json deps
5 verbose install where, deps [ '/Users/nwittstock/Dropbox/Code/extra',
5 verbose install [ 'sails',
5 verbose install 'sails-disk',
5 verbose install 'bcrypt',
5 verbose install 'jade',