Skip to content

Instantly share code, notes, and snippets.

@DrAzraelTod
DrAzraelTod / event.sh
Created January 11, 2012 14:48
MCabber-Event.sh that parses Status-Changes
#!/bin/bash
echo -n "entry" >> ~/mcabber.log
if [ "$1" = "STATUS" ]; then
DATE=`ddate +"%{%A, the %e of %B%}, %Y. %N%nCelebrate %H"`;
TIME=`date +'%s'`;
# if [ "$2" == "_" ]; then
# grep -v "$3;_" ~/mcabber.test > ~/mcabber.temp;
# echo 'grep -v "$3;_" ~/mcabber.test > ~/mcabber.test;';
# else
grep -v "$3" ~/mcabber.test > ~/mcabber.temp;
@DrAzraelTod
DrAzraelTod / last404.sh
Created January 18, 2012 13:02
Last 404s
#!/bin/bash
while [ 1 ]
do
clear;
echo "Last 404s:";
grep -i "404" /var/log/nginx/localhost.access_log | grep -v ' "-" "-"' | grep -v "favicon.ico" | grep -v "robots.txt" | grep -v "apple-touch-icon" | grep -v ' "-" "Java' | grep -v ' "-" "libwww' |tail -n 70;
sleep 200;
done
@DrAzraelTod
DrAzraelTod / yturl.py
Created January 31, 2012 12:21
yturl - youtube video url extractor in python, i found it months ago and don't remember where to get it now
#!/usr/bin/env python
# vim: set fileencoding=utf-8 :
# (c) Christopher Down 2011
# See the COPYING file for copyright information.
""" Prints direct URLs to YouTube media. """
from urllib import urlopen
from urlparse import parse_qs
@DrAzraelTod
DrAzraelTod / gist:1710332
Created January 31, 2012 12:48
Brainfuck interpreter in Lolcode
HAI
BTW This is a BrainFuck interpreter written in LOLCode
BTW It accepts as input a BF program, followed by a "!", followed by any input to the BF program.
BTW Since BrainFuck is turing-complete, this proves that LOLCode is too
I HAS A INSTRUCTIONS BTW Array for BF instructions
I HAS A IPTR BTW Pointer to first empty element in INSTRUCTIONS
IPTR R 0
I HAS A LOOPZ BTW Array of loop start/end addresses
I HAS A LOOPSTACKZ BTW Loop stack for building the above two
@DrAzraelTod
DrAzraelTod / gist:1753221
Created February 6, 2012 16:46
some of the stuff i have to deal with :wall:
{ "data" : { "" : { "1895341" : { "aid" : "1895341",
"colors" : "schwarz",
"desc" : "Taschenlampe, Leuchtdauer ca. 17 Std.",
"ean" : "00038739011868",
"fts" : [ { "slug" : "marke",
"val" : "Mag-Lite"
},
{ "slug" : "masse",
"val" : "L 31,5 cm"
},
@DrAzraelTod
DrAzraelTod / retroshare-work.cert
Created April 16, 2012 08:28
my retroshare-cert at work
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.9 (MingW32)
mQENBE+OSYsBCACyVLc7/F4t9flnyDEl0GZTw1kD5kZtWFP6YHPgn2Gc5bdEFnT1
gGajrtv1Cmar1xba19fdZ/937GHhKedz9vL0XhxUaAFLHpKtf4WcTtlSuNTdFZGu
R/I9mqLEeSgpXJOnKjFAMiM5YGjWdXebGL2Bz2IX42i++TNqmVCZq2ZhtHVHJ6OK
0mNKAQ6xzEQu7VQ7105uNN4Be0ecsgzPHYFAsguN4mlokBO92TCVIWZY3XuIpFwm
FpdTs6PN/UxG4WFXgX+Rf4geOblicR9upWvdiIsflYT3BwqqIH+MM6tZDFZnuhju
eqKsaiZOW/KzVyHgSwciuGhTovYM5NCJSXk7ABEBAAG0Q0phbWVzIEJpYmVyaXVz
IEtpcmsgKGdlbmVyYXRlZCBieSBSZXRyb3NoYXJlKSA8cmV0cm9zaGFyZUBnMzNr
@DrAzraelTod
DrAzraelTod / 404.log
Created May 3, 2012 12:17
Meine Logs nach " 404 " zu grepen ist eine interessante Sammlung von Trollversuchen -.-
66.249.66.132 - - [01/May/2012:13:03:24 +0200] "GET /feeds/posts/default?alt=rss HTTP/1.1" 404 915 "-" "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"
66.249.66.219 - - [02/May/2012:18:39:31 +0200] "GET /fid/2427/ HTTP/1.1" 404 899 "-" "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"
82.76.136.130 - - [03/May/2012:06:18:46 +0200] "GET /webcalendar/install/index.php HTTP/1.1" 404 3402 "-" "Mozilla/4.0 (compatible; MSIE 6.0; MSIE 5.5; Windows NT 5.1) Opera 7.01 [en]"
82.76.136.130 - - [03/May/2012:06:45:20 +0200] "GET /webcalendar/install/index.php HTTP/1.1" 404 3405 "-" "Mozilla/4.0 (compatible; MSIE 6.0; MSIE 5.5; Windows NT 5.1) Opera 7.01 [en]"
82.76.136.130 - - [03/May/2012:07:13:37 +0200] "GET /calendar/install/index.php HTTP/1.1" 404 3393 "-" "Mozilla/4.0 (compatible; MSIE 6.0; MSIE 5.5; Windows NT 5.1) Opera 7.01 [en]"
82.76.136.130 - - [03/May/2012:07:39:42 +0200] "GET /calendar/install/index.php HTTP/1.1" 404 3396 "-" "Mozilla/4.0 (compatible; MSIE
@DrAzraelTod
DrAzraelTod / arrow.html
Created May 11, 2012 10:50
CSS-Pfeil-Beispiel
<!DOCTYPE html>
<html>
<head>
<title>Arrow</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
.box:before {
display: block;
margin: -10px 0 10px 85px;
@DrAzraelTod
DrAzraelTod / nuts.txt
Created June 18, 2012 14:09
total Banane
A rope lying over the top of a fence is the same length on each side. It
weighs one third of a pound per foot. On one end hangs a monkey holding a
banana, and on the other end a weight equal to the weight of the monkey.
The banana weighs two ounces per inch. The rope is as long (in feet) as
the age of the monkey (in years), and the weight of the monkey (in ounces)
is the same as the age of the monkey's mother. The combined age of the
monkey and its mother is thirty years. One half of the weight of the monkey,
plus the weight of the banana, is one forth as much as the weight of the
weight and the weight of the rope. The monkey's mother is half as old as
the monkey will be when it is three times as old as its mother was when she
@DrAzraelTod
DrAzraelTod / sudoku.php
Created June 25, 2012 12:12
Ich durfte vor langer Zeit mal einen Tag an Sudokus rumbasteln und versuchen welche zu generieren/lösen, das ist was dabei rausgekommen ist
<html>
<head>
<style type="text/css">
table.sudoku {
border-collapse: collapse;
border-bottom: 1px solid red;
border-right: 1px solid red;
}
table.sudoku td {
width: 20px;