Skip to content

Instantly share code, notes, and snippets.

View makenosound's full-sized avatar

Max Wheeler makenosound

View GitHub Profile
@juliocesar
juliocesar / selection.js
Created May 23, 2011 06:11
Get the current selection in JS
function selection() {
return window.getSelection ? window.getSelection().toString() :
document.getSelection ? document.getSelection().toString() :
document.selection ? document.selection.createRange().text :
false;
}
@plasticine
plasticine / SCSS Sprite based nav.scss
Created May 9, 2011 01:43
Generates all the required classes, hover states and image offsets for sprite-based navigation.
@function sprite-ify($items, $height, $img, $offset:0){
display:block;
height:$height;
text-indent:-9999px;
background-color:transparent;
background-image:url($img);
@for $index from 1 through length($items) {
$item: nth($items, $index);
@if $index > 1 { $offset: $offset - nth(nth($items, $index - 1), 2); }
&.#{nth($item, 1)} {
@bzerangue
bzerangue / master.xsl
Created November 15, 2010 21:36
HTML5 Boilerplate XSLT Master Stylesheet, see html5boilerplate.com
<?xml version="1.0" encoding="UTF-8" ?>
<!--
HTML5 Boilerplate XSLT Master Stylesheet (based on Paul Irish's HTML5 Boilerplate index.html file)
Created by Brian Zerangue on 2010-11-15.
Copyright (c) 2010 Paul Irish (Everything but the XSLT), Brian Zerangue (XSLT).
HTML5 Boilerplate, http://html5boilerplate.com
-->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">