Skip to content

Instantly share code, notes, and snippets.

View jschpp's full-sized avatar

Johannes Schöpp jschpp

View GitHub Profile
jschpp:~/exclude_from_backup/src/dosage (master) $ ./dosage CyanideAndHappiness Dilbert FonFlatter SandraAndWooGerman xkcd AhoiPolloi GaiaGerman LoadingArtist SMBC LookingForGroup Ruthe DieFruehreifen JohnnyWander PennyArcade SafelyEndangered Wumo Arcamax/ArcticCircle
CyanideAndHappiness> Retrieving 1 strip
CyanideAndHappiness> Saved Comics/CyanideAndHappiness/4431_sting.png (70.79KB).
Dilbert> Retrieving 1 strip
Dilbert> Saved Comics/Dilbert/2016-10-05.gif (127.35KB).
FonFlatter> Retrieving 1 strip
FonFlatter> Saved Comics/FonFlatter/fred_2016-10-05_s.png (25.81KB).
SandraAndWooGerman> Retrieving 1 strip
SandraAndWooGerman> Saved Comics/SandraAndWooGerman/2016-10-03-0826-die-goettliche-komoedie-seite-24.png (69.46KB).
xkcd> Retrieving 1 strip
@jschpp
jschpp / send_md_as_mail.sh
Created August 24, 2016 15:26
Takes a markdown file converts it to html and sends it per mutt. Script includes a mail check because I'm prone to typos in mail addresses
#!/bin/bash
filename=$1
mail_address=$2
mail_subject=$3
scriptname=`basename "$0"`
if [ "$#" -ne 3 ]; then
echo "Illegal number of parameters"
echo "Usage: $scriptname <filename> <mail_address> <subject_of_mail>"
exit 1
@jschpp
jschpp / .mailcap
Last active April 26, 2016 10:10 — forked from pcon/.mailcap
Configurations for mutt and lynx
text/html; links -dump -width 78 %s | sed "s/^ //"; copiousoutput; needsterminal; nametemplate=%s.html
Sub Super_Sub()
'
' Keyboard Shortcut: Ctrl+Shift+D
'
' If the characters are surrounded by "<" & ">" then they will be subscripted
' If the characters are surrounded by "{" & "}" then they will be superscripted
'
Dim NumSub
Dim NumSuper
Dim SubL
@jschpp
jschpp / post.html.diff
Created February 29, 2016 16:28
adding disqus
diff --git a/_layouts/post.html b/_layouts/post.html
index e75c724..9f70c29 100644
--- a/_layouts/post.html
+++ b/_layouts/post.html
@@ -23,5 +23,22 @@ layout: default
<div class="post-content" itemprop="articleBody">
{{ content }}
</div>
+{% if page.comments %}
+ <div id="disqus_thread"></div>
@jschpp
jschpp / Dockerfile
Last active February 26, 2016 11:46
silver searcher test
FROM ubuntu:precise
# essentials
RUN apt-get update -q
RUN apt-get install -y python-software-properties curl build-essential
# ag specific
RUN add-apt-repository -y 'ppa:ubuntu-toolchain-r/test'
RUN add-apt-repository -y 'deb http://llvm.org/apt/precise/ llvm-toolchain-precise-3.6 main'
RUN curl http://llvm.org/apt/llvm-snapshot.gpg.key | apt-key add -
@jschpp
jschpp / oab.ps1
Last active November 16, 2022 09:21
Deletes OAB locally and deactivates automatic OAB download for prompted user
# This script remove the local Offline Address Book files and sets the
# registry key to disable automatic download of the OAB
$OFS = "`r`n`r`n"
[System.Reflection.Assembly]::LoadWithPartialName('Microsoft.VisualBasic') | Out-Null
try {
$username = [Microsoft.VisualBasic.Interaction]::InputBox("Input username", "User", "")
$User = New-Object System.Security.Principal.NTAccount($username)
$sid = $User.Translate([System.Security.Principal.SecurityIdentifier]).value
} catch {
@jschpp
jschpp / change.diff
Last active February 14, 2016 13:04
Understanding test_binary
diff --git a/src/util.c b/src/util.c
index 3045bdf..bf0dad6 100644
--- a/src/util.c
+++ b/src/util.c
@@ -324,6 +324,7 @@ int is_binary(const void *buf, const size_t buf_len) {
}
}
suspicious_bytes++;
+ log_debug("found suspicious byte %#x at pos %i", buf_c[i], i);
/* Disk IO is so slow that it's worthwhile to do this calculation after every suspicious byte. */
@jschpp
jschpp / tlsgatling.service
Created January 18, 2016 16:32
systemd script for tlsgatling: https://www.fefe.de/gatling/
#!/bin/sh
[Unit]
Description=Control gatling ssl webserver
After=network.target
[Service]
Type=simple
WorkingDirectory=/var/www
ExecStart=/opt/diet/bin/tlsgatling -F -S -D
#!/bin/sh
[Unit]
Description=Control go reverse Proxy
After=network.target
[Service]
Type=simple
ExecStart=/usr/bin/revprox
ExecReload=/bin/kill $MAINPID && /usr/bin/revprox