Skip to content

Instantly share code, notes, and snippets.

View fentas's full-sized avatar
🐷
Oink.

Jan Guth fentas

🐷
Oink.
View GitHub Profile
@fentas
fentas / unsplash
Created February 12, 2019 10:33
random unsplash wallpaper
#!/bin/sh
ids=(
"1111575" # space
"176" # unsplash
"562095" # Wilderness Artifacts
"164" # Brevitē
"151749" # Follow Me
"397770" # Coffee House
)
@fentas
fentas / read .env file
Created February 9, 2019 12:40
simple dot env file loading in bash
export $(grep -v '^#' .env | xargs -d '\n')
@fentas
fentas / bash_iniparse.sh
Created January 24, 2019 16:59 — forked from splaspood/bash_iniparse.sh
Parsing INI Files with Bash
cfg.parser () {
fixed_file=$(cat $1 | sed 's/ = /=/g') # fix ' = ' to be '='
IFS=$'\n' && ini=( $fixed_file ) # convert to line-array
ini=( ${ini[*]//;*/} ) # remove comments
ini=( ${ini[*]/#[/\}$'\n'cfg.section.} ) # set section prefix
ini=( ${ini[*]/%]/ \(} ) # convert text2function (1)
ini=( ${ini[*]/=/=\( } ) # convert item to array
ini=( ${ini[*]/%/ \)} ) # close array parenthesis
ini=( ${ini[*]/%\( \)/\(\) \{} ) # convert text2function (2)
ini=( ${ini[*]/%\} \)/\}} ) # remove extra parenthesis
@fentas
fentas / console
Created May 21, 2018 13:15 — forked from dmitriy-kiriyenko/console
Init.d to start/stop xvfb. Put it into /etc/init.d and chmod it to 755
apt-get install xvfb
apt-get install firefox
@fentas
fentas / tcpproxy.js
Created April 13, 2018 13:09 — forked from kfox/tcpproxy.js
A basic TCP proxy written in node.js
var net = require("net");
process.on("uncaughtException", function(error) {
console.error(error);
});
if (process.argv.length != 5) {
console.log("usage: %s <localport> <remotehost> <remoteport>", process.argv[1]);
process.exit();
}
@fentas
fentas / public_pem_to_openssh.go
Created February 15, 2018 20:33 — forked from sriramsa/public_pem_to_openssh.go
Golang: Convert Public key PEM bytes to Open SSH format
const (
samplePEMKeyA = `
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApIBaVZ8A6HraVxIVGEU+
psJx8S4nFQQykrJ751aicMUNFYThT/tl5Gvvl4H9eimB06iNf4zqnrvKwgtCYjFp
a5rJoaSxA675FBzYpzsHeygnPkt98mFGLRS6SJdNhvuE5QT6ostiLBufdpIyvSUP
cKdwL7ti8QyX3v8Lm7JrJ+DiGW8y3XYWm5kzlHdbah3DB2z2xh9+sQ1orXcxFTf7
CzVmfoTTO+QkeeTz/HG0gRu+EH1cxkMKP/BS8qOrFBFGWt3B/Vv0/lG4AILag+Dn
x4FfMxhlPtIXW4eUc5/SGaNHarJVN4y6mz4I3NvL3abMAWqpX1U9p/iO5kMLlFQX
qQIDAQAB
[2017-10-31T13:38:30] INFO: watchdog status: ok
[2017-10-31T13:38:31] INFO: OpenSSL 1.0.2 22 Jan 2015
[2017-10-31T13:38:31] DEBUG1: openSSL : compiler: cl /MD /Ox -DOPENSSL_THREADS -DDSO_WIN32 -W3 -Gs0 -Gy -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DUNICODE -D_UNICODE -D_CRT_SECURE_NO_DEPRECATE -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DOPENSSL_USE_APPLINK -I. -DOPENSSL_NO_RC5 -DOPENSSL_NO_MD2 -DOPENSSL_NO_KRB5 -DOPENSSL_NO_JPAKE -DOPENSSL_NO_STATIC_ENGINE
[2017-10-31T13:38:31] DEBUG1: openSSL : built on: reproducible build, date unspecified
[2017-10-31T13:38:31] DEBUG1: openSSL : VC-WIN64A
[2017-10-31T13:38:31] DEBUG1: OPENSSLDIR: "/usr/local/ssl"
[2017-10-31T13:38:31] DEBUG: started process, session=1, elevated: no, command="C:/Program Files/Synergy/synergys.exe" -f --no-tray --debug DEBUG1 --name DESKTOP-7B
@fentas
fentas / update_canary.sh
Created July 27, 2017 12:26 — forked from tifletcher/update_canary.sh
chrome canary for linux
#!/bin/bash
#
# Update to latest chromium nightly on linux
# Script requires root to properly set up the sandbox
# https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment
#
# I use it with a line like the following in my .bashrc:
# alias canary='CHROME_DEVEL_SANDBOX="/home/tif/bin/chrome-linux/chrome_sandbox" /home/tif/bin/chrome-linux/chrome-wrapper'
#
# ----------------------------------------------------------------------
Commit Type Emoji Code UTF-8
Initial Commit 🎉 :tada:
Version Tag 🔖 :bookmark:
New Feature :sparkles:
Bugfix 🐛 :bug:
Metadata 📇 :card_index:
Refactoring ♻️ :recycle:
Documentation 📚 :books:
Internationalization 🌐 `:globe_with_merid
https://github.com/jaagr/dots/tree/master/.local/etc/themer/themes/space
https://github.com/ryanoasis/nerd-fonts/releases/tag/v1.0.0
http://ftp.openbsd.dk/pub/getdeb/ubuntu/pool/apps/p/polybar/