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
<script> | |
var YUI_config = { | |
skin : { | |
overrides : { | |
"widget" : [] | |
} | |
} | |
}; | |
</script> |
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
/* global YUI */ | |
/** | |
* My Module's purpose | |
* @module my-module | |
* @requires base-build, widget | |
*/ | |
YUI.add("my-module", function (Y) { | |
"use strict"; |
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
javascript:(function(){ | |
var images = document.getElementsByTagName("img"); | |
var id_regex = new RegExp(/^thumb-img\d+/i); | |
var image_source_regex = new RegExp(/(.+?)t(.\w{3})$/); | |
var image_sources = []; | |
for (var i = 0; i < images.length; i++) { | |
if (id_regex.test(images[i].id) && image_source_regex.test(images[i].src)) { | |
image_source = RegExp.$1 + RegExp.$2; | |
image_sources.push(image_source); | |
} |
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
// Fixing cascade resources | |
(function($){ | |
// Fixing cascade resources | |
$.fn.absolutizePath = function(prefix, base_path) { | |
this.each(function() { | |
// No need to rewrite src or links if already inside ccp | |
if (/\/ccp\//.test(window.location.href)) { | |
return; | |
} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Standalone Carousel</title> | |
</head> | |
<body> | |
<div id="carousel"></div> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script> | |
<script src="http://www.ius.edu/front/javascripts/carousel_cached.js"></script> | |
<link href="http://www.ius.edu/front/stylesheets/carousel_cached.css" rel="stylesheet" type="text/css" media="screen"/> |
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
# Installs on Snow Leopard. | |
# Homebrew | |
ruby -e "$(curl -fsS http://gist.github.com/raw/323731/install_homebrew.rb)" | |
echo 'export PATH=/usr/local/bin:/usr/local/sbin:$PATH' >> ~/.bash_profile | |
# Close Terminal window. | |
# Git | |
brew install git | |
brew update |
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 anatomy of a slot | |
Slot = Struct.new(:row, :column, :value) | |
# The board has n x n slots | |
class Board | |
# Constants | |
X = "X" | |
O = "O" |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8"> | |
<title>3rd party website using the bookmarking widget</title> | |
</head> | |
<body> | |
....content.... | |
<!-- Embed the script tag to make the widget show here --> | |
<script src="http://bookmarking-site.com/javascripts/widget.js"></script> |
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
<a href="#" class="save_to_academia_bookmarks">Save to Academia Bookmarks</a> | |
<script type="text/javascript"> | |
window.Academia = window.Academia || {}; | |
(function(a){ | |
// the load event handler for the iframe | |
a.iframe_loaded = function(e) { console.log(e); } | |
// the click event handler for | |
a.a_links = document.getElementsByClassName("save_to_academia_bookmarks"); | |
for (i = 0; i < a.a_links.length; i++) { |