Skip to content

Instantly share code, notes, and snippets.

View sneak's full-sized avatar

Jeffrey Paul sneak

View GitHub Profile
@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
$ http -j post https://api.steemit.com jsonrpc=2.0 id=1 method=condenser_api.get_ops_in_block params:='[20000000, true]'
@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:
@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 / 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
// 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,
#!/bin/bash
DESTPREFIX="papertrail/logs/12345"
BUCKET="org-global-papertrail-archive"
for FN in $(cat dailies.txt); do
ORIGPATH="old/$FN"
NEWDT=$(echo $FN | awk -F- '{print $1 "-" $2 "-" $3}')
NEWDT=$(echo $NEWDT | awk -F. '{print $1}')
NEWPATH="$DESTPREFIX/dt=$NEWDT/$FN"
@sneak
sneak / generate-pinlist.py
Created January 9, 2017 06:58
generate-pinlist.py
#!/usr/bin/env python
# (c) 2017 Jeffrey Paul <[email protected]> - All rights reserved.
#import ipfsapi
from sanelogging import log
from datetime import datetime
import json
import os
import os.path
import re
body {
margin:40px auto;
max-width: 650px;
line-height: 1.6;
font-size: 18px;
color: #444;
padding: 0 10px
}
h1,h2,h3 {