Skip to content

Instantly share code, notes, and snippets.

View skopp's full-sized avatar

Rashaad Essop skopp

View GitHub Profile
@skopp
skopp / ruby-1.9-tips.rb
Created September 11, 2012 23:45 — forked from igrigorik/ruby-1.9-tips.rb
Ruby 1.9 features, tips & tricks you may not know about...
def tip(msg); puts; puts msg; puts "-"*100; end
#
# 30 Ruby 1.9 Tips, Tricks & Features:
# http://www.igvita.com/2011/02/03/new-ruby-19-features-tips-tricks/
#
tip "Upgrading to Ruby 1.9 is simple: rvm install 1.9.2 && rvm --default 1.9.2"
tip "Ruby 1.9 supports named captures in regular expressions!"

Sass/Less Comparison

In this document I am using Sass's SCSS syntax. You can choose to use the indented syntax in sass, if you prefer it, it has no functional differences from the SCSS syntax.

For Less, I'm using the JavaScript version because this is what they suggest on the website. The ruby version may be different.

Variables

@skopp
skopp / ajaxify-html5.js
Created September 11, 2012 23:52 — forked from balupton/README.md
Ajaxify a Website with the HTML5 History API using History.js, jQuery and ScrollTo
// https://gist.github.com/854622
(function(window,undefined){
// Prepare our Variables
var
History = window.History,
$ = window.jQuery,
document = window.document;
// Check to see if History.js is enabled for our Browser
@skopp
skopp / index.html
Created September 12, 2012 16:37
Text effect animations
<html>
<body>
<p>fly in, fly out</p>
</body>
</html>
@skopp
skopp / index.html
Created September 12, 2012 16:38
Pure CSS3, no image, no js, no woman, no cry :p —design by Piotr Kwiatkowski http://drbl.in/eXBR
<div class="container">
<!--div class="origin"></div-->
<!-- OUTER SHADOW -->
<div class="de">
<!-- TEXT -->
<div class="den">
@skopp
skopp / index.html
Created September 12, 2012 16:52
More content or navigation can be displayed off-canvas above the core content. Pros - Saves space for core content. - Elegant Cons - JS Dependency - Not necessarily a con, but ensure that off-canvas content is still accessible for users with poor/no JS
<div id="pattern" class="pattern">
<div class="offcanvas-top">
<div class="o-content">
<p>Here is more content. This could be related items, navigation or other content you feel is conducive to this type of treatment.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean quis nisi et dui placerat ornare. Maecenas molestie lacus lobortis libero lacinia sed scelerisque lectus congue. Mauris dignissim nisi a ante laoreet et ullamcorper ligula ullamcorper. In hac habitasse platea dictumst. In nisi odio, tempor in viverra vitae, mollis ac tortor. Sed a rhoncus leo. Maecenas ac dui elit, tristique dapibus nisl. Suspendisse feugiat porta ligula, auctor posuere lorem vulputate et.</p>
</div>
</div>
</div>
<!--End Pattern HTML-->
<div class="container">
@skopp
skopp / dabblet.css
Created September 20, 2012 23:24
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
ER
--------------------------------------------- */
html, body {
height: 100%;
}
@skopp
skopp / uri.js
Created September 22, 2012 11:56 — forked from jlong/uri.js
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"
@skopp
skopp / dabblet.css
Created October 6, 2012 14:15
skuda flexperiment / using flex jquery, fittext and random others.
/**
** skuda flexperiment / using flex jquery, fittext and random others.
**/
body {
background: #0caaff;
color: #f4f1de;
font-size: 100%;
font-family: "proxima-nova-1","proxima-nova-2", 'Arial', sans-serif;
@skopp
skopp / compiled-theme.html
Created October 7, 2012 00:27 — forked from millisami/compiled-theme.html
Fumblr with Tumblr theme file
<!DOCTYPE html>
<!--[if lt IE 7 ]> <html lang="en" class="no-js ie6 lte-ie8"> <![endif]-->
<!--[if IE 7 ]> <html lang="en" class="no-js ie7 lte-ie8"> <![endif]-->
<!--[if IE 8 ]> <html lang="en" class="no-js ie8 lte-ie8"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!--> <html lang="en" class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<title>Nepal on Rails</title>