(function($, undefined){
$.widget('ui.foo', {
options: {
This file contains hidden or 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
#/usr/bin/env bash | |
# MIT © Sindre Sorhus - sindresorhus.com | |
# git hook to run a command after `git pull` if a specified file was changed | |
# Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`. | |
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)" | |
check_run() { | |
echo "$changed_files" | grep --quiet "$1" && eval "$2" |
This file contains hidden or 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains hidden or 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
/** | |
Generates a series of colors from startColor at various offsets | |
@protected | |
@method _getOffsetAndFinish | |
@param {String} startColor Start color | |
@param {Array} arrOffsets Array of colors | |
@param {String} [to] | |
@returns {Array} Of offsetted and finished colors | |
**/ | |
_getOffsetAndFinish: function (startColor, arrOffsets, to) { |
This file contains hidden or 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
/* | |
* @class AMS.Calendar | |
* @extends Widget | |
* @version 1.0.0 | |
* | |
*/ | |
YUI.add("ams-calendar", function (Y) { | |
Y.log('ams-calendar is loaded', 'info'); | |
var YAHOO = Y.YUI2; |
This file contains hidden or 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
function (key, values, rereduce) { | |
// value -> [count, min, max, mean] | |
var i = 0 | |
, l = values.length | |
, min = values[i][2] // set min to the first max | |
, max = 0 | |
, weighted_sum_of_means = 0 | |
, count = 0 | |
, cur_count // just for clarity, feel free to remove later | |
, cur_min |
This file contains hidden or 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 | |
$str = 'L�a�n�d�e�s�b�e�r�g�.�A�m�y�-�2�0�0�5�_�S�U�N�& o�r�a�n�g�e�,� �g�r�e�e�n�,� �b�l�u�e� �a�n�d� �b�l�u�e�_�4�w�e�b�.�j�p�g�'; | |
echo $str; | |
echo '<br><br>'; | |
echo cleanUpString($str); |
This file contains hidden or 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
YUI.add('collapsing-stalker', function(Y){ | |
var CS = Y.Base.create('collapsing-stalker', Y.Plugin.Base, [], { | |
_host : null, | |
_clickBind : null, | |
initializer : function() { | |
Y.log('initializer','info','Y.Plugin.Xarno.CollapsingStalker'); |
This file contains hidden or 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 | |
while($c1=mysql_fetch_array($result1, MYSQL_ASSOC)) { | |
$sql2 = "SELECT `COL 3`,`COL 14` FROM `TABLE 1` WHERE `COL 3` = $c0[id]"; | |
$result2 = mysql_query($sql2); | |
echo mysql_error(); | |
while($c2=mysql_fetch_array($result2, MYSQL_ASSOC)) { | |
echo "<tr><td>ID: $c2[`COL 3`] </td></td> hours: $c2[`COL 14`] </td></tr>"; | |
} |
This file contains hidden or 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
YUI.add('photogallery', function(Y){ | |
Y.Photogallery = Y.Base.create('photogallery', Y.Widget, [], { | |
initCollectionObservers : function() { | |
// var gotoCollectionCallback = this.gotoCollection; | |
// var galleryAttributes = this.galleryAttributes; | |
Y.all('#collectionsul .collectionli .buttonWrapper').each(function(o) { | |
this.set('cid', o.get('id').replace(/^collection_/,'')); | |
webkit.setupButton(o.get('id'), Y.bind(function(){ this.gotoCollection(this.getAttrs()); }, this), this); |
NewerOlder