Skip to content

Instantly share code, notes, and snippets.

Kristoffer Schneider derfalx

View GitHub Profile
@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...
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@derfalx
derfalx / fhws-notendurchschnitt-bookmarklet.js
Last active Oct 28, 2015 — forked from ignitedPotato/fhws-notendurchschnitt-bookmarklet.js
FHWS Studenten Portal - Notendurchschnitt Berechnung
View fhws-notendurchschnitt-bookmarklet.js
/*
FHWS Studenten Portal - Notendurchschnitt BOOKMARKLET
Maximilian Janik - maximilian.janik@student.fhws.de
v 1.2
27.10.2015
Berechnet den Notendurchschnitt aller benoteten Fächer gewichtet nach CP.
28.10.2015
Es werden nur maximal 2 AWPFs gezählt und diese mit je 2.5 CP gewichtet.
Es werden nur die besten 2 AWPFs gezählt.
You can’t perform that action at this time.