Skip to content

Instantly share code, notes, and snippets.

View xer0x's full-sized avatar

Drew Miller xer0x

  • SLUG/LAB
  • Vancouver
View GitHub Profile
@xer0x
xer0x / gist:caf82df9d1fffbed580d502aefab76ec
Last active July 9, 2023 00:57
Count occurrences in a list, and sort output.
// Read the list, and count the names after the @ symbols.
// current-history.txt format:
// @user1 @user2
const fs = require('fs');
const history = {};
const text = fs.readFileSync('current-history.txt', 'utf8');
@xer0x
xer0x / template.sh
Last active April 27, 2022 03:46
Maciej's minimal safe bash template
#!/usr/bin/env bash
# Minimal safe template for BASH from Maciej
# From https://betterdev.blog/minimal-safe-bash-script-template/
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
@xer0x
xer0x / http-get.nse
Created November 22, 2021 08:18
nmap script for http get
description = [[
Issues an arbitrary HTTP GET request
]]
---
-- @usage
-- nmap --script http-get [--script-args http-get.path=/status] -p <port> <host>
-- @args http-get.path The path to request (defaults to /)
-- http-get.match String to match in the HTTP response (incl. headers)
-- @output
@xer0x
xer0x / adelais_rev4_deborah.json
Last active September 12, 2021 09:17
Apple MAC/OSX friendly keyboard layout for TGR Alice/Adelais compatible PCBs using VIA firmware
{
"name": "Adelais Rev. 4",
"vendorProductId": 1296870659,
"macros": ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""],
"layers": [
[
"KC_GRV",
"KC_1",
"KC_2",
"KC_3",
@xer0x
xer0x / log_watcher.py
Last active February 22, 2019 17:47
Watch a log file
from datetime import datetime, timedelta
from sys import argv, exit
import time
import signal
def usage():
print '''
python log.py filename
@xer0x
xer0x / cachet.sh
Created February 22, 2017 23:02
Setup Cachet on Docker
#!/usr/bin/env bash
# Following the steps on https://docs.cachethq.io/docs/get-started-with-docker
setup () {
git clone https://github.com/cachethq/Docker.git cachet-docker
cd cachet-docker
@xer0x
xer0x / devopsdays.yvr.md
Created April 18, 2016 20:07
Notes from DevOpsDays

DevOpsDays Vancouver Notes

Intro on Friday

Demonware Capacity planning

  • Stories about lessons learned building matchmaking, leaderboards, and low latency large systems for Activision/Blizzard

Empathy Matt Smillie @notmatt

  • "Empathy is a fundamental engineering skill"
  • Can't find all the bugs

Keybase proof

I hereby claim:

  • I am xer0x on github.
  • I am xer0x (https://keybase.io/xer0x) on keybase.
  • I have a public key whose fingerprint is E0B8 C1EB 4F19 B91F A7CB 7DF4 D395 033D C773 4648

To claim this, I am signing this object:

#!/usr/bin/bash
#
# Copyright (c) 2011, 2012, Joyent Inc. All rights reserved.
#
# TODO http response from deleting a zone is not finding a "transition uri"
#set -o errexit
set -o pipefail
let g:SimplenoteUsername = "your simplenote username"
let g:SimplenotePassword = "your simplenote password"