This is now an actual repo:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var SITE = SITE || {}; | |
SITE.fileInputs = function() { | |
var $this = $(this), | |
$val = $this.val(), | |
valArray = $val.split('\\'), | |
newVal = valArray[valArray.length-1], | |
$button = $this.siblings('.button'), | |
$fakeFile = $this.siblings('.file-holder'); | |
if(newVal !== '') { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# css/js minification/compression makefile | |
# | |
# | |
# JS_TARGETS -- js files to minify/gzip | |
# CSS_TARGETS -- css files to minify/gzip | |
# CLEANUP -- additional files to delete during "make clean" | |
# |
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>gist bl.ocks</title> | |
<link rel="stylesheet" type="text/css" href="style.css" /> | |
<script src="http://jquery.com/src/jquery-latest.js"></script> | |
<script src="https://github.com/janl/mustache.js/raw/master/mustache.js"></script> | |
<script> | |
var gist = {}, id = 582915, source; | |
$(function(){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function cleanstring($input = '', $seperator = '-') { | |
$pattern = '\x00-\x1f\x26\x3c\x7f-\x9f\x{d800}-\x{dfff}\x{fffe}-\x{ffff}'; | |
$pattern .= preg_quote(' \'"/?!<>.$/:;?@=+&%\#', '@'); | |
$return = preg_replace('@[' . $pattern . ']@Su', $seperator, $input); | |
return trim(mb_strtolower(preg_replace('/' . $seperator. '+/', $seperator, $return), 'UTF-8'), $seperator); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
See JSFiddle: | |
http://jsfiddle.net/cowboy/6asBw/ | |
--> | |
<!-- unminified --> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var dickbar = function() { | |
var opts = { | |
"symbol" : "✪", | |
"font-size": "64px", | |
"color": "#eee", | |
"time": 3000 | |
}; | |
if(window.dickbar && window.dickbarOptions) { | |
var d = window.dickbarOptions; | |
if(d["font-size"]) opts["font-size"] = d["font-size"]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
var cache = {}; | |
this.tmpl2 = function tmpl(str, data) { | |
// Figure out if we're getting a template, or if we need to | |
// load the template - and be sure to cache the result. | |
var fn = !/\W/.test(str) ? | |
cache[str] = cache[str] || | |
tmpl(document.getElementById(str).innerHTML) : |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
this.tmpl3 = function tmpl(str, data) { | |
var value = "var out = ''; out+=" + "'" + | |
str.replace(/[\r\t\n]/g, " ") | |
.replace(/'(?=[^%]*%>)/g,"\t") | |
.split("'").join("\\'") | |
.split("\t").join("'") | |
.replace(/<%=(.+?)%>/g, "'; out += $1; out += '") | |
.split("<%").join("';") |