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
(function($){ | |
/********EQUALIZE************/ | |
$.fn.equalizeCols = function(){ | |
var height = 0, | |
reset = $.browser.msie ? "1%" : "auto"; | |
return this | |
.css("height", reset) | |
.each(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
/*** | |
This function will read the full structure of a directory. It's recursive becuase it doesn't stop with the one directory, it just keeps going through all of the directories in the folder you specify. | |
http://www.codingforums.com/showthread.php?t=71882 | |
***/ | |
function getDirectory( $path = '.', $level = 0 ){ | |
$ignore = array( 'cgi-bin', '.', '..' ); | |
// Directories to ignore when listing output. Many hosts |
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
Facebook Comments setup within (Fan) Page Tab: | |
1) From https://developers.facebook.com/apps/{APP_ID} -> Edit Settings -> Basic | |
2) Setup "Website with Facebook Login -> Site URL" with same value as "Page Tab -> Page Tab URL" | |
3) Setup "App Domains" with domain of the above items | |
4) Make sure Open Graph Meta Tags are set up, for example: | |
<meta property="fb:app_id" content="{APP_ID}"/> (This allows moderation from the app admins, but should also be set up at http://developers.facebook.com/tools/comments?id={APP_ID}" -> Settings) |
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> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>jQuery UI Position Window Resize Demo</title> | |
<link rel="stylesheet" href="http://code.jquery.com/ui/1.9.2/themes/base/jquery-ui.css"> | |
<script src="http://code.jquery.com/jquery-1.8.3.js"></script> | |
<script src="http://code.jquery.com/ui/1.9.2/jquery-ui.js"></script> | |
</head> |
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
def output name=((default=true); "caius") | |
puts "name: #{name.inspect}" | |
puts "default: #{default.inspect}" | |
end | |
output | |
# >> name: "caius" | |
# >> default: true | |
output "avdi" |
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
a = ["title", "date"] | |
b = ["Hello world", "March 2013"] | |
c = Hash[a.zip(b)] |
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
$stack, $draws = [], {} | |
def method_missing *args | |
return if args[0][/^to_/] | |
$stack << args.map { |a| a or $stack.pop } | |
$draws[$stack.pop(2)[0][0]] = args[1] if args[0] == :< | |
end | |
class Array | |
def +@ |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
OlderNewer