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
# SSL self signed localhost for rails start to finish, no red warnings.
# 1) Create your private key (any password will do, we remove it below)
$ openssl genrsa -des3 -out server.orig.key 2048
# 2) Remove the password
$ openssl rsa -in server.orig.key -out server.key
@codespore
codespore / entypo.css
Last active August 29, 2015 14:12 — forked from pnull/entypo.css
@font-face {
font-family: 'EntypoRegular';
src: url('font/entypo.eot');
src: url('font/entypo.eot?#iefix') format('embedded-opentype'),
url('font/entypo.woff') format('woff'),
url('font/entypo.ttf') format('truetype'),
url('font/entypo.svg#EntypoRegular') format('svg');
font-weight: normal;
font-style: normal;
}
@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 / 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 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 / 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}