This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//This will patch the jquery.iviewer plugin to accept a post-zoom callback function | |
//http://github.com/can3p/iviewer/issues/issue/1 | |
/** | |
* event is triggered when zoom value is changed | |
* @param int new zoom value | |
* @return boolean if false zoom action is aborted | |
**/ | |
onZoom: null, | |
//begin patch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script> | |
<script src="http://yandex.st/raphael/1.5.2/raphael.min.js"></script> | |
<script> | |
/** | |
* A Simple Vector Shape Drawing App with RaphaelJS and jQuery | |
* copyright 2010 Kayla Rose Martin - Licensed under the MIT license | |
* Inspired by http://stackoverflow.com/questions/3582344/draw-a-connection-line-in-raphaeljs | |
**/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Basic SOAP Debugging and Service Discovery Methods for Programming Against SOAP Services | |
*/ | |
abstract class ADebuggable_Soap_Client extends SoapClient | |
{ | |
protected $_cached_apis; | |
/** | |
* Output some useful info about this SoapClient Instnace or State | |
*/ | |
public abstract function debug(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* This is a linear gradient that will go from: | |
very light grey (#EEE) at the top, | |
to medium grey (#BBB) at the bottom | |
*/ | |
.grey_gradient { | |
/* Graceful fallback for unsupported browsers */ | |
background: #ccc; | |
/* Firefox 3.6+ */ | |
background-image: -moz-linear-gradient(top, #eee, #bbb); | |
/* Webkit (Safari 4+, Chrome) */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" | |
"http://www.w3.org/TR/html4/strict.dtd"> | |
<html lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title>untitled</title> | |
<meta name="generator" content="TextMate http://macromates.com/"> | |
<meta name="author" content="WAVE Corp"> | |
<!-- Date: 2011-02-24 --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Simple video sample</title> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |
<script type="text/javascript" src="http://html5.kaltura.org/js" ></script> | |
</head> | |
<body> | |
<video id="vid1" width="480" height="267" durationHint="02:32"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Factory{ | |
public static function create($name){ | |
if(class_exists($name, TRUE)){ | |
return new $name; | |
}else{ | |
throw new IllegalArgumentException("$name is not an invalid or unknown type"); | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Elegant composition | |
// src: http://news.ycombinator.com/item?id=3512011 | |
function compose(funcA, funcB){ | |
return function(x, result, error){ | |
// Data flows right-to-left over composition, so "do x, then do y" | |
// is written: "do y" o "do x" | |
funcB(x, function(x_){ funcA(x_, result, error) }, error); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (c) 2010 Tobias Schneider | |
* This script is freely distributable under the terms of the MIT license. | |
*/ | |
(function(){ | |
var UPC_SET = { | |
"3211": '0', | |
"2221": '1', | |
"2122": '2', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add 10px of transparency canvas to all PNGs in this dir - renamed padded-ORIGNAME.png | |
`convert *.png -matte -bordercolor none -border 10 -set filename:fname '%t' 'padded-%[filename:fname].png'` | |
# Compress JPEGs at desired quality (1-100) | |
`convert *.jpg -quality 85 -set filename:fname '%t' 'compressed-%[filename:fname].jpg'` |
OlderNewer