Skip to content

Instantly share code, notes, and snippets.


Drew Miller xer0x

  • Vancouver
View GitHub Profile
Phate6660 / rust recommendations and
Last active May 20, 2021
My growing list of Rust programs to use.
View rust recommendations and
Deborah-Digges /
Last active Aug 11, 2020
Send logs to Splunk

Hacky script to send a bunch of logs to splunk directly

Currently, we don't have a tool that can send

  • a specific set of logs
  • with the right shape
  • to a tenant
  • in any environment

We have a bunch of separate tools that do different parts of this. We need a way to consolidate this functionality into fox-cli.

marc-barry / handler.js
Created Jun 30, 2020
Cloudflare Worker for Auth0 Self-Managed Certificates
View handler.js
addEventListener('fetch', event => {
async function handleRequest(request) {
const url = new URL(request.url)
url.hostname = 'SOME_HOSTNAME' // i.e. ''
request = new Request(request)
request.headers.set('cname-api-key', 'SOME_KEY') // i.e. 'd4f2f3ef5a3ee3af4846127281d3450628bdc16d63e802dea75878fe9a63a279'
stefanjudis / console.js
Last active Jul 31, 2019
Suprising replacement patterns in String.prototype.replace
View console.js
const msg = 'This is a great message';
msg.replace('great', 'wonderful');
// "This is a wonderful message"
// -> 'great' is replaced by 'wonderful'
msg.replace('great', '$&-$&');
// "This is a great-great message"
// '$&' represents the matched substring
johncantrell97 /
Last active Feb 20, 2021
How I Obtained Satoshi's Treasure Keys 1, 2, and 3 in Minutes

Today (April 16th 2019 at noon) the first major clues to discover key #1 was set to be released in a few cities. A QR code with the words 'orbital' were found at these locations and looked like this: ( If you read the QR code with your phone you will be directed to this url:

At this URL you are prompted to input a passphrase to decrypt the first shard. An obvious first guess was to try the word 'orbital' from the QR code. Not suprisingly this worked! This reveals a congratulations page and presents the first key shard:


Now, we were supposed to wait until April 17th to get clues from the other cities for keys #2 and #3 but that wouldn't stop me from digging around with all the new information we had. All that time "playing" notpron ( years ago was going to help me here.

The first thing I noticed was

munificent / generate.c
Last active Jun 7, 2021
A random dungeon generator that fits on a business card
View generate.c
#include <time.h> // Robert Nystrom
#include <stdio.h> // @munificentbob
#include <stdlib.h> // for Ginny
#define r return // 2008-2019
#define l(a, b, c, d) for (i y=a;y\
<b; y++) for (int x = c; x < d; x++)
typedef int i;const i H=40;const i W
=80;i m[40][80];i g(i x){r rand()%x;
}void cave(i s){i w=g(10)+5;i h=g(6)
+3;i t=g(W-w-2)+1;i u=g(H-h-2)+1;l(u
mosquito /
Last active Jun 15, 2021
Add doker-compose as a systemd unit

Docker compose as a systemd unit

Create file /etc/systemd/system/docker-compose@.service. SystemD calling binaries using an absolute path. In my case is prefixed by /usr/local/bin, you should use paths specific for your environment.

Description=%i service with docker compose
csswizardry /
Last active Jun 15, 2021
Vim without NERD tree or CtrlP

Vim without NERD tree or CtrlP

I used to use NERD tree for quite a while, then switched to CtrlP for something a little more lightweight. My setup now includes zero file browser or tree view, and instead uses native Vim fuzzy search and auto-directory switching.

Fuzzy Search

There is a super sweet feature in Vim whereby you can fuzzy find your files using **/*, e.g.:

:vs **/*<partial file name><Tab>
Bhavdip /
Created Oct 6, 2016
Modify Sketch to never ending trial

###Sketch trial non stop

Open hosts files:

$ open /private/etc/hosts

Edit the file adding: