Skip to content

Instantly share code, notes, and snippets.

Jeff Craig foxxtrot

Block or report user

Report or block foxxtrot

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am foxxtrot on github.
  • I am foxxtrot (https://keybase.io/foxxtrot) on keybase.
  • I have a public key whose fingerprint is 7DF3 3D3F 74EA F1D9 EA44 6F18 C222 E165 73D1 87BA

To claim this, I am signing this object:

@foxxtrot
foxxtrot / gist:4962025
Last active Dec 13, 2015
A way to override the Gallery location in YUI. This is awful, but it works by overriding the defaults on all future YUI instances. You're better off applying it in the config object to YUI() or your YUI_config.
View gist:4962025
// 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" } } });
View gist:2578094
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%
View gist:776630
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
View compressorTest.sh
#!/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}...";
@foxxtrot
foxxtrot / Chart Test
Created Dec 13, 2010
Testing YUI3 Charts for a Blog Post, multiple Charts on one document.
View Chart Test
<!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; }
View yuitest_in_nodejs.js
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() {
View gist:632667
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.";
View gist:589282
.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));
View gist:474340
<!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
You can’t perform that action at this time.