Skip to content

Instantly share code, notes, and snippets.

View grkvlt's full-sized avatar
💭
🐧

Andrew Donald Kennedy grkvlt

💭
🐧
View GitHub Profile
@grkvlt
grkvlt / stealing-b747.md
Last active April 27, 2019 13:40
How to steal an unattended Boeing 747

Breaking into a Boeing 747

As described in Aviation Stack Exchange:

  1. Right foot on the aft part of the axle between the 2 front tires
  2. Then step up and swing left foot to the right tire top
  3. Straighten up with the right foot on left tire top 4.1. Then step up with one foot on open nose gear door structure 4.2. And the other foot
@grkvlt
grkvlt / stats.sql
Created February 27, 2019 20:43
ChristianRockOrNot Statistics SQL
SELECT
COUNT(TrackId) AS 'Tracks',
SUM(Total) AS 'Count',
SUM(Correct) AS 'Guessed',
(((SUM(Correct) * 100.0) / (SUM(Total) * 100.0)) * 100) AS 'Percent'
FROM ChristianRockOrNot;
@grkvlt
grkvlt / mail-forward-raw.txt
Created February 10, 2019 21:21
Raw text of forwarded email to christianrockornot.info domain
Delivered-To: andrew.international+christianrockornot@gmail.com
Received: by 2002:a2e:7f12:0:0:0:0:0 with SMTP id a18-v6csp1828327ljd;
Sun, 10 Feb 2019 13:10:47 -0800 (PST)
X-Google-Smtp-Source: AHgI3IbzJYQzSe1ctmdo9t1o73i6GB7H7KrCIkMjJswR2iIMY9gBb9Cr4dbkXuBcm6XGoTWL9y9F
X-Received: by 2002:a7b:c00f:: with SMTP id c15mr6775175wmb.14.1549833047746;
Sun, 10 Feb 2019 13:10:47 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1549833047; cv=none;
d=google.com; s=arc-20160816;
b=q1F7nprBKFky3c83WA0jNGdK7v4C3cT0YK+SoS9T5b2psc9DArMGKMV7D3uSefswoW
fFA38jo8Vest1zcEDPXpDTisHhe23mCVTkQejskRvx8QCB0Wm9bwPjH4ff0r22IgGEjH
@grkvlt
grkvlt / jabberwocky.md
Created January 26, 2019 21:45
Jabberwocky Translations

Jabberwocky

’Twas brillig, and the slithy toves Did gyre and gimble in the wabe: All mimsy were the borogoves, And the mome raths outgrabe.

“Beware the Jabberwock, my son! The jaws that bite, the claws that catch!

@grkvlt
grkvlt / microbit-pitch-roll-compass.js
Created January 25, 2019 02:55
Code for BBC micro:bit using gyroscope and compass
let heading = 0
let compass = 0
let roll = 0
let gyroscope = 0
let pitch = 0
input.onButtonPressed(Button.A, function () {
gyroscope = 0
compass = 1
basic.showLeds(`
. . . . .
@grkvlt
grkvlt / library-20180110.txt
Created January 10, 2018 18:24
Library Notes and Links 10 January 2018
- https://www.nfx.com/post/network-effects-manual
- https://medium.com/@nfx/70-of-value-in-tech-is-driven-by-network-effects-8c4788528e35
- https://medium.com/@nfx/the-network-effects-manual-13-different-network-effects-and-counting-a3e07b23017d
- https://www.kodak.com/US/en/corp/Press_center/KODAK_and_WENN_Digital_Partner_to_Launch_Major_Blockchain_Initiative_and_Cryptocurrency/default.htm
- https://github.com/ethereum/wiki/wiki/White-Paper
- https://randomascii.wordpress.com/2018/01/07/finding-a-cpu-design-bug-in-the-xbox-360/
@grkvlt
grkvlt / smallbank-workload
Last active December 20, 2017 19:48
Dockerfile for Sawtooth smallbank-workload Perf Tool
FROM ubuntu:xenial
# install packages required
WORKDIR /build
RUN apt-get update -y && \
apt-get install -y -q wget libssl-dev git curl python3 python3-pip && \
python3 -m pip install grpcio && \
python3 -m pip install grpcio-tools
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
RUN wget https://github.com/zeromq/libzmq/releases/download/v4.2.2/zeromq-4.2.2.tar.gz && \
@grkvlt
grkvlt / colour.java
Created October 15, 2017 20:09
Exploring Iterated Function Systems
int color = (int) (colour[p] * RGB24);
rgb[0] = (color >> 16) & 0xff;
rgb[1] = (color >> 8) & 0xff;
rgb[2] = (color >> 0) & 0xff;
if (render == Render.LOG_DENSITY_FLAME || render == Render.LOG_DENSITY_FLAME_INVERSE) {
float alpha = (float) (Math.log(density[p]) / density[p]);
alpha = (float) Math.pow(invert ? alpha : 1f - alpha, gamma);
rgb[0] *= alpha;
rgb[1] *= alpha;
rgb[2] *= alpha;
@grkvlt
grkvlt / histogram.java
Created October 15, 2017 20:08
Exploring Iterated Function Systems
// Density estimation histogram
if (render.isDensity()) {
try {
density[p] = LongMath.checkedAdd(density[p], 1l);
switch (render) {
case LOG_DENSITY_BLUR:
case LOG_DENSITY_BLUR_INVERSE:
density[p] = LongMath.checkedAdd(density[p], kernel - 1);
int q = (x / kernel) + (y / kernel) * (size.width / kernel);
blur[q] = LongMath.checkedAdd(blur[q], 1);
@grkvlt
grkvlt / density.java
Created October 15, 2017 20:07
Exploring Iterated Function Systems
// Paint pixels unless using density rendering
if (!render.isDensity()) {
// Apply controller gamma correction
Color.RGBtoHSB(color.getRed(), color.getGreen(), color.getBlue(), hsb);
g.setPaint(alpha(Color.HSBtoRGB(hsb[0],
unity().apply(hsb[1] * vibrancy).floatValue() * vibrancyLimit,
unity().apply(Math.pow(hsb[2], config.getGamma()) * vibrancy).floatValue() * vibrancyLimit),
octet().apply((int) (color.getAlpha() * vibrancy))));
rect.setLocation(x, y);
g.fill(rect);