Skip to content

Instantly share code, notes, and snippets.

@illnino
illnino / h5bp.html.erb
Created December 14, 2012 04:58
HTML5 Boilerplate
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><%= content_for?(:title) ? yield(:title) : "RsgTwitterGem" %></title>
<%= csrf_meta_tags %>
<!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
@illnino
illnino / flash-message.html.erb
Created November 5, 2012 03:12
Rails HTML5 Boilerplate
<% flash.each do |name, msg| %>
<% if msg.is_a?(String) %>
<div class="alert alert-<%= name == :notice ? "success" : "error" %>">
<a class="close" data-dismiss="alert">&#215;</a>
<%= content_tag :div, msg, :id => "flash_#{name}" %>
</div>
<% end %>
<% end %>
@illnino
illnino / Rails MongoMapper Template.rb
Created September 18, 2012 02:34 — forked from banker/Rails MongoMapper Template.rb
A Rails Template for using MongoMapper
# mongo_template.rb
# fork of Ben Scofield's Rails MongoMapper Template (http://gist.github.com/181842)
#
# To use:
# rails project_name -m http://gist.github.com/gists/219223.txt
# remove unneeded defaults
run "rm public/index.html"
run "rm public/images/rails.png"
run "rm public/javascripts/controls.js"
@illnino
illnino / jQuery
Created May 12, 2012 03:17
jQuery loaded
jQuery.fn.jquery
@illnino
illnino / dabblet.css
Created April 28, 2012 06:03 — forked from chriscoyier/dabblet.css
No space between inline-block
body {
font-family: sans-serif;
}
ul {
list-style: none
}
a{
text-decoration: none;
@illnino
illnino / gist:2069513
Created March 18, 2012 07:08 — forked from padolsey/gist:527683
JavaScript: detect ie
// ----------------------------------------------------------
// A short snippet for detecting versions of IE in JavaScript
// without resorting to user-agent sniffing
// ----------------------------------------------------------
// If you're not in IE (or IE version is less than 5) then:
// ie === undefined
// If you're in IE (>=5) then you can determine which version:
// ie === 7; // IE7
// Thus, to detect IE:
// if (ie) {}