Skip to content

Instantly share code, notes, and snippets.

View criztovyl's full-sized avatar

Christoph Schulz criztovyl

View GitHub Profile
@criztovyl
criztovyl / servermultiscript.sh
Last active August 29, 2015 14:16
Use server simplified.
#!/bin/bash
############
#===Simple Server Skript===
# Author Christoph Schulz <cs@chsc.de>
# Version of 06 Apr 2013
#
#==INFORMATION==
# This skript uses SFTP only!
#==Configuration==
# - server: The server, e.g. ssh.example.com
@criztovyl
criztovyl / watch.sh
Last active August 29, 2015 14:19
Watch!
#!/bin/bash
# ToDo: Usage.
###
# Programs
###
ZENITY="/usr/bin/zenity"
YOUTUBEDL="/usr/local/bin/youtube-dl"
XCLIP="/usr/bin/xclip"
###
# Error Codes
@criztovyl
criztovyl / .shellPepper
Last active August 29, 2015 14:20
Shell Pepper
#!/bin/bash
####
# This is some shell pepper.
# 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.
#
@criztovyl
criztovyl / dirsync-micro.sh
Last active August 29, 2015 14:20
Keeps directories up-to-date
#!/bin/bash
# This is a program for simpler rsync syncing.
# 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 / call_yt_api.sh
Last active August 29, 2015 14:21
Calling YouTube API from commandline (requires jsonCLI.py)
#!/bin/bash
# Call YouTube API from command line.
# 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 / 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 / yesdo.sh
Last active August 29, 2015 14:21
Ask a Yes/No question and executes an action dependent on the answer
#!/bin/bash
# Asks a user a Yes/No question and executes actions dependent on the answer.
# 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 / 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 / bandcampwishlist.php
Last active August 27, 2018 00:06
Receives or displays a wishlist of a fan on bandcamp
<?php
/*
A small PHP script to display a bandcamp wishlist
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.
@criztovyl
criztovyl / to_assoc.php
Last active August 29, 2015 14:24
Associates integer-indexed arrays
<?php
/*
Replace array indices with associative keys
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.