Skip to content

Instantly share code, notes, and snippets.

View micxer's full-sized avatar

Michael Weinrich micxer

View GitHub Profile
@micxer
micxer / better-git-branch.sh
Last active March 18, 2024 14:47 — forked from schacon/better-git-branch.sh
Better Git Branch output
#!/bin/bash
# Colors
RED='\033[0;31m'
GREEN='\033[0;32m'
NO_COLOR='\033[0m'
BLUE='\033[0;34m'
YELLOW='\033[0;33m'
NO_COLOR='\033[0m'
@micxer
micxer / bookmarks.md
Last active March 1, 2022 07:39
Link collection
@micxer
micxer / macapp.go
Created January 26, 2022 14:27 — forked from mholt/macapp.go
Distribute your Go program (or any single binary) as a native macOS application
// Package main is a sample macOS-app-bundling program to demonstrate how to
// automate the process described in this tutorial:
//
// https://medium.com/@mattholt/packaging-a-go-application-for-macos-f7084b00f6b5
//
// Bundling the .app is the first thing it does, and creating the DMG is the
// second. Making the DMG is optional, and is only done if you provide
// the template DMG file, which you have to create beforehand.
//
// Example use:
@micxer
micxer / openpgp.md
Created February 4, 2021 12:55
Keyoxide Proof
@micxer
micxer / 1-setup.md
Created September 11, 2020 07:06 — forked from troyfontaine/1-setup.md
Signing your Git Commits using GPG on MacOS Sierra/High Sierra

Methods of Signing with GPG

There are now two ways to approach this:

  1. Using gpg and generating keys
  2. Using Kryptonite by krypt.co

This Gist explains how to do this using gpg in a step-by-step fashion. Kryptonite is actually wickedly easy to use-but you will still need to follow the instructions

For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing with either GPG or Krypt.co.

@micxer
micxer / configure-macos.sh
Created July 9, 2020 11:58 — forked from seize-the-dave/configure-macos.sh
Script to install everything onto a new Mac
# Install command line developer tools
xcode-select --install
# Install Brew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Reset brew
brew update
brew upgrade brew-cask
brew cleanup
@micxer
micxer / generate_wifi_qrcode.sh
Created May 11, 2020 07:01
Genreate a WiFi QR code
#!/usr/bin/env bash
# based on https://feeding.cloud.geek.nz/posts/encoding-wifi-access-point-passwords-qr-code/
SSID="$1"
PW="$2"
qrencode -o wifi.png "WIFI:T:WPA;S:${SSID};P:$(echo $PW | sed -e 's/:;/\\\\1/g');;"
@micxer
micxer / getting-started-with-wireguard.md
Created April 16, 2020 20:21
Getting started with wireguard
layout title type tag description date draft
blog-post
Getting Started with WireGuard
blog
WireGuard
VPN
Linux
Tutorial
Learn how to set up a WireGuard VPN tunnel
2020-04-05 00:00:00 +0000
false

WireGuard is a relatively new VPN tunnel protocol that aims to be very fast and easy to setup. It follows the Unix Philosophy closely in that it only does one thing (creating secured VPN tunnels) and does it well.

@micxer
micxer / post.md
Created December 22, 2019 13:35
Cracking LUKS/dm-crypt passphrases

Linux uses dm-crypt in order to provide transparent disk or partition encryption. What are the options in case you need to recover passphrase from such encryption? There are already ready-made tools, but we have also produced and published our own in order to support newer LUKS format/ciphers/hashing.

dm-crypt is a transparent disk encryption subsystem in the Linux kernel. It is implemented as a device mapper target and may be stacked on top of other device mapper transformations. It can thus encrypt whole disks (including removable media), partitions, software RAID volumes, logical volumes, as well as files. It appears as a block device, which can be used to back file systems, swap or as an LVM physical volume.

There are many formats or types which dm-crypt/cryptsetup support (current version supports luks, luks1, luks2, plain, loopaes, tcrypt), but the most commons ones are LUKS1 and LUKS2, where LUKS2 is an obviously newer format, which uses argon2i by default. It is a less known fact that cryptsetup s

@micxer
micxer / PrintRevealNotes.js
Created July 15, 2019 14:20 — forked from pgaskin/PrintRevealNotes.js
Prints speaker notes for a reveal.js presentation.
/*
Prints speaker notes for a reveal.js presentation.
To print the notes, run the js function PrintRevealNotes()
You need to disable the pop-up blocker
Copyright 2016 Patrick G
http://geek1011.github.io
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: