Open a new session, named after the current working directory
$ tat -n
Attach to a named session, or create it if it does not exist
#!/usr/bin/env python3 | |
""" | |
Helper to generate `-target='<resource address>'` arguments to terraform operations | |
from Terraform output. Operates on text only and does not touch Terraform itself. | |
Writes output to stdout. | |
""" | |
import argparse | |
import hashlib | |
import io | |
import json |
/* | |
* Verify GitHub webhook signature header in Node.js | |
* Written by stigok and others (see gist link for contributor comments) | |
* https://gist.github.com/stigok/57d075c1cf2a609cb758898c0b202428 | |
* Licensed CC0 1.0 Universal | |
*/ | |
const crypto = require('crypto') | |
const express = require('express') | |
const bodyParser = require('body-parser') |
#include <stdio.h> // printf, sprintf, fprintf | |
#include <stdlib.h> // malloc | |
int main() { | |
const unsigned char bytearr[] = { 0x12, 0x34, 0x56, 0x78 }; | |
const size_t arrlen = sizeof(bytearr); | |
const size_t hexlen = 2; // hex representation of byte with leading zero | |
const size_t outstrlen = arrlen * hexlen; | |
char * outstr = malloc(outstrlen + 1); |
#!/bin.bash | |
# stigok 22-02-2018 | |
KEYDIR=/etc/initcpio/keys | |
function help { | |
cat <<EOF | |
This hook will embed decryption keys for the encrypted root device into | |
initramfs to automatically mount the root partition after a successful | |
decryption of the boot partition. |
clear lock | |
!Maps Caps-Lock as Level3 Shift | |
keycode 66 = Mode_switch ISO_Level3_Shift | |
!Norwegian alpha chars ÆØÅ | |
keycode 47 = semicolon colon oslash Oslash | |
keycode 48 = apostrophe quotedbl ae AE | |
keycode 34 = bracketleft braceleft aring Aring |
// Related blog post: | |
// https://blog.stigok.com/2019/08/06/golang-with-libnfc-bindings-and-a-acr122u-a9-tag-reader.html | |
package main | |
import ( | |
"fmt" | |
"log" | |
"github.com/fuzxxl/nfc/2.0/nfc" | |
) |
""" | |
En enkel demo for å initialisere en Vipps-transaksjon. | |
Returnerer en URL som kunden kan bruke til å fullføre transaksjonen. | |
Denne URL kan for eksempel enkodes som en QR-kode og skannes. | |
Koden er lisensiert som CC-BY | |
2020 stigok | |
https://creativecommons.org/licenses/by/4.0/legalcode.no | |
""" | |
import datetime |
#!/bin/bash | |
# Select active Kubernetes configuration file for the current terminal session. | |
# | |
# Usage: | |
# - Configure $all_configs variable in this file. It should be a directory | |
# containing kubectl configuration files. | |
# - Set $KUBECONFIG to the location of the symbolic link that will be created | |
# - Run this script | |
# | |
# This script is meant to be run using the following alias: |