Skip to content

Instantly share code, notes, and snippets.

Avatar

Kristoffer Schneider derfalx

View GitHub Profile
View Windows-Terminal-Theme.json
{
"background" : "#020314",
"black" : "#020314",
"blue" : "#268BD2",
"brightBlack" : "#002B36",
"brightBlue" : "#00B8FF",
"brightCyan" : "#93A1A1",
"brightGreen" : "#00FF9F",
"brightPurple" : "#E032E6",
"brightRed" : "#CB4B16",
View HybridCertGen.java
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;
@derfalx
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: https://weechat.org/doc/quickstart
#
View faust-bot.sh
#!/bin/bash
# Jump to the correct directory
cd /opt/FaustBot/dev/faust-bot
# Directory of the virtual environment
VENV="./faust-bot-venv"
venv() {
if [ ! -d "$VENV" ]; then
echo "[=== creating virtual environment "
virtualenv --python=/usr/bin/python3 $VENV
@derfalx
derfalx / Main.java
Created Nov 26, 2017
Threading example
View Main.java
package tech.falx.mono.threading;
public class Main {
public static void main(String[] args) {
new Main();
}
public Main() {
CounterThread thread = new CounterThread();
View Example Entity.java
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;
/**
View keybase.md

Keybase proof

I hereby claim:

  • I am derfalx on github.
  • I am falx (https://keybase.io/falx) on keybase.
  • I have a public key ASAzktjz4-iSWYcfOtzLxGSvLGf8ShNLURUY2ZBD1fa5Uwo

To claim this, I am signing this object:

@derfalx
derfalx / novpn.sh
Created Jun 23, 2017 — forked from kriswebdev/novpn.sh
Bypass VPN for specific apps [Linux / OpenVPN]
View novpn.sh
#!/bin/bash
# === INFO ===
# NoVPN
# Description: Bypass VPN tunnel for applications run through this tool.
VERSION="1.0.2"
# Author: KrisWebDev
# Requirements: Linux with kernel > 2.6.4 (released in 2008).
# Only tested on Ubuntu 15 with bash.
# Main dependencies are automatically installed.
View mcl-android-build.sh
#!/bin/bash
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
derfalx / gpg-import-and-export-instructions.md
Created Sep 13, 2016 — forked from chrisroos/gpg-import-and-export-instructions.md
Instructions for exporting/importing (backup/restore) GPG keys
View gpg-import-and-export-instructions.md

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...
You can’t perform that action at this time.