Skip to content

Instantly share code, notes, and snippets.

View pSub's full-sized avatar

Pascal Wittmann pSub

View GitHub Profile
@pSub
pSub / .gitignore
Last active August 29, 2015 14:00 — forked from kogakure/.gitignore
*.aux
*.glo
*.idx
*.log
*.toc
*.ist
*.acn
*.acr
*.alg
*.bbl
@pSub
pSub / gist:1160638
Created August 21, 2011 13:52
Keybindings zum ändern von pacman Kommandos für die ZSH
# Mit diesen Widgets für die zsh kann man pacman Befehle
# "on the fly" ändern. Wenn man z.B. "pacman -Si weechat" ausgeführt hat,
# und möchte nun weechat installieren, muss man nur in der History zurück
# gehen und Meta-i drücken. Damit ändert sich der Befehl zu "pacman -S weechat".
# Konfiguration der Keybindings und Komandos
pacman_bindings=("^[i" "S" # Meta-i → install
"^[f" "Ss" # Meta-f → search
"^[r" "Rs" # Meta-r → remove
"^[p" "Si" # Meta-p → info / properties
@pSub
pSub / gist:2577133
Created May 2, 2012 14:50
Use daemons uniformly
# Handle the start/stop/restart and reload of daemons uniformly.
# It's able to handle multiple daemons.
start restart stop reload(){
local daemonPath distro cmd
if [[ $# -le 0 ]]; then
echo "Usage: start [restart, stop, reload] DAEMON [DAEMON ...]"
return 1
fi
distro=$(cat /etc/issue)
case $distro in
@pSub
pSub / Chat.hs
Created April 28, 2013 09:26
Source code of the Yesod presentation at the Haskell User Group Frankfurt.
-- The source code in this file is an adapated version of the chat example in the Yesod Book. See
-- http://www.yesodweb.com/book/wiki-chat-example
{-# LANGUAGE OverloadedStrings, TypeFamilies, QuasiQuotes,
TemplateHaskell, FlexibleInstances, MultiParamTypeClasses,
FlexibleContexts
#-}
module Chat where
@pSub
pSub / dmn-check-server-module.nix
Created February 3, 2023 20:45
NixOS module for the dmn-check server component (see github.com/red6/dmn-check)
{ config, lib, pkgs, ... }:
let
cfg = config.services.homepage;
dmn-check-server =
pkgs.fetchurl {
url = "https://repo1.maven.org/maven2/de/redsix/dmn-check-server/1.2.4/dmn-check-server-1.2.4-jar-with-dependencies.jar";
sha256 = "0rnak9gnf5vr1h8pkzkgd0fnrv10mrkbir1qccrrz42z7vzc3wdb";
@pSub
pSub / make-pdf.sh
Created March 2, 2019 11:54
Downloads Peppter & Carrort comics and crafts a PDF
#!/usr/bin/env zsh
EPISODE=$1
NUMBER=$2
i=0
while
echo $i
URL="https://www.peppercarrot.com/0_sources/$EPISODE/hi-res/de_Pepper-and-Carrot_by-David-Revoy_E${NUMBER}P${(l:2::0:)i}.jpg"
STATUSCODE=$(curl --silent --remote-name --write-out "%{http_code}" $URL)