Skip to content

Instantly share code, notes, and snippets.

💭
I may be slow to respond.

Pascal Wittmann pSub

💭
I may be slow to respond.
Block or report user

Report or block pSub

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@pSub
pSub / make-pdf.sh
Created Mar 2, 2019
Downloads Peppter & Carrort comics and crafts a PDF
View make-pdf.sh
#!/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)
View .gitignore
*.aux
*.glo
*.idx
*.log
*.toc
*.ist
*.acn
*.acr
*.alg
*.bbl
@pSub
pSub / Chat.hs
Created Apr 28, 2013
Source code of the Yesod presentation at the Haskell User Group Frankfurt.
View Chat.hs
-- 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 / gist:2577133
Created May 2, 2012
Use daemons uniformly
View gist:2577133
# 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 / gist:1160638
Created Aug 21, 2011
Keybindings zum ändern von pacman Kommandos für die ZSH
View gist:1160638
# 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
You can’t perform that action at this time.