Requires a function getItemIdFromElement($element)
It should take a jQuery collection, and returns an identifier for that element.
getOrder
returns a flat array with object similar to the following.
{
level: 0,
parent: 0,
id: 1
}
#!/usr/bin/env ruby | |
puts "looking for the gems to upgrade..." | |
gem_info = Struct.new(:name, :version) | |
to_reinstall = [] | |
Dir.glob('/Library/Ruby/Gems/**/*.bundle').map do |path| | |
path =~ /.*1.8\/gems\/(.*)-(.*?)\/.*/ | |
name, version = $1, $2 | |
bundle_info = `file path` | |
to_reinstall << gem_info.new(name, version) unless bundle_info =~ /bundle x86_64/ | |
end |
/* | |
* object.watch polyfill | |
* | |
* 2012-04-03 | |
* | |
* By Eli Grey, http://eligrey.com | |
* Public Domain. | |
* NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. | |
*/ |
javascript:(function(){$('option','#font-family').attr('disabled',true).filter(function(a){return ':contains('+a.replace(/\+/g,' ').split(',').join('),:contains(')+')'}('Cantarell,Crimson+Text,Droid+Sans+Mono,IM+Fell,Inconsolata,Josefin+Sans+Std+Light,OFL+Sorts+Mill+Goudy+TT,Reenie+Beanie')).attr('disabled',false)})() |
/** | |
* jQuery.support.cssProperty | |
* To verify that a CSS property is supported | |
* (or any of its browser-specific implementations) | |
* | |
* @param p css property name | |
* @param rp optional, if set to true, the css property name will be returned | |
* instead of a boolean support indicator | |
* @return {mixed} | |
* |
Requires a function getItemIdFromElement($element)
It should take a jQuery collection, and returns an identifier for that element.
getOrder
returns a flat array with object similar to the following.
{
level: 0,
parent: 0,
id: 1
}
<div id='sidebar'> | |
<%= section(:sidebar) || partial(:default_sidebar) %> | |
</div> |
$.fn.deepest = function() { | |
/// <summary> | |
/// Return the deepest child of this element. | |
/// For example, when run on this structure: | |
/// | |
/// <div> | |
/// <span> <b>pick me!</b> </span> | |
/// <span> </span> | |
/// </div> | |
/// |
#!/usr/bin/python | |
# This work is licensed under the Creative Commons Attribution 3.0 United | |
# States License. To view a copy of this license, visit | |
# http://creativecommons.org/licenses/by/3.0/us/ or send a letter to Creative | |
# Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA. | |
# from http://oranlooney.com/make-css-sprites-python-image-library/ | |
# Orignial Author Oran Looney <olooney@gmail.com> |
<div id="output"></div> | |
<script type="text/html" id="greeting-template"> | |
<div class="greeting"> | |
Hello, {{ name }}! | |
</div> | |
</script> | |
<script> | |
function template(id, params) { | |
var html = document.getElementById(id).innerHTML |
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/ | |
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating | |
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel | |
// MIT license | |
(function() { | |
var lastTime = 0; | |
var vendors = ['ms', 'moz', 'webkit', 'o']; |