This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class ToroWorkaround { | |
public static function serve($handlers) { | |
/* | |
* Toro prefers the $_SERVER["PATH_INFO"] var to get the requested URL. | |
* If this var is present, everything seems to be correct. | |
* If it is not, some weird errors occur. | |
* For example, Toro sometimes can not route to the index route ("/"), when the app is not running from the servers document root. | |
* By constructing PATH_INFO manually using REQUEST_URI and SCRIPT_NAME, we can work around this problem. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Extrahieren von [Martina und Moritz](http://martinaundmoritz.wdr.de/) Rezepten | |
# und aufbereiten in etwas besser druckbaren Stil. | |
# Klappt vielleicht auch mit anderen WDR-Rezepten. | |
extract_and_style() { | |
echo '<html> | |
<head> | |
<meta charset="utf-8"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Mass retagging of mp3 files that don't have ID3 tags. | |
# The MP3 files must be named like this to use this script: | |
# ./<first letter of artist>/<artist>/<album>/<track number> - <title>.<file extension(s)> | |
# ^-- The current working directory | |
exsomething() { echo "$1" | sed 's#'"$2"'#\1#'; } | |
exartist() { exsomething "$1" '^\././\([^/]*\)/.*$'; } | |
exalbum() { exsomething "$1" '^\././[^/]*/\([^/]*\)/.*$'; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# jpegincector.sh - Easily inject files into jpeg files (using the comment tag in the EXIF data) | |
# You need this tools / programs to run jpeginjector.sh: | |
# * uuencode/uudecode (usually found in the sharutils package) | |
# * exiftool (usually found in the perl-Image-ExifTool package) | |
# * uuidgen (usually already installed) | |
# | |
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
# Version 2, December 2004 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Tidy up the youtube homepage, i.e. remove the right sidebar and the "most popular" videos. | |
*/ | |
#homepage-side-content, #feed_top_videos, #feed_top_videos-content, .top-videos-module { | |
display: none !important; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2 | |
# -*- coding: utf-8 -*- | |
# aurfetch.py - My small helper script for fetching AUR packages and automatically update them | |
# It doesn't do the fancier stuff like automagically fetch dependencies. | |
# Have fun :-) | |
# | |
# License: [Do What The Fuck You Want To Public License](http://en.wikipedia.org/wiki/WTFPL) | |
###### START EDITING HERE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% DISCLAIMER: Nur in Octave getestet. Könnte auch in MATLAB funktionieren, muss aber nicht... | |
% Achse-Winkeldarstellung zu Rotationsmatrix. | |
function rv = achsewinkel_to_rotmatrix(achse, winkel) | |
x = achse(1); | |
y = achse(2); | |
z = achse(3); | |
c = cos(winkel); | |
s = sin(winkel); | |
omc = 1-c; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# backup-bitcoins.sh - Easily create encrypted backups of your Bitcoin wallet | |
# You need this tools / programs to run backup-bitcoins.sh: | |
# * 7z (usually in the package 7zip) | |
# * uuidgen (usually already installed) | |
# | |
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
# Version 2, December 2004 | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env php | |
<?php | |
/* | |
This will repair the metadata of the packages in your repository. | |
Place it into the root directory of your reository and run it via the terminal (php fix.php). | |
If everything has worked, nothing will be printed. | |
You should delete this script after fixing the metadata. | |
*/ |
OlderNewer