Skip to content

Instantly share code, notes, and snippets.

# LCDd.conf -- configuration file for the LCDproc server daemon LCDd
#
# This file contains the configuration for the LCDd server.
#
# The format is ini-file-like. It is divided into sections that start at
# markers that look like [section]. Comments are all line-based comments,
# and are lines that start with '#' or ';'.
#
# The server has a 'central' section named [server]. For the menu there is
# a section called [menu]. Further each driver has a section which
public class MagicalLand {
public static void main(String[] args) {
for(int i = 0; i < (Math.random() * 500) + 2; i++) {
if(Unicorn.pat()) {
System.out.println("UNICORN #1: PAT THIS UNICORN ONCE");
}
}
for(int i = 0; i < (Math.random() * 500) + 2; i++) {
if(Unicorn.pat()) {
System.out.println("UNICORN #2: PAT THIS UNICORN ONCE");
@stetro
stetro / twitterlcd.py
Last active December 11, 2015 00:38
LCDproc Twitter Client
from tweepy import OAuthHandler
from tweepy import API
from tweepy import Status
from lcdproc.server import Server
import socket
import time
import commands
def tweepy_auth():
@stetro
stetro / notifier.py
Created October 28, 2012 11:51
Raspberry PI GPIO Twitter and Mail Notifier
from tweepy import OAuthHandler
from tweepy import API
from tweepy import Status
from threading import Thread
import RPi.GPIO as GPIO
import feedparser
import time
import commands
@stetro
stetro / wordpress_subnav.php
Created October 28, 2012 09:50
Wordpress Subnavigation aus Navigationen (wp_nav_menu())
<ul id="subnavigation">
<?php
function my_nav_submenu_objects( $items, $args ) {
$subnav_elements = array();
// Sammle alle Subnavielemente
foreach ($items as $key => $value) {
if($value->menu_item_parent != 0){
$subnav_elements[$key]=$value;
}
}
@stetro
stetro / bspruefung.txt
Created September 11, 2012 12:48
BS Prüfungsübersicht
Fragen hier eintragen
@stetro
stetro / Makefile
Created June 25, 2012 19:09
RPC palindrom Funktion
# Makefile fuer Palindrom-Beispiel
CC = cc
LD = -lnsl
all: palindrom_Client palindrom_Server
# die XDR-Schnittstelle
palindrom_clnt.c palindrom_svc.c palindrom.h palindrom_xdr.c: palindrom.x
rpcgen palindrom.x
@stetro
stetro / analyse.c
Created June 12, 2012 19:29
Dateianalyse Tool
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <sys/types.h>
#include <sys/stat.h>
#ifndef INPUT_ERR
#define INPUT_ERR "Aufruf mit %s <Datei> ...\n",argv[0]
#endif
#ifndef STAT_ERR
@stetro
stetro / messageQueue.c
Created June 12, 2012 19:27
Message Queue Sender und Empfaenger
#include <stdio.h>
#include <stdlib.h>
#include <sys/msg.h>
#include <errno.h>
#include <string.h>
#ifndef ARGV_ERROR
#define ARGV_ERROR "Aufruf mit ./a.out [r|s] [id] \n"
#endif
#ifndef ID_ERROR
@stetro
stetro / ipcrma.sh
Created June 5, 2012 17:16
Shellskript der alle Shared Memory, Semaphore und Message Queues einer Nutzers loescht
#!/bin/sh
#
# Aufruf:
# ./ipcrma.sh Benutzername ipcTyp
#
# Typen: { m | s | q }
# m->Shared Memory
# s->Semaphore
# q->Message Queues