Skip to content

Instantly share code, notes, and snippets.

View jkinred's full-sized avatar
🐵

Jonathan Kinred jkinred

🐵
View GitHub Profile
@jkinred
jkinred / sierrakeygen.py
Created January 4, 2021 09:44
Sierra Keygen
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# (c) B.Kerler 2019 under MIT license
# If you use my code, make sure you refer to my name
# If you want to use in a commercial product, ask me before integrating it
import serial
import sys
import argparse
from binascii import hexlify, unhexlify
@jkinred
jkinred / gist:0238fcb06c8ebbad65c6dbe7176f5aff
Created December 2, 2022 21:27
cimg/go:1.18-node failure
E: Sub-process returned an error code
E: Problem executing scripts APT::Update::Post-Invoke 'rm -f /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin || true'
E: Sub-process returned an error code
The command '/bin/bash -exo pipefail -c sudo apt-get update && sudo apt-get install -y RUN sudo apt-get update && sudo apt-get install -y rsync python3-pip git-lfs patchelf && sudo pip3 install pipenv ansible==2.9.10 'Jinja2<3.1' 'PyYAML<5.5' jmespath requests boto3 awscli Authlib' returned a non-zero code: 100
Exited with code exit status 100
@jkinred
jkinred / gist:a9d10f6c98d10e79f32567e0331dd1f3
Created September 13, 2019 03:32
All availability zones in all regions
for region in `aws ec2 describe-regions --all-regions | jq -r .Regions[].RegionName`; do aws ec2 describe-availability-zones --region $region | jq .AvailabilityZones[].ZoneName; done
@jkinred
jkinred / bootstrap_flux.md
Created July 18, 2018 10:51
Bootstrap Flux into a K8s cluster

Bootstrap flux into a cluster

These instructions assume a working cluster with the Helm Tiller already installed.

GIT_REPO=git@github.org:jkinred/flux-example
helm install \
    --name flux \
    --set helmOperator.create=true \

--set git.url=$GIT_REPO \

@jkinred
jkinred / gist:7964830
Last active December 31, 2015 09:09
Code used to combine a Compeo+ and 76s tracklog.
#!/usr/bin/env python
import datetime
from igc2kmz.igc import IGC
garmin = IGC(open('blackheath_blackville_garmin.igc'))
compeo = IGC(open('blackheath_blackville_compeo.igc'))
g_track = garmin.track()
c_track = compeo.track()
#!/usr/bin/env python
import datetime
from igc2kmz.igc import IGC
garmin = IGC(open('blackheath_blackville_garmin.igc'))
compeo = IGC(open('blackheath_blackville_compeo.igc'))
g_track = garmin.track()
c_track = compeo.track()
@jkinred
jkinred / MRI-41808-notests.patch
Last active December 28, 2015 11:29
Patch Ruby 1.8.7-p357 to build on Fedora 19.
--- trunk/ext/openssl/ossl_pkey_ec.c 2013/07/05 22:16:09 41807
+++ trunk/ext/openssl/ossl_pkey_ec.c 2013/07/05 22:46:42 41808
@@ -762,8 +762,10 @@
method = EC_GFp_mont_method();
} else if (id == s_GFp_nist) {
method = EC_GFp_nist_method();
+#if !defined(OPENSSL_NO_EC2M)
} else if (id == s_GF2m_simple) {
method = EC_GF2m_simple_method();
+#endif
@jkinred
jkinred / MRI-41808.patch
Last active December 28, 2015 11:29
Patch Ruby 1.9.3-p374 to build on Fedora 19.
--- trunk/ext/openssl/ossl_pkey_ec.c 2013/07/05 22:16:09 41807
+++ trunk/ext/openssl/ossl_pkey_ec.c 2013/07/05 22:46:42 41808
@@ -762,8 +762,10 @@
method = EC_GFp_mont_method();
} else if (id == s_GFp_nist) {
method = EC_GFp_nist_method();
+#if !defined(OPENSSL_NO_EC2M)
} else if (id == s_GF2m_simple) {
method = EC_GF2m_simple_method();
+#endif
class BuildResultKey(object):
def __init__(self, project_key, plan_key, job_key, build_number=None):
self.project_key = project_key
self.plan_key = plan_key
self.job_key = job_key
self.build_number = build_number
def __str__(self):
return "%s-%s-%s" % (self.project_key, self.plan_key, self.job_key)
@jkinred
jkinred / gist:3478641
Created August 26, 2012 12:41
Is this thread unsafe?
class Foo(object):
def __init__(self, client):
self._cache = {}
self.client = client
def get():
client.get_from_server()
class Bar(object):
def __init__(self, client):