Skip to content

Instantly share code, notes, and snippets.

View vale981's full-sized avatar

Valentin Boettcher vale981

View GitHub Profile
#!/bin/bash
XML_PATH="/tmp/knewstuff.xml"
FULL_URL="https://invent.kde.org/api/v4/projects/5927/jobs/artifacts/master/download?job=build-catlogs"
XML_URL="https://invent.kde.org/api/v4/projects/5927/jobs/artifacts/master/raw/out/knewstuff/knewstuff.xml?job=build-catlogs"
HTTP_PATH="/tmp/http"
###############################################################################
# Check if CI is newer. #
###############################################################################
@vale981
vale981 / convert.py
Last active September 7, 2020 16:21
#!/usr/bin/env python3
import csv
import re
import unicodedata
import sys
from xml.dom.minidom import getDOMImplementation
import copy
contacts = []
import sys
import re
import chardet
if len(sys.argv) < 2:
sys.exit(f"Usage: {sys.argv[0]} [file]")
with open(sys.argv[1], "rb") as f:
input_str = f.read()
encoding = chardet.detect(input_str)
@vale981
vale981 / replace-seqs.el
Last active November 3, 2018 12:43
Replace Character Sequences in Emacs for Syntactic Sugar
(defmacro replace-seqs (chars modes)
`(progn ,@(loop for char in chars collect `(replace-seq ,(first char) ,(second char) ,modes))
nil))
(defmacro replace-seq (char replacement modes)
(let ((fname (gensym)))
`(progn
(defun ,fname ()
(font-lock-add-keywords
nil
@vale981
vale981 / tlrecode.sh
Last active October 3, 2020 16:23 — forked from NikitaKarnauhov/tlrecode.sh
Shell script to decode and encode TP-LINK router config files
#!/usr/bin/env bash
# tlrecode.sh
# Decode and encode TP-LINK router config files.
# Mod for TD-W8970B(DE)
#
# Creative Commons CC0 License:
# http://creativecommons.org/publicdomain/zero/1.0/
#
# To the extent possible under law, the person who associated CC0 with this
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery.min.js"></script>
<link href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
<script src="http://code.jquery.com/jquery-2.1.1.min.js"></script>
<script src="http://www.chartjs.org/assets/Chart.js"></script>
<meta charset="utf-8">
@vale981
vale981 / tut
Created June 24, 2014 18:03
tut
#Wichtig #
* Compiler --> XeLaTeX
* Compilierfolge: XeLaTeX --> Bib(la)tex --> XeLaTeX --> XeLaTeX
* An Main Datei nur Includierung ändern!
* nur \emph!
Dies Bitte beachten!
#Konventionen #
Jedes Kapitel/Unterkapitel hat eine eigene Datei, welche der Ordner- und Dateistriktur: /Kaptitel/nnn/nn.tex folgt.
Eingebunden wird über:
@vale981
vale981 / gist:7126963
Last active December 26, 2015 09:09
Commit&Push v1
#!/bin/bash
clear;
red='\e[0;31m'
NC='\e[0m' # No Color
green='\e[0;32m'
if [ "$1" = "clear" ]; then
rm /tmp/.name.txt
rm /tmp/.remote.txt
else