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
function JsonToCsv(json) { | |
var csv = ''; | |
// Begin with the header row, using | |
// the keys as headings. | |
for (var key in json[0]) { | |
csv += key + ','; | |
} |
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> | |
<!-- | |
Shaun Donnelly ([email protected]) | |
This is a skeleton HTML page. | |
Copy it, then use it to make HTML demos and other things. | |
In the <head>, there are a number of commented out |
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
function FilterResults(query) { | |
// Remove whitespace. | |
query = $.trim(query); | |
// Add an 'OR' for regex syntax. | |
query = query.replace(/ /gi '|'); | |
$('selector for each element to search').each(function () { | |
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
# Tweet Stream. Uses the 'tweetstream' gem. | |
# Asks for a keyword, and monitors tweet for that keyword. | |
require 'tweetstream' | |
# Ask for keyword. | |
print "Keyword: " | |
keyword = gets.chomp() | |
TweetStream.configure do |config| |
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
$(document).ready(function(){ | |
$("#search").bind({ | |
focus: function() { | |
$(this).animate({ width:200 }, 300); | |
}, | |
blur: function() { | |
$(this).animate({ width:90 }, 300); | |
} | |
}); | |
}); |
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
<input type="search" id="search" style="width:90px;" placeholder="Click Me!" /> |