Skip to content

Instantly share code, notes, and snippets.

View blaubaer's full-sized avatar
😶‍🌫️

Gregor Noczinski blaubaer

😶‍🌫️
View GitHub Profile
@blaubaer
blaubaer / bash.bashrc
Created December 12, 2016 13:56
Enabling executable expansion of windows executables under the Windows Linux Subsystem
# if the command-not-found package is installed, use it
if [ -x /usr/lib/command-not-found -o -x /usr/share/command-not-found/command-not-found ]; then
function try_expand_windows_command {
for extension in .exe .bat .cmd; do
which "${1}${extension}" > /dev/null
if [ $? -eq 0 ]; then
echo "${1}${extension}"
return 0
fi
done
import javax.crypto.Cipher;
import java.nio.charset.Charset;
import java.security.*;
import static javax.crypto.Cipher.DECRYPT_MODE;
import static javax.crypto.Cipher.ENCRYPT_MODE;
public class TestRsa {
private static final String KEY_ALGORITHM = "RSA";
@blaubaer
blaubaer / signaldemo.go
Last active February 16, 2016 13:11
Signal Demo in Go
package main
import (
"os"
"fmt"
"os/exec"
"os/signal"
"syscall"
)
const NUMBER_OF_PEASANTS = 3
And were are you?