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
<input type="search" id="search" style="width:90px;" placeholder="Click Me!" /> |
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
$(document).ready(function(){ | |
$("#search").bind({ | |
focus: function() { | |
$(this).animate({ width:200 }, 300); | |
}, | |
blur: function() { | |
$(this).animate({ width:90 }, 300); | |
} | |
}); | |
}); |
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
# 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 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 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 (hello@sdonnelly.co.uk) | |
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 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 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-loading { | |
background: lighten(#ff0, 35%); | |
@include borderBottomRadius(3px); | |
@include boxShadow((0 0 5px rgba(#000, .5))); | |
color: #333; | |
color: rgba(#000, .4); | |
font-size: 24px; | |
font-weight: bold; | |
left: 50%; | |
height: 70px; |
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
require 'sinatra' | |
set :port, 4567 | |
set :public_folder, File.dirname(__FILE__) + '/' | |
get '/' do | |
File.read('index.html') | |
end |