Skip to content

Instantly share code, notes, and snippets.

---
apiVersion: v1
kind: Service
metadata:
name: traefik-web-ui
namespace: kube-system
spec:
selector:
k8s-app: traefik-ingress-lb
ports:
@Romern
Romern / config
Created October 25, 2018 09:34
i3config
set $mod Mod4
set $alt Mod1
font pango:monospace, Fontawesome 9
#font pango:Source Code Pro, Fontawesome 9
#font pango:scientifica, Fontawesome 9
#font pango:xft:scientifica:size=8
floating_modifier $mod
bindsym $alt+Tab workspace next
export EDITOR=nano
export ZSH="/home/roman/.oh-my-zsh"
ZSH_THEME="agnoster"
plugins=(
git
shrink-path
z
)
source $ZSH/oh-my-zsh.sh
prompt_dir(){
@Romern
Romern / ogham_backconvert.js
Last active October 22, 2018 20:36
Small js script using https://github.com/evanshortiss/ogham to convert ogham phrases back to latin (with no changes to the database because I'm lazy)
//const ogham = require('ogham');
let test = {
individual: {
' ': {
char: ' ',
code: 5760
},
b: {
char: 'ᚁ',
code: 5761
@Romern
Romern / RPNICompleteProof.java
Created May 12, 2018 22:37
Checks for a given DFA if a sampleset S=(S_+,S_-) is RPNI-complete (uses https://github.com/LearnLib/automatalib)
import net.automatalib.automata.fsa.impl.compact.CompactDFA;
import net.automatalib.util.automata.Automata;
import net.automatalib.util.automata.builders.AutomatonBuilders;
import net.automatalib.visualization.Visualization;
import net.automatalib.words.Alphabet;
import net.automatalib.words.Word;
import net.automatalib.words.impl.Alphabets;
import java.util.*;
public final class RPNICompleteProof {
@Romern
Romern / les.sh
Last active May 6, 2018 12:39
LaTeX Error Search: Finds typod commands in your tex file using the \show command
FILE=$1
if [ -z $1 ]; then
echo "ERROR: First input parameter must be the file!"
exit
fi
COMMANDS="$(grep -E -o '\\[a-zA-Z]+' $1 | sed 's/\\/\\show\\/g')"
HEADER="$(sed '/\\begin{document}/q' $1)"
echo $HEADER >> temp.tex
echo $COMMANDS >> temp.tex
echo '\end{document}' >> temp.tex
@Romern
Romern / OkusonParser.java
Last active July 16, 2018 08:34
OkusonParser LAInf18 Needs https://jsoup.org/packages/jsoup-1.11.2.jar in the same path
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;
import java.io.File;
import java.nio.charset.StandardCharsets;
import java.io.IOException;
import java.nio.file.Files;
import java.util.*;
@Romern
Romern / snake.c
Last active April 8, 2018 13:57
Snake written for Arduino with tiny screen
//SNAKE
#include "lcd.h"
#include "util.h"
#include "os_input.h"
#include "os_core.h"
#include "os_scheduler.h"
#include "os_memory.h"
#include "keyb_processor.h"
@Romern
Romern / slackhidesidebar.user.js
Created March 30, 2018 10:03
If you use only one channel in slack or your window is narrow, you may want to hide Slacks sidebar.
// ==UserScript==
// @name Slack: Hide sidebar
// @namespace http://userstyles.org
// @description Slack doesn't support narrow windows that good. This hides the sidebar.
// @author Roman Karwacik
// @run-at document-start
// @match https://*.slack.com/*
// @version 1
// ==/UserScript==
(function() {var css = [
@Romern
Romern / telegramlayoutunrestricter.user.js
Last active November 4, 2018 12:25
Telegram has a very stupid restricted layout. This userscript removes all width restrictions. Also works with rambox.
// ==UserScript==
// @name Telegram - Full Sized Windows
// @namespace http://userstyles.org
// @description Telegram has a very stupid restricted layout. This removes all width restrictions
// @author Roman Karwacik
// @run-at document-idle
// @match https://web.telegram.org/*
// @version 1
// ==/UserScript==
(function() {