Skip to content

Instantly share code, notes, and snippets.


Kristoffer Schneider derfalx

View GitHub Profile
package tech.falx.pki.task4;
import org.bouncycastle.asn1.ASN1Sequence;
import org.bouncycastle.asn1.oiw.OIWObjectIdentifiers;
import org.bouncycastle.asn1.x509.*;
import org.bouncycastle.cert.HybridCertificateBuilder;
import org.bouncycastle.cert.X509CertificateHolder;
import org.bouncycastle.cert.X509ExtensionUtils;
import org.bouncycastle.cert.jcajce.JcaX509CertificateConverter;
import org.bouncycastle.jce.X509KeyUsage;
View Windows-Terminal-Theme.json
"background" : "#020314",
"black" : "#020314",
"blue" : "#268BD2",
"brightBlack" : "#002B36",
"brightBlue" : "#00B8FF",
"brightCyan" : "#93A1A1",
"brightGreen" : "#00FF9F",
"brightPurple" : "#E032E6",
"brightRed" : "#CB4B16",
derfalx / weechat.conf
Created Jun 14, 2018
Weechat Configuration
View weechat.conf
# weechat -- weechat.conf
# WARNING: It is NOT recommended to edit this file by hand,
# especially if WeeChat is running.
# Use /set or similar command to change settings in WeeChat.
# For more info, see:
# Jump to the correct directory
cd /opt/FaustBot/dev/faust-bot
# Directory of the virtual environment
venv() {
if [ ! -d "$VENV" ]; then
echo "[=== creating virtual environment "
virtualenv --python=/usr/bin/python3 $VENV
derfalx /
Created Nov 26, 2017
Threading example
package tech.falx.mono.threading;
public class Main {
public static void main(String[] args) {
new Main();
public Main() {
CounterThread thread = new CounterThread();
View Example
import org.greenrobot.greendao.DaoException;
import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Generated;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.NotNull;
import org.greenrobot.greendao.annotation.ToOne;
import java.util.Date;

Keybase proof

I hereby claim:

  • I am derfalx on github.
  • I am falx ( on keybase.
  • I have a public key ASAzktjz4-iSWYcfOtzLxGSvLGf8ShNLURUY2ZBD1fa5Uwo

To claim this, I am signing this object:

derfalx /
Created Jun 23, 2017 — forked from kriswebdev/
Bypass VPN for specific apps [Linux / OpenVPN]
# === INFO ===
# Description: Bypass VPN tunnel for applications run through this tool.
# Author: KrisWebDev
# Requirements: Linux with kernel > 2.6.4 (released in 2008).
# Only tested on Ubuntu 15 with bash.
# Main dependencies are automatically installed.
export AR=/opt/android-ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-ar
export AS=/opt/android-ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-as
export RANLIB=/opt/android-ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-ranlib
export CC=/opt/android-ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc
export CXX=/opt/android-ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++
export CPP=/opt/android-ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-cpp
export LD=/opt/android-ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-ld
export LINK=${CXX}
export RANLIB=/opt/android-ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-ranlib
derfalx /
Created Sep 13, 2016 — forked from chrisroos/
Instructions for exporting/importing (backup/restore) GPG keys

Every so often I have to restore my gpg keys and I'm never sure how best to do it. So, I've spent some time playing around with the various ways to export/import (backup/restore) keys.

Method 1

Backup the public and secret keyrings and trust database

cp ~/.gnupg/pubring.gpg /path/to/backups/
cp ~/.gnupg/secring.gpg /path/to/backups/
cp ~/.gnupg/trustdb.gpg /path/to/backups/
# or, instead of backing up trustdb...