Skip to content

Instantly share code, notes, and snippets.

View *gecko*.txt
INFO [05-17|21:32:02] /networking/handshake_handlers.go#284: Attempting to discover peer at
INFO [05-17|21:32:02] /networking/handshake_handlers.go#284: Attempting to discover peer at
2020-05-17 21:32:02.232566 [net info] created <Conn fd=49 addr=<NetAddr> mode=active>
2020-05-17 21:32:02.233003 [net info] created <Conn fd=52 addr=<NetAddr> mode=active>
INFO [05-17|21:32:02] /networking/handshake_handlers.go#284: Attempting to discover peer at
INFO [05-17|21:32:02] /networking/handshake_handlers.go#284: Attempting to discover peer at
INFO [05-17|21:32:02] /networking/handshake_handlers.go#284: Attempting to discover peer at
2020-05-17 21:32:02.233926 [net info] created <Conn fd=55 addr=<NetAddr> mode=active>
2020-05-17 21:32:02.234637 [net info] created <Conn fd=58 addr=<NetAddr> mode=active>
2020-05-17 21:32:02.234889 [net in
bhyde /
Created Mar 30, 2020
Emacs entry for api

grammarbot sells a grammar checking API with a generous free variant. Here I load an emacs interface is found here zevlg/grammarbot.el at github.

(use-package grammarbot
  :quelpa (grammarbot :url "" :fetcher url)
  :commands grammarbot
  :config (progn
            (customize-set-variable 'grammarbot-api-key "KS9C5N3Y")))
bhyde / transcript
Created Feb 20, 2020
Transcript of failed install of wireguard on centos 8
View transcript
>->-> echo ==== Start $0 ====
==== Start /tmp/firstboot.exec ====
>->-> date
Thu Feb 20
14:41:29 UTC 2020
>->-> yum update -y
CentOS-8 - AppStream 15 kB/s | 4.3 kB 00:00
CentOS-8 - AppStream 17 MB/s | 6.4 MB 00:00
CentOS-8 - Base 14 kB/s | 3.8 kB 00:00
CentOS-8 - Base 12 MB/s | 5.0 MB 00:00
View weather.html
<img src=''>
<img '<img src=!1!1!&dd=&bw=&hrspan=48&pqpfhr=6&psnwhr=6'>
View foo.html
<p>That site is currently on vacation.</p>
bhyde /
Created Jan 5, 2018
context manager for boto3 ClientError
def ignoring_aws_client_error(code-text):
except ClientError as e:
if e.response['Error']['Code'] == code-text:
bhyde /
Created Aug 31, 2017
pyrasite script to dump thread tracebacks, merging those with identical tracebacks
# pyrasite script to dump all thread tracebacks, grouping
# together threads with identical tracebacks.
# pyrasite <pid>
# The report is appended to /tmp/report.txt
import os
import traceback
import sys
bhyde /
Last active Jun 28, 2017
Decorative dispatch table
class Dispatcher(object):
def __init__(self):
self.table = {}
def choice(self, key=None):
def decorator(fn):
self.table[key or fn.func_name] = fn
decorated_fn = fn
return decorated_fn
return decorator
bhyde /
Last active Jun 25, 2017 reworked for quelpa

This is a minor rework of outshine-lang so I can load it in my init file.

I do that via use-package + quelpa

Quelpa is a kind of virtual package repo that fetchs from files, github, etc.

So in my init file I find:

(use-package outshine
# Run the AWS cli on an ec2 instance with the security credentials of that instance
set -e
export IAM_ROLE=$(curl -s
export AWS_ACCESS_KEY_ID=$(curl -s${IAM_ROLE} |/usr/bin/jq -r .AccessKeyId)
export AWS_SECRET_ACCESS_KEY=$(curl -s${IAM_ROLE} |/usr/bin/jq -r .SecretAccessKey)
export AWS_SECURITY_TOKEN=$(curl -s${IAM_ROLE} |/usr/bin/jq -r .Token)
export AWS_DEFAULT_REGION=$(curl -s | sed 's/[a-z]$//')
# cat <<EOF