Skip to content

Instantly share code, notes, and snippets.

#! /usr/bin/env ruby
require 'digest/md5'
require 'net/http'
require 'uri'
USER = "abc"
PASS = "def"
FEVER_URI = "http://xyz" # Without trailing slash please
get_feeds = URI.parse(FEVER_URI + "/?api&feeds")
PROGRAM Grafik0;
USES Graph;
VAR Treiber, Modus, Zeile, Spalte, Farbe, Zufall, counter: Integer;
BEGIN
Randomize;
counter := 0;
Treiber := Detect;
InitGraph (Treiber, Modus, 'c:\turbo\bgi');
@simonszu
simonszu / traktclean.rb
Created April 23, 2014 08:25
Trakt cleaner - Marks a whole show on trakt as unseen
#! /usr/bin/env ruby
require 'trakt'
trakt = Trakt.new
trakt.apikey = 'apikey'
trakt.username = 'simonszu'
trakt.password = 'password'
#puts client.server.time
#p client.show.episode_unseen("imdb_id" => "tt0364845", "episodes" => {"season" => 1, "episode" => 1})
@simonszu
simonszu / GC4WF1G.rb
Created June 16, 2015 17:35
Converts the numbers from 1 to 10k to german words, and sorts them alphabetically
#! /usr/bin/env ruby
# Encoding: utf-8
output = Array.new
10000.times do |zahl|
zahl = zahl+1
array = zahl.to_s.scan(/./)
string = ""
@simonszu
simonszu / karotaler.rb
Created June 16, 2015 17:37
Fetches everyday's Karotaler from animexx.de
#! /usr/bin/env ruby
require 'mechanize'
# Spezifizieren der Userdaten
username = "tatonka"
password = ""
# Generieren eines neuen Mechanize-Agenten
a = Mechanize.new {|agent|
@simonszu
simonszu / gdocexp.rb
Created June 16, 2015 17:38
Converts a Google Contacts database to a phonebook format used by the Cisco IP Phone series
#! /usr/bin/env ruby
# Require rubygems and the Google data gem
require 'rubygems'
require 'gdata'
require 'fileutils'
# Specifying the settings
GMAIL_USER = "user@gmail.com" # Your gmail username
GMAIL_PASS = "pa55w0rd" # Your gmail pass
@simonszu
simonszu / gameoflife.rb
Created June 16, 2015 17:38
Conway's game of life with ASCII output
#!/usr/bin/env ruby
STDOUT.sync = true
# Create the grid
class Grid
def initialize(height, width)
@width = width
@simonszu
simonszu / hello.go
Created June 16, 2015 17:39
Playing around with Go and SNMP
package main
import "fmt"
import "os"
import "regexp"
import "strconv"
import gosnmp "github.com/alouca/gosnmp"
func interfacecheck(ip string) {
fmt.Println("Checking " + ip)
@simonszu
simonszu / scan.rb
Created June 16, 2015 17:40
A script to bruteforce a task for the dropbox spacerace
#! /usr/bin/env ruby
99999.times do |i|
test = i+1
puts "Teste #{test}"
array = test.to_s.split('')
condition1 = ((array[0].to_i * array[1].to_i) == 24)
condition2 = ((array[3].to_i * 2) == array[1].to_i)
condition3 = ((array[3].to_i + array[4].to_i) == (array[0].to_i + array[2].to_i))
condition4 = ((array[0].to_i + array[1].to_i + array[2].to_i + array[3].to_i + array[4].to_i) == 26)
condition5 = ((array[1].to_i + array[2].to_i) == array[4].to_i)
@simonszu
simonszu / secure.php
Created June 16, 2015 17:41
A password checker for PHP
<?php
$username = "user";
$password = "password";
if ((!isset($_POST["user"])) && (!isset($_POST["pw"]))){
echo "<form action=\"secure.php\" method=\"post\">";
echo "username: <input type=\"text\" name=\"user\"><br />";
echo "password: <input type=\"password\" name=\"pw\">";
echo "<input type=\"submit\" value=\"Abschicken\">";