- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
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
var today = new Date(), | |
formatted = ("0" + today.getDate()).slice(-2) + "." + ("0" + (parseInt(today.getMonth(), 10) + 1)).slice(-2) + "." + (today.getYear().toString()).slice(-2); | |
console.log("Today is", formatted); |
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 bash | |
if [ -z "$1" ]; then | |
echo "Usage: provide a title argument." | |
exit -1 | |
else | |
title="$@" | |
fi | |
d=$(date +"%Y-%m-%d") |
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
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
# All others go to the English version | |
RewriteCond %{HTTP:Accept-Language} !^de [NC] | |
RewriteCond %{REQUEST_URI} !\.(ico|jpg|gif|png|css|js|txt|svg|pdf)$ | |
RewriteCond %{REQUEST_URI} !^/de/?.* [NC] | |
RewriteCond %{REQUEST_URI} !^/en/?.* [NC] | |
RewriteRule ^(.*)$ /en/$1 [R=301,L] | |
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
<html> | |
<head> | |
<title>Date Axis</title> | |
<!-- JQuery dependence --> | |
<script src="../../../dist/core/jquery.min.js"></script> | |
<script src="../../../dist/core/jquery.jqplot.min.js"></script> | |
<!-- Axes --> | |
<script src="../../../dist/plugins/axis/jqplot.dateAxisRenderer.min.js"></script> |
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
// @see http://stackoverflow.com/a/3605248 | |
var MyDate = new Date(); | |
var MyDateString; | |
MyDate.setDate(MyDate.getDate() + 20); | |
MyDateString = ('0' + MyDate.getDate()).slice(-2) + '/' | |
+ ('0' + (MyDate.getMonth()+1)).slice(-2) + '/' | |
+ MyDate.getFullYear(); |
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
var twohoursago = new Date(new Date().setHours(new Date().getHours() - 2)); |
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
# Cache-Control header 604800 = 1 week in seconds | |
<FilesMatch "\.(jpg)"> | |
Header set Cache-Control "max-age=604800, must-revalidate" | |
</FilesMatch> | |
<FilesMatch "\.(css)"> | |
Header set Content-Type "text/css" | |
ForceType application/x-httpd-php | |
php_value auto_prepend_file "../gzip.php" | |
</FilesMatch> |
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 | |
# This script analyses the log files /var/log/auth.log* for | |
# illegal break-in attempts and writes all output to $logdir. | |
# <http://blog.philippklaus.de/2010/02/analyse-illegal-ssh-login-attempts/#comment-12211> | |
# inspired by <http://goo.gl/QMOhiU> | |
# and <http://filipivianna.blogspot.com/2009/10/checking-authlog-for-ssh-brute-force.html> | |
logbasedir=~/logs |
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
# Forward a "broken" file link | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule ^files/(.*)-Project-Sustainica_brochure.pdf$ /en/brochure.pdf [L] | |
# Forward permalinks to files to their changing physical targets | |
RewriteRule ^en/brochure.pdf /files/20150914-Project-Sustainica_brochure.pdf [L] |