(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
// The plan | |
1. find the <script> pointing to yui(?:-(?:debug|min)).js -- this could be a combo file | |
2. Right after it, inject <script src="http://yui.yahooapis.com/(version)/build/io/io-base-min.js"></script> followed by a <script> pointing to your io override module. | |
- The static inclusion of io-base will add it to the YUI.Env.mods collection, preventing Loader from fetching the module | |
3. In your script, replace the YUI.Env.mods['io-base'] entry with your module's entry, and store off the existing io-base module entry under a different name. Specify this other name as a requirement for your module. | |
4. Profit (hopefully). | |
- YUI().use('whatever',...) should resolve dependencies, identifying your module as io-base, and requiring the real io-base be executed before yours (to facilitate proper overwriting) |
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
/** | |
* Sanitize URL — Validate it looks like a URL, then make it less dirty. | |
* | |
* Oddnut Software | |
* Copyright (c) 2010 Eric Ferraiuolo - http://eric.ferraiuolo.name | |
* MIT License - http://www.opensource.org/licenses/mit-license.php | |
* | |
* Examples: | |
* | |
* 'Http://WWW.example.com/' » 'http://www.example.com/' |
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
// find some-dir ... \ | |
// | egrep 'o+$' \ | |
// | sed -e 's|^foo|bar|' -e 's|^bar$|baz|g' | |
find("some-dir", {type:"file", older:new Date("January 12, 2010")}) | |
.pipe(grep(/o+$/)) | |
.pipe(sed([/^foo/, "bar"], [/^bar$/g, "baz"])) | |
.pipe(cat()) |
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
npm install selleck | |
git clone git://github.com/yui/yui3.git | |
cd yui3/src | |
selleck -s | |
http://localhost:3000/ |
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
# I was trying to figure out how to get a list of changes made remotely on Git | |
# before applying. Here's what I came up with. | |
# First, get the latest data from the origin | |
git fetch origin | |
# Then, get the changes and output to a file | |
git log HEAD..origin/master > changes.txt | |
# Merge changes in |
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
/* Based on YUI 3 CSS Grids: http://developer.yahoo.com/yui/3/cssgrids/ */ | |
.layout { | |
letter-spacing: -0.31em; /* webkit: collapse white-space between units */ | |
*letter-spacing: normal; /* reset IE < 8 */ | |
word-spacing: -0.43em; /* IE < 8 && gecko: collapse white-space between units */ | |
} | |
.layout > *, | |
.layout .unit { | |
display: inline-block; | |
zoom: 1; *display: inline; /* IE < 8: fake inline-block */ |
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
Show hidden characters
// Place user-specific overrides in this file, to ensure they're preserved | |
// when upgrading | |
{ | |
"folder_exclude_patterns": [".svn", ".git", ".hg", "CVS", "node_modules"] | |
} |
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 the following in the "resultFilters" option when creating a YUI 3 Autocomplete | |
* widget. This will return matches when *any* of the words in the query string match. | |
* This is opposed to the default "wordMatch", which matches *all* words in the | |
* query string. | |
*/ | |
function matchAnyWord(query, results) { | |
var WordBreak = Y.Text.WorkBreak, |
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
<!-- | |
Ant target for autogenerating a changelog based on Git tags | |
Workflow: | |
1. Do all of your checkins for a given version. | |
2. When you're ready to officially create a new version, tag it using git tag, such as "git tag v0.3.0". | |
3. If you don't already have a file named CHANGELOG in the root directory, make one. | |
4. Run "ant changelog.update" |
OlderNewer