Skip to content

Instantly share code, notes, and snippets.

Avatar

Arti Zirk artizirk

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

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.

Rationale

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
reidrankin / wg-lla.sh
Created Jun 27, 2020
Calculates cryptographically-bound IPv6 Link-Local Addresses from WireGuard public keys.
View wg-lla.sh
#!/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
progandy / README.md
Last active Jan 19, 2021
Sway output mirror and screencast
View README.md

Sway output mirror and screencast

Mirror

wf-recorder

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
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
KaarelP2rtel / id-kaart-ssh.md
Last active Apr 20, 2020
SSH sisselogimine ID Kaardiga - muljeid aastast 2019
View id-kaart-ssh.md

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
teadur / awp_5.3.0.16.04.130_amd64.deb.postinst
Created Dec 6, 2018
awp_5.3.0.16.04.130_amd64.deb.postinst
View awp_5.3.0.16.04.130_amd64.deb.postinst
#!/bin/bash
NSSDB=$HOME/.pki/nssdb
MODUTIL="/usr/bin/modutil -force -dbdir sql:$NSSDB"
CERTUTIL="/usr/bin/certutil -d sql:$NSSDB"
LIBFILE=/usr/local/AWP/lib/libOcsPKCS11Wrapper.so
if [ -n "`which apt-get`" ];
then
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
mikroskeem / compile_bf.py
Last active Mar 3, 2019
Quick, dirty and sort of safe brainfuck compiler
View compile_bf.py
#!/usr/bin/env python3
import sys
import pprint
GENERATED_CODE_BASE = """/*
* Code generated using compile_bf.py
*/
#include <stdlib.h>
#include <stdio.h>
View gist:44352eadc141a2175e3390811f74e810
#!/usr/bin/env bash
mountSnapshots () {
mkdir -p "/mnt/$ZFSSNAPSHOTNAME"
mount -t zfs "$ZFSSNAPSHOTBASE@$ZFSSNAPSHOTNAME" "/mnt/$ZFSSNAPSHOTNAME"
while read -r line
do
MOUNTPATH=$(echo "$line" | sed "s/$ESCAPEDZFSSNAPSHOTBASE\///" | sed "s/@$ZFSSNAPSHOTNAME//")
View gist:71ccc05acedb03a2b400a32e52b769f9
#!/usr/bin/env bash
if [ $# -eq 2 ]
then
BASENAME=$(basename $1)
RUNNAME=rclone-$BASENAME
ZFSSNAPSHOTBASE=$(zfs list | grep "$BASENAME" | grep -v "$BASENAME/" | awk '{print $1}')
PIDFILE=/var/lock/$RUNNAME.pid
ISOTIME=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
YEAR=$(date -u +"%Y")
ZFSSNAPSHOTNAME="rclone"