Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env ruby
require 'rubygems'
require 'redcarpet'
require 'pygments.rb'
class HTMLwithPygments < Redcarpet::Render::HTML
def block_code(code, language)
Pygments.highlight(code, :lexer => language.to_sym, :options => {
:encoding => 'utf-8'
})
@codetrail
codetrail / index.html
Created October 28, 2012 00:34
A CodePen by Jack Rugile.
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div class="google">
<h4>Google Site Specific Search</h4>
<form method="get" action="http://google.com/search" target="_blank">
<label class="s3"><span class="r4"><input type="radio" name="sitesearch" value="" checked><span class="r5"></span></span>Google</label>
<label class="s3"><span class="r4"><input type="radio" name="sitesearch" value="wikipedia.org"><span class="r5"></span></span>Wikipedia</label>
<label class="s3"><span class="r4"><input type="radio" name="sitesearch" value="www.youtube.com"><span class="r5"></span></span>Youtube</label>
<label class="s3"><span class="r4"><input type="radio" name="sitesearch" value="www.vimeo.com"><span class="r5"></span></span>Vimeo</label>
<label class="s3"><span class="r4"><input type="radio" name="sitesearch" value="hulu.com"><span class="r5"></span></span>Hulu</label>
<label class="s3"><span class="r4"><input type="radio" name="sitesearch" value="answers.com"><span class="r5"></span></span>Answers</label>
<div class="google">
<h4>Google Site Specific Search</h4>
<form method="get" action="http://google.com/search" target="_blank">
<label class="s3"><span class="r4"><input type="radio" name="sitesearch" value="" checked><span class="r5"></span></span>Google</label>
<label class="s3"><span class="r4"><input type="radio" name="sitesearch" value="wikipedia.org"><span class="r5"></span></span>Wikipedia</label>
<label class="s3"><span class="r4"><input type="radio" name="sitesearch" value="www.youtube.com"><span class="r5"></span></span>Youtube</label>
<label class="s3"><span class="r4"><input type="radio" name="sitesearch" value="www.vimeo.com"><span class="r5"></span></span>Vimeo</label>
<label class="s3"><span class="r4"><input type="radio" name="sitesearch" value="hulu.com"><span class="r5"></span></span>Hulu</label>
<label class="s3"><span class="r4"><input type="radio" name="sitesearch" value="answers.com"><span class="r5"></span></span>Answers</label>
@codetrail
codetrail / gist:3798146
Created September 28, 2012 05:55
CSS: Fixed Footer
#footer {
position:fixed;
left:0px;
bottom:0px;
height:30px;
width:100%;
background:#999;
}
/* IE 6 */
@codetrail
codetrail / gist:3798140
Created September 28, 2012 05:52
CSS: Blurry Text
.blur {
color: transparent;
text-shadow: 0 0 5px rgba(0,0,0,0.5);
}
@codetrail
codetrail / centering.html
Created September 28, 2012 05:48
CSS: Absolute Center Image
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title></title>
<style type="text/css">
/*CSS background-image Technique*/
html {
width: 100%;
height: 100%;
@codetrail
codetrail / gist:3798111
Created September 28, 2012 05:40
HTML5: Video with Flash Fallback
<!-- first try HTML5 playback: if serving as XML, expand `controls` to `controls="controls"` and autoplay likewise -->
<!-- warning: playback does not work on iOS3 if you include the poster attribute! fixed in iOS4.0 -->
<video width="640" height="360" controls>
<!-- MP4 must be first for iPad! -->
<source src="__VIDEO__.MP4" type="video/mp4" /><!-- Safari / iOS video -->
<source src="__VIDEO__.OGV" type="video/ogg" /><!-- Firefox / Opera / Chrome10 -->
<!-- fallback to Flash: -->
<object width="640" height="360" type="application/x-shockwave-flash" data="__FLASH__.SWF">
<!-- Firefox uses the `data` attribute above, IE/Safari uses the param below -->
<param name="movie" value="__FLASH__.SWF" />
@codetrail
codetrail / gist:3798099
Created September 28, 2012 05:36
HTML5: Article structure with hNews
<article class="hentry">
<header>
<h1 class="entry-title">But Will It Make You Happy?</h1>
<time class="updated" datetime="2010-08-07 11:11:03-0400" pubdate>08-07-2010</time>
<p class="byline author vcard">
By <span class="fn">Stephanie Rosenbloom</span>
</p>
</header>
<div class="entry-content">
@codetrail
codetrail / gist:3798084
Created September 28, 2012 05:27
CSS: Image Replacement
.ir {
border: 0;
font: 0/0 a;
text-shadow: none;
color: transparent;
background-color: transparent;
}