Skip to content

Instantly share code, notes, and snippets.

View sebastianhoitz's full-sized avatar
🎯
Focusing

Sebastian Hoitz sebastianhoitz

🎯
Focusing
View GitHub Profile
/**
* Class Eieruhr
*
* Eigener Thread. Bekommt als Parameter Name und dauer als String.
* Gibt nach Ablaufen der Zeit aus, dass die Zutat fertig ist.
*/
class Eieruhr extends Thread
{
String time;
long startTimeMillis;
@sebastianhoitz
sebastianhoitz / PostCode.php
Created May 13, 2011 21:41
Zend PostCode Validator dependent on Country
<?php
class My_Validate_PostCode extends Zend_Validate_Abstract
{
public function isValid($value, $context = null)
{
$value = (string) $value;
if(!(is_array($context) && isset($context['country'])))
{
class Foo
{
private int x;
public Foo(int x)
{
this.x = x;
}
public int add(Foo a)
<?php
class Twitter_StreamingClient extends Twitter_Phirehose
{
const URL_BASE = 'http://stream.twitter.com/1/statuses/';
const METHOD_USER = 'user';
const CONNECT_OAUTH = 'oauth';
const CONNECT_BASIC = 'basic';
protected $status_length_base = 10; // for some reason, the userstream uses hexadecimal status lengths