Skip to content

Instantly share code, notes, and snippets.

View criztovyl's full-sized avatar

Christoph Schulz criztovyl

View GitHub Profile
@criztovyl
criztovyl / dlextract.sh
Last active February 9, 2016 13:52
Downloads, extracts and removes a archive file.
# 2016 Christoph "criztovyl" Schulz
# No Copyright, too trivial.
dlextract() {
file=$1
command=$2
keep=$3
wget $file && $command `basename $_` && [ "$keep" ] || rm -f $_
}
dlunzip(){ dlextract "$1" "7z x" $2; }
dluntar(){ dlextract "$1" "tar -xaf" $2; }
@criztovyl
criztovyl / gist-init.sh
Last active March 13, 2016 10:58
Sets up Gists
#!/bin/bash
# A script for initializing gists
# Copyright (C) 2015 Christoph "criztovyl" Schulz
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
@criztovyl
criztovyl / da_gallery_dl.rb
Last active April 13, 2016 16:30
Downloads a full devian art gallery.
@criztovyl
criztovyl / devpath.sh
Last active June 27, 2016 17:21
Overwrite a command with it's development one.
devpath()
{
DEVPATH_DIR=$HOME/.local/share/devpath
DEVPATH_RE='.*devpath/.'
if [[ "$1" =~ ^-{0,2}h(elp)?$ ]] || [[ -z "$1" ]]; then
echo "Usage: devpath scriptName" >&2
echo "or : devpath -l|--list" >&2
return 0
elif [[ "$1" =~ ^-{0,2}l(ist)?$ ]]; then
@criztovyl
criztovyl / gpl-comment.sh
Last active July 1, 2016 13:13
Tries to display the description line of a GPLed file.
gpl-comment()
{
[[ "$1" =~ ^-{0,2}h(elp)?$ ]] && { echo -e "Tries to display the description line of a GPLed file.\nUsage: gpl-comment file"; return 0; }
echo $(head -n2 $1 | tail -n1 | sed 's/^\W \?//')
}
@criztovyl
criztovyl / gpl-init.sh
Last active July 1, 2016 14:01
Initializes files with GPL or adds it to existing files.
#!/bin/bash
# A small tool to init files with a GPL header.
# Copyright (C) 2015 Christoph "criztovyl" Schulz
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,

Keybase proof

I hereby claim:

  • I am criztovyl on github.
  • I am criztovyl (https://keybase.io/criztovyl) on keybase.
  • I have a public key ASADhzoMtiunuWZBZVoaKTbFieHJSTC3TZDR6lcDBcuFLAo

To claim this, I am signing this object:

@criztovyl
criztovyl / bandcamp_discography.sh
Last active August 7, 2016 16:00
Sorts a Bandcamp discography by release date
#!/bin/bash
# Utility for Bandcamp discographies
# Copyright (C) 2016 Christoph "criztovyl" Schulz
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
@criztovyl
criztovyl / notify-send-remote.sh
Last active January 14, 2017 22:03
Hacky-Hacky notify-send hack for sending from cron(tab).
#!/bin/bash
# Hacky-Hacky notify-send hack for sending from cron(tab).
# Copyright (C) 2016 Christoph criztovyl Schulz
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
@criztovyl
criztovyl / password.sh
Last active January 20, 2017 20:14
Utility to firefox_decrypt.py
#!/bin/bash
# Utility to firefox_decrypt.py
# Copyright (C) 2016 Christoph criztovyl Schulz
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,