Skip to content

Instantly share code, notes, and snippets.

@thomaspuppe
thomaspuppe / nginx.conf
Created May 17, 2018 16:11
NginX log_format without IP and shit
##
# Logging Settings in /etc/nginx/nginx.conf
##
log_format custom '$remote_user\t$time_local\t$request_time\t$host\t$request\t'
'$status\t$body_bytes_sent\t$http_referer\t$http_user_agent';
access_log /var/log/nginx/access.log custom;
error_log /var/log/nginx/error.log;
(function( vjs ) {
var videojsEventBroadcastPlugin = function( options ) {
var player = this,
postEventToWindow = function( eventString ) {
var messageData = {
'name': 'zonTriggeredEventTracking',
'sender': 'videojs',
'event': eventString
};
@thomaspuppe
thomaspuppe / zon-menu.txt
Last active July 10, 2017 08:02
ZEIT Speiseplan. This serves as data source for our SlackBot
Tage;Essen1;Nachtisch1;Essen2;Nachtisch2;Essen3
05.10.2015;Lasagne mit Rinderhack und Gemüse Tomaten-Soße Gurkensalat;Erdbeerquark;Pakoras gebackenes Gemüse mit verschiedenen Dips ;Granatapfelcreme;Orientalischer Salat mit Ingwer, Chili, Wakame-Algen, Sushi-Rolls, Wasabi-Dip Soja-Soße, Kroepoek
06.10.2015;Rheinischer Sauerbraten* vom Rind, Rosinensoße, Rotkohl, Kartoffelklöße;Schokoladencreme mit Birnenkompott;Paprikaschoten mit Tofu-Gemüse-Füllung Möhrensoße gebackene Kartoffelwürfel;Quarkklöße mit Pflaumenröster;Herbstlicher Salat mit Chicoree, Papaya, Soja-Limetten-Dressing und gebratener Hähnchenbrust, Baguette
07.10.2015;Linseneintopf mit Kochwurst;Spanischer Mandelkuchen;Kartoffel-Sellerie-Puffer mit Apfelschmand, Rote Bete-Salat;Banane und Kiwi;Blumenkohl-Broccoli-Salat mit Tomaten, Kürbiskernen, Kerbel-Vinaigrette, Zwiebelkuchen und Sour Cream
08.10.2015;Hechtklöße, Blattspinat, Safransoße*, Pariser Kartoffeln;Mandarinen-Vanille-Creme;Auberginenschnitzel in einer Parmesan-Eihülle, Kräuterquark, Pellk
(function( vjs ) {
var webtrekkPlugin = function( options ) {
var player = this,
sendEventToWebtrekk = function( trekkString ) {
var messageData = {
'sender': 'videojsWebtrekk',
'message': trekkString
};
window.parent.postMessage( JSON.stringify( messageData ), '*' );
@thomaspuppe
thomaspuppe / mac-setup
Created June 4, 2015 12:24
Mac Setup
Currently just a collection of snippets, but should be developed into a setup Script!
# Make Sublime available from the command line (sublime ~/.hgrc)
$ sudo ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/local/bin/sublime
@thomaspuppe
thomaspuppe / gist:a6580f7891cde71254b3
Created April 16, 2015 15:43
Log-Analyse in der Konsole

Log-Analyse

Kopieren und verbinden

$ scp user@1.2.3.4:/var/log/apache/www.domain.com.log ~/2015-04-16_log-analyse/www1.domain.com.log
$ scp user@1.2.3.4:/var/log/apache/www.domain.com.log ~/2015-04-16_log-analyse/www2.domain.com.log

$ cd ~/2015-04-16_log-analyse

$ grep "2015-04-16 15" www1.domain.com.log > www.domain.com_1500-1559.log

@thomaspuppe
thomaspuppe / keybase.md
Created February 27, 2015 00:04
keybase.md

Keybase proof

I hereby claim:

  • I am thomaspuppe on github.
  • I am thomaspuppe (https://keybase.io/thomaspuppe) on keybase.
  • I have a public key whose fingerprint is 636B DFB4 0A93 BFD8 6EB4 1B3B B1FE FCA7 6B38 ECA6

To claim this, I am signing this object:

Automatisches Erstellen von Sitemaps unter UNIX:

wget --mirror --no-parent --reject jpg,jpeg,png,gif,svg,mp3,mp4,JPG,pdf,PDF,woff,eof,eot,ttf --output-file=ran-wget.log http://www.ondigo.de/ 

tree | grep -v index.html

@thomaspuppe
thomaspuppe / formatDateObject.js
Created September 25, 2014 14:21
Format a JS Date Object according toa given String
/* *****************************************************************************
* Formates a JS Date Object according toa given String. The Place holders
* work like the php date() function, but not every case is implemented !
*
* %d% Day of the month, 2 digits with leading zeros
* %j% Day of the month without leading zeros
* %m% Numeric representation of a month, with leading zeros
* %n% Numeric representation of a month, without leading zeros
* %Y% A full numeric representation of a year, 4 digits
* %y% A two digit representation of a year
@thomaspuppe
thomaspuppe / .bashrc
Last active August 29, 2015 14:06
bash config file
# NOTE: This shit is mixed up (Ubuntu Linux vs Mac OS)
# ######################################
# Functions and Parameters for Own Aliases
# ######################################
function parse_git_branch () {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}