Skip to content

Instantly share code, notes, and snippets.

Avatar

Valentin Boettcher vale981

View GitHub Profile
View fetch_newstuff.sh
#!/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. #
###############################################################################
View convert.py
#!/usr/bin/env python3
import csv
import re
import unicodedata
import sys
from xml.dom.minidom import getDOMImplementation
import copy
contacts = []
View get_personal_photo.py
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 Nov 3, 2018
Replace Character Sequences in Emacs for Syntactic Sugar
View replace-seqs.el
(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 Oct 3, 2020 — forked from NikitaKarnauhov/tlrecode.sh
Shell script to decode and encode TP-LINK router config files
View tlrecode.sh
#!/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
View index.html
<!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">
View 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 Dec 26, 2015
Commit&Push v1
View gist:7126963
#!/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