Skip to content

Instantly share code, notes, and snippets.

/**
* redirect javascript bookmarklet
*/
// javascript:location.href='http://example.com/?uri='+encodeURIComponent(location.href)
/**
* bookmarklet loaded on site
*/
(function(){
def sass_literals(file_path)
engine = Sass::Engine.for_file(file_path, {})
environment = Sass::Environment.new
keyvals = []
engine.to_tree.children.each do |node|
next unless node.kind_of? Sass::Tree::VariableNode
if node.expr.kind_of? Sass::Script::Tree::Literal
value = node.expr.perform(environment)
@jonjaques
jonjaques / app.html
Created May 13, 2012 03:02
Less version for reusability and (slightly) more semantic HTML. Full-height 2-column fixed-width plus fluid with header.
<!doctype html>
<html lang="en">
<head>
<title>Test</title>
<link rel="stylesheet/less" type="text/css" href="app.less">
<script src="http://cdnjs.cloudflare.com/ajax/libs/less.js/1.3.0/less-1.3.0.min.js" type="text/javascript"></script>
</head>
<body>
<header id="appHeader">Header here</header>