Skip to content

Instantly share code, notes, and snippets.

View Der-Eddy's full-sized avatar

Eduard Der-Eddy

View GitHub Profile
@Der-Eddy
Der-Eddy / redditbot.py
Created April 21, 2015 21:26
Posts newest Sales to subreddit /r/Eddy_Sales
import praw
import feedparser
r = praw.Reddit(user_agent="linux:Eddy_Sales:v1.0 (by /u/dereddy)")
r.login("EddyBot", "password")
rss = "http://isthereanydeal.com/rss/waitlist/0q46u:5cf44d74d6756256c395c0b56879111d"
feeds = feedparser.parse(rss)
for feed in feeds["entries"]:
@Der-Eddy
Der-Eddy / twitch.php
Last active August 29, 2015 14:21
RocketBeansTV Twitch Thumbnail
<?php
$channelname = "rocketbeanstv";
$height = 300;
$width = 164;
$font = 4; //1 bis 5 gültig
$path_file = dirname(__FILE__) . "/thumbnail.jpg";
$path = basename($path_file);
$text_alt = array("Der erste 24/7 Sender auf Twitch", "Lust mal wieder auf GIGA Stimmung?", "Rocketbeans.tv Live Twitch Stream", "GameOne abgesetzt? Hier gehts weiter!", "Eduard Laser!");
$text_filler = array("Nachtprogramm", "Feiertag!", "Wochenende!");
$stream = json_decode(get_url_contents("https://api.twitch.tv/kraken/streams/$channelname/"));
@Der-Eddy
Der-Eddy / ban
Last active August 29, 2015 14:21
#!/bin/bash
echo "Logging in ..."
sleep 2
echo "Banning User $1 ..."
sleep 1
echo "User $1 is banned"
exit 0
@Der-Eddy
Der-Eddy / 2_Cloudflare.html
Last active August 29, 2015 14:22
Epvp Errors
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en-US"> <![endif]-->
<!--[if IE 7]> <html class="no-js ie7 oldie" lang="en-US"> <![endif]-->
<!--[if IE 8]> <html class="no-js ie8 oldie" lang="en-US"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en-US"> <!--<![endif]-->
<head>
<title>Website is offline | 504: Gateway time-out</title>
<meta charset="UTF-8"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"/>
@Der-Eddy
Der-Eddy / passwordgen.py
Last active July 17, 2022 18:00
Password Generator tkinter
import tkinter
import random
class PWGenGui(tkinter.Frame):
def __init__(self, master=None):
self.consonants = "bcdfghjklmnpqrstvwxz"
self.vowels = "aeuoiy"
self.numbers = "0123456789"
self.symbols = "§$%&?#+"
@Der-Eddy
Der-Eddy / ASCII Smilies.txt
Last active November 26, 2017 02:27
ASCII Smilies
( ͡° ͜ʖ ͡°)
( ͡ ͡° ͜ ʖ ͡ ͡°)
( ͠° ͟ʖ ͡°)
( ͡ ͡° ͜ʖ ͡ ͡°)
( ͡°╭͜ʖ╮͡°)
¯\_(ツ)_/¯
°ω°
°‿‿°
(・ω・)b
(・ω・)ノ
@Der-Eddy
Der-Eddy / backup.sh
Created November 22, 2015 14:31
Ubuntu Backup
#!/bin/bash
/home/eddy/scripts/sqldump.sh
day=`date +%b-%d-%y`
srcfolder="/var/nginx/"
destfile="/home/eddy/backup/nginx-backup-$day.tar.bz2"
tar cfvj $destfile $srcfolder
find /home/eddy/backup/nginx-backup-* -mtime +3 -exec rm {} \;
Date.prototype.getWeekNumber = function(){
var d = new Date(+this);
d.setHours(0,0,0);
d.setDate(d.getDate()+4-(d.getDay()||7));
return Math.ceil((((d-new Date(d.getFullYear(),0,1))/8.64e7)+1)/7);
};
Array.prototype.mapProperty = function(property) {
return this.map(function (obj) {
return obj[property];
@Der-Eddy
Der-Eddy / 1. Python Theorie & Tipps.md
Last active February 17, 2017 20:55
Python Theorie & Tipps

python logo

#Allgemeine Infos

Dieser Guide soll als zusätzliche Hilfe beim lernen von Python dienen, am besten machst du einen Python Kurs bei SoloLearn oder CodeCademy.

#Python 2 und Python 3

Python 3 ist inzwischen 8 Jahre alt und sollte eigentlich schon vor LANGER Zeit seinen Vorhänger Python 2 ablösen, Python 3 hatte jedoch große Änderungen die zwar oft vieles besser gemacht haben aber dafür die Portierung erschwert haben. Allgemein gilt, wenn man direkt mit Python 3 ein Projekt anfängt hat man am Ende weniger Probleme mit der Wartung.

Keybase proof

I hereby claim:

  • I am Der-Eddy on github.
  • I am dereddy (https://keybase.io/dereddy) on keybase.
  • I have a public key whose fingerprint is 42B9 1AAD 06D5 5A7D 6B37 57B1 8E05 0154 000D 4790

To claim this, I am signing this object: