Skip to content

Instantly share code, notes, and snippets.


Arti Zirk artizirk

View GitHub Profile
xirkus /
Last active Jan 18, 2021
Security Adventures 1. How to get yubikey+gpg+ssh+gitbhub working on MacOS

I've spent the day trying to get this setup working with GitHub and given the number of gotcha's I encountered, it seemed like a good idea to document how I finally got this working with as few hacks as possible. There's a lot of documentation out there (some of it old and misleading) and committing here for posterity will help me remember this when I inevitably need to do this again.


Passwords are simply not enough these days. Regardless of the company, breaches (and the associated Personally Identifiable Information harvested) are a matter of not if, but when. There are a number of things you can do to protect yourself, but being on the tin-foil-hat side of paranoia, means there are a few Commandents that I adhere to (and recommend for other folks)[Insert link to Fight Club Rules for the Secure Internet].

That being said, if you use 2-factor authentication and have committed to using a hardware token such as the Yubikey, then you're already ahead of the curve. The problem is that wh

reidrankin /
Created Jun 27, 2020
Calculates cryptographically-bound IPv6 Link-Local Addresses from WireGuard public keys.
#!/bin/bash -e
blake2s_mix() {
local A_NAME="$1"
local A="$2"
local B_NAME="$3"
local B="$4"
local C_NAME="$5"
local C="$6"
local D_NAME="$7"
progandy /
Last active Jan 19, 2021
Sway output mirror and screencast

Sway output mirror and screencast



With wf-recorder it is possible to record one output. When ffmpeg is compiled with sdl support, then it is possible to use "sdl" as the muxer and replay the recorded video instead of writing it to a file.

exdeniz / style.css
Created Jan 11, 2020
Nord Theme for
View style.css
* {
background-image: none;
window {
background-color: rgba(46, 52, 64, 0.9);
button {
background-color: #2e3440;
border-style: solid;
border-width: 0px;
KaarelP2rtel /
Last active Apr 20, 2020
SSH sisselogimine ID Kaardiga - muljeid aastast 2019

SSH autentimine ID Kaardiga - muljeid aastast 2019

(English version below)

Juhiseid, kuidas ID-Kaardiga logida SSH kaudu sisse on kirjutatud juba 2011 aastast. Kirjutan natuke oma tähelepanekutest 2019 aastal ning ka sellest, kuidas kasutada ID Kaarti Windowsis Puttyga.

Smartcardi kasutamine võimaldab SSH ligipääsu erinevatest masinatest nii, et ei pea hakkama igas masinas võtmeid genereerima või masinate vahel võtmeid kopeerima. ID Kaart peaks olema enamustel Eestlastel olemas olema, seega hea võimalus on seda ära kasutada.

Linux (Ubuntu 19.10+)

1. Vajalik tarkvara

openssh-client versioon 8+

teadur / awp_5.
Created Dec 6, 2018
View awp_5.
MODUTIL="/usr/bin/modutil -force -dbdir sql:$NSSDB"
CERTUTIL="/usr/bin/certutil -d sql:$NSSDB"
if [ -n "`which apt-get`" ];
sudo apt-get -y install libnss3-tools 2>/dev/null
View AuthyToOtherAuthenticator.js
/* base32 */
Copyright (c) 2011, Chris Umbel
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
mikroskeem /
Last active Mar 3, 2019
Quick, dirty and sort of safe brainfuck compiler
#!/usr/bin/env python3
import sys
import pprint
* Code generated using
#include <stdlib.h>
#include <stdio.h>
View gist:44352eadc141a2175e3390811f74e810
#!/usr/bin/env bash
mountSnapshots () {
mkdir -p "/mnt/$ZFSSNAPSHOTNAME"
while read -r line
MOUNTPATH=$(echo "$line" | sed "s/$ESCAPEDZFSSNAPSHOTBASE\///" | sed "s/@$ZFSSNAPSHOTNAME//")
View gist:71ccc05acedb03a2b400a32e52b769f9
#!/usr/bin/env bash
if [ $# -eq 2 ]
BASENAME=$(basename $1)
ZFSSNAPSHOTBASE=$(zfs list | grep "$BASENAME" | grep -v "$BASENAME/" | awk '{print $1}')
ISOTIME=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
YEAR=$(date -u +"%Y")