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
# YUI3 Snippets file for Vim SnipMate plugin | |
# http://www.vim.org/scripts/script.php?script_id=2540 | |
# File Format should be simlar to TextMate | |
# Filetype option in VIM should be set to javascript.yui3 | |
# YUI use block | |
snippet yui | |
YUI().use(${1}, function(Y) { | |
${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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> | |
<html> | |
<head> | |
<Script src="http://yui.yahooapis.com/3.1.0/build/yui/yui-min.js"></script> | |
</head> | |
<body> | |
<script> | |
alert('foo'); | |
YUI({ | |
//Last Gallery Build of this module |
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
.program $assert:areEqual | |
if (length(args) < 2) | |
notify(#3, "Not enough Args"); | |
raise(E_ARGS); | |
endif | |
msg = ""; | |
{a, b, ?msg} = args; | |
notify(#3, tostr("a = ", a)); | |
notify(#3, tostr("b = ", b)); | |
notify(#3, tostr("msg = ", msg)); |
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
for x in ($goal_db:all_entries()) | |
row = $goal_db:find_exact(x); | |
temp = {}; | |
index = length(row); | |
starttime = time() - 432000; | |
while (index > 0 && row[index][1] > starttime ) | |
temp = listappend(temp, row); | |
index = index - 1; | |
endwhile | |
"At this point, temp contains all the entries for player X made in the last 5 days."; |
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
var YUI = require("yui3").YUI | |
, otherSuite = require("./other_suite") | |
; | |
YUI({logInclude:{TestRunner:true}}).use("test", function(Y) { | |
var suite = new Y.Test.Suite("Server Test Suite"); | |
var test_nothing = new Y.Test.Case({ | |
name: "Testing nothing", | |
"testing nothing special": function() { |
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> | |
<meta charset="utf-8"> | |
<title>Charts Test</title> | |
<style type="text/css"> | |
body { width: 755px; } | |
.chartContainer { clear: both; } | |
.yui3-cartesianchart { float: left; } | |
.chartLegend { float: right; width: 225px; border-style: groove; padding: 3px;} | |
.chartLegend ul { list-style-type: none; padding: 0;} | |
.chartLegend li { padding-left: 8px; } |
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
#!/bin/bash | |
jsfile=${1}; | |
testruns=1000 | |
yuicompressor=./yuicompressor-2.4.5pre.jar; | |
yuicompressorServer="curl --silent http://localhost:8888/compress?type=js -T"; | |
closurecompiler="./gcj.jar --compilation_level SIMPLE_OPTIMIZATIONS --js"; | |
uglifyjs="uglifyjs"; | |
echo "Running Compressor Tests on ${jsfile}..."; |
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
Buildfile: /home/craig/src/yui/yui3-gallery/src/gallery-node-extras/build.xml | |
[echo] Starting Build For gallery-node-extras | |
[echo] Ant Properties | |
[echo] Home : /usr/share/ant | |
[echo] Ant Version : Apache Ant version 1.8.0 compiled on May 9 2010 | |
[echo] Build File : /home/craig/src/yui/yui3-gallery/src/gallery-node-extras/build.xml | |
[echo] Local Build Properties | |
[echo] version : 3 | |
[echo] srcdir : /home/craig/src/yui/yui3-gallery | |
[echo] builddir : ../../../builder/componentbuild |
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
SCANNING PSR X0392-15 AT 5.534417156693186 SAMPLES PER SECOND | |
------------------------------------------------------------------------------- | |
#INSUFFICIENT POWER 29.98% | |
#INSUFFICIENT POWER 30.39% | |
#INSUFFICIENT POWER 30.04% | |
#INSUFFICIENT POWER 29.22% | |
#INSUFFICIENT POWER 29.22% | |
#INSUFFICIENT POWER 29.20% | |
#INSUFFICIENT POWER 29.24% | |
#INSUFFICIENT POWER 29.23% |
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
// YUI.Env is not populated until you build a YUI base object once. You can cache a reference to it here, if you'd like, | |
// but you probably don't want to require anything. You certainly don't want to require anything from the Gallery. | |
YUI() | |
YUI.Env[YUI.version].groups.gallery.base = "http://path.to.my.server/lib/yui-gallery/build"; | |
YUI.Env[YUI.version].groups.gallery.comboBase = "http://path.to.my.server/combo? | |
YUI.Env[YUI.version].groups.gallery.root = "lib/yui-gallery/build"; | |
// This is how you *should* do this, ignore everything above: | |
YUI({groups: { gallery: { base: "http://path.to.my.server/lib/yui-gallery/build", comboBase: "http://path.to.my.server/combo?", root: "lib/yui-gallery/build" } } }); |