Skip to content

Instantly share code, notes, and snippets.

View sneak's full-sized avatar

Jeffrey Paul sneak

View GitHub Profile
// from https://medium.com/@dnorth98/analyzing-papertrail-logs-with-aws-athena-2427d3dd14f2#.nijavm26w
drop table papertrail.papertrail_logs;
CREATE EXTERNAL TABLE IF NOT EXISTS papertrail.papertrail_logs (
`id` bigint,
`generated_at` string,
`received_at` string,
`source_id` bigint,
@sneak
sneak / steemit.py
Created February 15, 2017 02:56
simple steemd client in Python3
#!/usr/bin/env python3
from pprint import pprint
from sanelogging import log
from uuid import uuid4 as uuid
import json
import requests
import sys
import time
@sneak
sneak / Vagrantfile
Created October 1, 2017 09:39
program md380 with vagrant/virtualbox with md380tools
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
config.vm.box = "bento/ubuntu-16.04"
@sneak
sneak / ingress-example.yml
Created October 2, 2018 07:15
multiple hostnames for single ingress
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
traefik.ingress.kubernetes.io/redirect-permanent: "true"
traefik.ingress.kubernetes.io/redirect-regex: ^https://www.helloworld2.domain.de/(.*)
traefik.ingress.kubernetes.io/redirect-replacement: https://helloworld2.domain.de/$1
name: helloworld2
namespace: default
spec:
$ http -j post https://api.steemit.com jsonrpc=2.0 id=1 method=condenser_api.get_ops_in_block params:='[20000000, true]'
@sneak
sneak / gist:b467c9e9e14b21edaaa5bc73938ca8eb
Created October 9, 2018 13:35
nokogiri fix for osx jekyll bundler ruby
bundle config build.nokogiri --use-system-libraries=true --with-xml2-include="$(xcrun --show-sdk-path)"/usr/include/libxml2
@sneak
sneak / vimrc
Created October 25, 2018 23:36
20181025 sneak vimrc
"execute pathogen#infect()
silent !mkdir -p ~/Library/Vim/backup > /dev/null 2>&1
silent !mkdir -p ~/Library/Vim/undo > /dev/null 2>&1
silent !mkdir -p ~/Library/vim/swap > /dev/null 2>&1
silent !mkdir -p ~/Documents/sync/vim/autoload > /dev/null 2>&1
silent !mkdir -p ~/Documents/sync/vim/plugged > /dev/null 2>&1
if empty(glob('~/Documents/sync/vim/autoload/plug.vim'))
silent !curl -fLo ~/Documents/sync/vim/autoload/plug.vim --create-dirs
docker run \
--name ubuntu-mirror \
-e UBUNTU_MIRROR_SOURCE=us.archive.ubuntu.com \
-e MIRROR_INTERVAL_SECONDS=10800 \
-e MIRROR_CATEGORIES=main,universe,restricted,multiverse \
-e MIRROR_ARCHITECTURES=amd64 \
-e UBUNTU_MIRROR_PROJECTS=bionic,bionic-updates,bionic-security,bionic-backports \
-v /storage/mirrors/ubuntu/ubuntu:/var/mirror/ubuntu \
-p 172.17.0.1:80:80/tcp \
-d sneak/ubuntumirror
@sneak
sneak / gist:a2198b2980b81054c9652d099cbcf39b
Created March 26, 2019 12:49
monitor zfs l2arc rates in realtime
watch --interval=1 'cat /proc/spl/kstat/zfs/arcstats | grep l2_'