Skip to content

Instantly share code, notes, and snippets.

Nathan Wittstock fardog

Block or report user

Report or block fardog

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@fardog
fardog / curls.txt
Created Apr 3, 2018
cloudflare dns-over-https broken json
View curls.txt
➜ ~ 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 Aug 26, 2017
Automatically publishing static websites
View .travis.yml
# 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 Nov 19, 2015
Deploying Web Services on Docker with nginx-proxy
View docker-nginx-proxy.md

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 Oct 25, 2015
uBlock Origin (or other blockers) and Google Contributor
View setup.md

[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

View keybase.md

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 Feb 5, 2017
A function for sending Wordpress Advanced Custom Fields (ACF) Repeater Field, Flexible Content Field, Gallery Field data with Thermal API.
View functions.php
<?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 Oct 25, 2013
npm-debug.log file from a failure to install sails
View gist:7147563
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',
You can’t perform that action at this time.