Skip to content

Instantly share code, notes, and snippets.

View shokinn's full-sized avatar

Philip Henning shokinn

View GitHub Profile

Keybase proof

I hereby claim:

  • I am shokinn on github.
  • I am philip_henning (https://keybase.io/philip_henning) on keybase.
  • I have a public key whose fingerprint is A171 CB48 9D79 2B23 FFD1 23C7 E24C 1780 06ED 3FBF

To claim this, I am signing this object:

@shokinn
shokinn / initramfs-unlocker.sh
Last active November 22, 2017 06:40 — forked from BinaryShrub/initramfs-unlocker.sh
LUKS remote decrypt (dropbear) for Ubuntu 16.04.1 on btrfs array
#!/bin/bash
## LUKS remote decrypt for Ubuntu 16.04.1 - by BinaryShrub
# NOTES:
# Tailor lines 108 - 110 to your system before running!
# Use at your own risk!
# Safety Check
if [ "$EUID" -ne 0 ]
then echo "You must run this as root"
@shokinn
shokinn / .wsl_fix
Last active June 18, 2020 21:13
WSL - Use KeePass KeeAgent for SSH Keys; Use external X11
## Just source this file in your .$SHELLrc
# Import SSH-Keys from KeePass KeeAgent
# Enable msysgit socken in KeeAgent!
if [[ -z $SSH_AUTH_SOCK ]]; then
export SSH_AUTH_SOCK="/tmp/.ssh-auth-sock"
fi
if [[ ! -f /tmp/msysgit2unix-socket.pid ]]; then
~/bin/msysgit2unix-socket.py /mnt/c/Users/$USER/keeagent.sock:$SSH_AUTH_SOCK
@shokinn
shokinn / windows_terminals_hotkeys.ahk
Created April 13, 2017 15:01
A little AHK-script to open WSL Terminal and Cmder
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
; Start WSL Terminal
#Enter::
Run, C:\tools\wsl-terminal\open-wsl.exe -l
Return

Keybase proof

I hereby claim:

  • I am shokinn on github.
  • I am pphg (https://keybase.io/pphg) on keybase.
  • I have a public key ASDWlJytUnzhjY_VAbqAVdyTtoJu10FrfrIoXj9H5OVkhAo

To claim this, I am signing this object:

@shokinn
shokinn / _blank_black.html
Last active September 22, 2017 09:02
Blank black page with centered text input box
<html>
<head>
<!DOCTYPE html>
<style>
@import url('https://fonts.googleapis.com/css?family=Roboto:300');
</style>
</head>
<body style="background: #000;">
<div style="width: 98%;
height: 100%;
@shokinn
shokinn / get_currency.js
Created December 15, 2017 09:40 — forked from fliptheweb/get_currency.js
Google Sheets Macros (Google App Script) for getting currency of number cell
CURRENCY_MAP = {
'$': 'USD',
'₽': 'RUB', // there is a missing character in editor font
'€': 'EUR',
'฿': 'THB'
}
function _formatToCurrency(formatString) {
var currencyRegexp = /\[.*(.)\]/g;
var currency = currencyRegexp.exec(formatString)[1];
@shokinn
shokinn / emby_updater.sh
Last active July 1, 2020 15:12
Emby Update script
#
# This script is depricated go to this repo to get the latest version:
# https://github.com/shokinn/emby-updater
#
#
#
# If you still need the old (bash) version, you can find it in the older Versions of this gist.
#
@shokinn
shokinn / concourse_updater.sh
Last active July 13, 2018 09:17
Concourse/Fly update/install scripts
#!/bin/bash
#
# App update script
# by Philip "ShokiNN'" Henning <mail@philip-henning.com>
#
# License: MIT
# Copyright 2018 Philip Henning
#
# 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:
@shokinn
shokinn / wsl_mount
Created September 1, 2018 18:33
WSL Windows drive un/mount scripts
#!/bin/bash
die () {
echo -e >&2 "$@"
exit 1
}
# check if script runs as root or via sudo
[ "$UID" -eq 0 ] || die "You have to run this script as root!"