Skip to content

Instantly share code, notes, and snippets.

View AlbinoDrought's full-sized avatar
🇨🇦
Use AGPL

Sean AlbinoDrought

🇨🇦
Use AGPL
View GitHub Profile
@AlbinoDrought
AlbinoDrought / codes-canada.csv
Created April 9, 2020 22:00
Country Region Codes
Name Code
Alberta AB
British Columbia BC
Manitoba MB
New Brunswick NB
Newfoundland and Labrador NL
Northwest Territories NT
Nova Scotia NS
Nunavut NU
Ontario ON
@AlbinoDrought
AlbinoDrought / random-cowsay
Created March 20, 2020 18:47
Random Cowsay File
#!/bin/sh
cowsay -f $(ls /usr/share/cows | grep .cow | sed s/\\.cow$// | shuf -n 1)
@AlbinoDrought
AlbinoDrought / auto-tos-accept.user.js
Last active March 7, 2020 18:25
Automatically accept ToS and redeem Steam keys for those Humble Bundle "Redeem" links
// ==UserScript==
// @name Automatically accept ToS and redeem Steam keys
// @version 1
// @grant none
// @include https://store.steampowered.com/account/registerkey?key=*
// ==/UserScript==
window.addEventListener('load', function () {
var acceptTOS = document.querySelector('#accept_ssa');
if (acceptTOS) {
function wackRecording() {
if (!navigator.mediaDevices) {
console.error('getUserMedia not supported');
return Promise.reject();
}
const possibleCodecs = [
'video/webm',
'video/mp4',
];
@AlbinoDrought
AlbinoDrought / Dockerfile
Created July 17, 2019 21:06
Bastillion Dockerfile
FROM maven:3
ADD . /usr/src/app/
WORKDIR /usr/src/app
RUN git clone https://github.com/bastillion-io/lmvc.git && \
cd lmvc && \
mvn clean package install
RUN mvn package jetty:effective-web-xml
@AlbinoDrought
AlbinoDrought / creamy-cream.userscript.js
Last active July 16, 2019 22:55
Automatically rip commit details from bitbucket.org and pass them to a gotty script
// ==UserScript==
// @name Run creamy-cream build from bitbucket
// @version 1
// @grant none
// @match *://bitbucket.org/*/*/commits/*
// @match *://bitbucket.org/*/*/pull-requests/*
// @match *://bitbucket.org/*/*/branch/*
// ==/UserScript==
var element = document.createElement('button');
thingRoute(thing) {
for (let i = 0; i < this.data[1][0][1].length; i += 1) {
if(this.data[1][0][1][i].name === thing) {
this.things(this.data[1][0][1][i], i);
}
}
}
@AlbinoDrought
AlbinoDrought / vue_test_utils_cryptic_error.md
Last active June 13, 2019 17:42
@vue/test-utils error with vue-property-decorator, vue-class-component: "Property 'functional' is missing in type 'VueConstructor" [saved for later]

@vue/test-utils cryptic error

Encountered this and I know I'll end up making the same mistake again. Saving it here so I can hopefully find it on Bing ™️ in the future.

Error

Argument of type 'VueConstructor<Vue>' is not assignable to parameter of type 'FunctionalComponentOptions<Record<string, any>, PropsDefinition<Record<string, any>>>'.
  Property 'functional' is missing in type 'VueConstructor<Vue>' but required in type 'FunctionalComponentOptions<Record<string, any>, PropsDefinition<Record<string, any>>>'.
@AlbinoDrought
AlbinoDrought / README.md
Last active June 12, 2019 00:21
Drone 0.8 Bitbucket Fix "cannot find .drone.yml in refs/heads"

Drone 0.8 Bitbucket 1.0 Deprecation Fix

Download the diff to bitbucket-file-dl.diff after cloning

Applying directly into goroot:

go get -u github.com/drone/drone
cd $GOPATH/src/github.com/drone/drone
git fetch --all
@AlbinoDrought
AlbinoDrought / make-client-key.sh
Created April 18, 2017 23:15
Vault SSH Secret Backend quick and dirty setup
#!/bin/bash
FILE="client_key"
OUTPUT_FILE="client_key-cert.pub"
echo "Generating new key..."
ssh-keygen -t rsa -f $FILE -N ''
echo "Getting client key signed by Vault..."
cat $FILE.pub | vault write ssh-client-signer/sign/clientrole public_key=- | grep "signed_key" | cut -f 2 > $OUTPUT_FILE