Skip to content

Instantly share code, notes, and snippets.

View codespore's full-sized avatar
🔍
Looking for my next mission

Adrian Teh codespore

🔍
Looking for my next mission
View GitHub Profile
@codespore
codespore / my_gem.rb
Created May 2, 2011 15:07
my_gem.rb file store in lib/my_gem.rb
require 'my_gem/core_ext'
module MyGem
module Whateva
extend ActiveSupport::Concern
included do
puts "Woohoo!"
end
module ClassMethods
@codespore
codespore / index.html
Created May 6, 2011 10:08
Sample Quicksand + TinySort
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>jquery quicksand + tinysort</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script type="text/javascript" src="scripts/jquery-1.4.1.min.js"></script>
<script type="text/javascript" src="scripts/jquery.tinysort.js"></script>
<script type="text/javascript" src="scripts/jquery.quicksand.js"></script>
<style type="text/css">
@codespore
codespore / Sample Standard Tumblr Variable
Created July 23, 2011 04:38
Sample Standard Tumblr Variable
{Title} /* Displays your blog title */
{Description} /* Displays your blog's description */
@codespore
codespore / Conditional Block
Created July 23, 2011 04:41
Conditional Block
{block:IfFacebookPageID}
<div>Show facebook widget</div>
{/block:IfFacebookPageID}
@codespore
codespore / Content Type Block
Created July 23, 2011 04:42
Content Type Block
{block:Posts}
{block:Text}
<div>{Title}</div>
{/block:Text}
{/block:Posts}
@codespore
codespore / Custom Condition Block
Created July 23, 2011 04:45
Custom condition
<meta name=”if:Show Search” content=”1” />
@codespore
codespore / Custom Condition block
Created July 23, 2011 04:50
Custom condition block
{block:IfShowSearch}
<form action="/search" method="get">
<input type="text" name="q" value="{SearchQuery}"/>
<input type="submit" value="Search"/>
</form>
{/block:IfShowSearch}
@codespore
codespore / Custom text variable
Created July 23, 2011 04:51
Custom text variable
<meta name="text:Flickr Username" content="someusername"/>
@codespore
codespore / custom text variable usage
Created July 23, 2011 04:52
Customer variable usage
{block:IfFlickrUsername}
<div id="flickr_widget">
<script type="text/javascript"
src="http://flickr.com/widget?user={text:Flickr Username}">
</script>
</div>
{/block:IfFlickrUsername}
@codespore
codespore / gist:1133599
Created August 9, 2011 08:20
CSS3 Gmail styled buttons
/* Gmail styled buttons */
.gmail-button {
-moz-border-bottom-colors: none;
-moz-border-image: none;
-moz-border-left-colors: none;
-moz-border-right-colors: none;
-moz-border-top-colors: none;
background: -moz-linear-gradient(center top , #F9F9F9, #E3E3E3) repeat scroll 0 0 transparent;
border-color: #CCCCCC #BBBBBB #A0A0A0;