Skip to content

Instantly share code, notes, and snippets.

View stdclass's full-sized avatar

Phillip Dornauer stdclass

View GitHub Profile
<?php
/*
@Autor: Phillip Dornauer
http://wiki.github.com/micho/teambox/rest-api
*/
class Teambox_API{
private $user;
private $pass;
@stdclass
stdclass / callerProxy.php
Created December 1, 2010 15:31
callerProxy.php
<?php
/**
* Caller Proxy Pattern
* author: [email protected]
**/
class callerProxyException extends Exception{}
interface iCallerProxy{
w="-webkit-trans";i=0;while(e=document.getElementsByTagName("div")[i++])e.style.cssText+=w+"ition:all,20s;"+w+"form:rotate("+(i/10)+"rad)"
@stdclass
stdclass / example.js
Created May 17, 2011 16:06
Tweet Sized PubSub
var pubsub = {t:{},sub:function(t,c,e){e=this;!e.t[t]&&(e.t[t]=[]);e.t[t].push(c);},pub:function(t,a,i,e){i=0;while(e=this.t[t][i++])e.apply({},a);}};
pubsub.sub("topic", function(p){
console.log("param: " + p);
});
pubsub.sub("topic", function(p){
console.log("param: " + p);
});
@stdclass
stdclass / example.js
Created May 17, 2011 16:55 — forked from 140bytes/LICENSE.txt
Pub Sub
var pubsub = {t:{},sub:function(t,c,e){e=this;!e.t[t]&&(e.t[t]=[]);e.t[t].push(c);},pub:function(t,a,i,e){i=0;while(e=this.t[t][i++])e.apply({},a);}};
pubsub.sub("topic", function(p){
console.log("param: " + p);
});
pubsub.sub("topic", function(p){
console.log("param: " + p);
});
@stdclass
stdclass / example.js
Created May 17, 2011 17:15 — forked from 140bytes/LICENSE.txt
Make RGB Colors Lighter / Darker
/*
* Make RGB-Colors lighter / darker
*/
var color = function(c,m,f,d){d=Math.round(f?f:0.2*256)*(m?-1:1);function k(i){return Math[m?'max':'min'](c[i]+d,m?0:255)}return[k(0),k(1),k(2)]}
/**
* @param array RGB Colors
* @param bool (false)(default) Lighter / (true) Darker
* @param floar Ratio (default: 0.2 )
@stdclass
stdclass / example.js
Created May 17, 2011 18:26 — forked from 140bytes/LICENSE.txt
Type Checking
var is={};
(function(t,c,i,e,o){c=function(o){return function(v){return o==v.constructor;}};t=t.split(",");i=0;while(e=t[i++])this[e]=c(eval(e))})
.call(is, "String,Array,Object,Function,Number");
console.log( is.String( "123" ) ); // true
console.log( is.String( 123 ) ); // false
console.log( is.Number( 123) ); // true
console.log( is.Object( {} ) ); // true
@stdclass
stdclass / Start
Created August 8, 2011 15:58
Start
*How to install*
1. <h2>[Get with **GitHub for Mac**](http://mac.github.com/ "GitHub for Mac")</h2>
2. *Clone it* to your `~/Library/Application Support/TextMate/Pristine Copy/Bundles`
3. In TextMate *choose the menu item…*
**Bundles** / **Bundle Editor** / **Reload Bundles**
4. If node is not installed in your PATH, go to TextMate → Preferences → Advanced → Shell Variables and add /usr/local/bin, basically the path to where node lives on your machine (which node).
* * *
@stdclass
stdclass / LICENSE.txt
Created August 27, 2011 13:04 — forked from 140bytes/LICENSE.txt
The Comeback of the BLINK-Tag
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@stdclass
stdclass / LICENSE.txt
Created September 1, 2011 10:50 — forked from 140bytes/LICENSE.txt
Simple Loop
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE