Skip to content

Instantly share code, notes, and snippets.

View shokinn's full-sized avatar

Philip Henning shokinn

View GitHub Profile
@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 / 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"