Skip to content

Instantly share code, notes, and snippets.

View RudolfHattenkofer's full-sized avatar

Rudolf Hattenkofer RudolfHattenkofer

  • Munich, Germany
View GitHub Profile
@RudolfHattenkofer
RudolfHattenkofer / word_generator.rb
Created October 24, 2013 16:28
Generate a never ending list of words.
# Initialize variables
alphabet = 1
word = 1
direction = 'down'
ignore = false
chars = []
# 0..20 is just a soft limit so the machine doesn't crash. Switch the hashtag
# in front of the following two lines for endless mode:
@RudolfHattenkofer
RudolfHattenkofer / word_generator.rb
Created October 24, 2013 16:33
Generate a never ending list of words and save them in a list to avoid duplicates. More memory intensive.
# Initialize variables
alphabet = 1
word = 1
direction = 'down'
ignore = false
chars = []
all_words = []
# 0..20 is just a soft limit so the machine doesn't crash. Switch the hashtag
# in front of the following two lines for endless mode:
@RudolfHattenkofer
RudolfHattenkofer / rss.php
Last active December 26, 2015 18:39
RSS-Feed für TUMonline Seiten. Für ERA vorkonfiguriert.
<?php
// Feed URL und Name der Überschrift hier eingeben:
$feed_url = 'http://www.lrr.in.tum.de/public/VorlesungERAWS13';
$headline = 'Aktuelles';
// Feed-interne Einstellungen
$config = array(
'name' => 'Vorlesung ERA WS 13/14',
'desc' => 'RSS-Feed zur Vorlesung',
'url' => 'http://www.lrr.in.tum.de/public/VorlesungERAWS13',
@RudolfHattenkofer
RudolfHattenkofer / rss.php
Last active December 26, 2015 18:39
RSS-Feed für TUMonline Seiten. Für DS vorkonfiguriert.
<?php
// Feed URL und Name der Überschrift hier eingeben:
$feed_url = 'http://www7.in.tum.de/um/courses/ds/ws1314/';
$config = array(
'name' => 'Vorlesung DS WS 13/14',
'desc' => 'RSS-Feed zur Vorlesung',
'url' => $feed_url,
);
// Register our actions here
actions_setup = function( $el, query_children ) {
// Initialize our apply_to_selector function
var apply = apply_to_selector( $el, query_children );
// The action to insert the links
apply( '.links-insert', function( $node ) {
// Add the event, don't forget to use jQuery.offon
// to avoid duplicate events!
$node.offon( 'click.links-insert', function() {