This file contains 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( $ ){ | |
$.fn.shrunkFit = function( options ) { | |
return this.each(function() { | |
var settings = $.extend({ | |
'increment' : 0.05, | |
'throttle' : 25 | |
}, options); |
This file contains 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.no-js | |
head | |
meta charset="utf-8" | |
meta content="IE=edge" http-equiv="X-UA-Compatible" | |
title Title | |
meta content="width=device-width,initial-scale=1" name="viewport" | |
This file contains 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 http = require('http') | |
, sys = require('sys') | |
, server | |
; | |
server = http.createServer(function(req, res) { | |
var echo = {} | |
; | |
echo.headers = JSON.stringify(req.headers, true, 2); |
This file contains 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
// | |
// Tables | |
// -------------------------------------------------- | |
// Bootstrap tables tweaked to work standalone | |
// Variables | |
$body-bg: $white; | |
$table-bg: $white; | |
$line-height-computed: 1rem; |
This file contains 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 () { | |
$('a[href^="http://"], a[href^="https://"]') | |
.not('a[href*="' + window.location.hostname + '"]') | |
.attr('target','_blank') | |
; | |
}; |
This file contains 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
<!-- At this point our environmental jQuery should have already loaded, we'll | |
assign it to a separate variable on the window and delete the dollar sign --> | |
<script> | |
window.jQuery142 = window.jQuery; | |
delete window.$; | |
</script> | |
<!-- Next, we'll load our next version of jQuery --> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> |
This file contains 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
// Jekyll Pygments syntax highlighter styles | |
// Colors | |
$default: #FFFFFF | |
$background: #010101 | |
$comment: #586E75 | |
$error: #586E75 | |
$generic: #93A1A1 | |
$keyword: #859900 | |
$literal: #93A1A1 |
This file contains 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
$.fn.setNow = function (onlyBlank) { | |
var now = new Date($.now()); | |
var year = now.getFullYear(); | |
var month = (now.getMonth() + 1).toString().length === 1 ? '0' + (now.getMonth() + 1).toString() : now.getMonth() + 1; | |
var date = now.getDate().toString().length === 1 ? '0' + (now.getDate()).toString() : now.getDate(); | |
var hours = now.getHours().toString().length === 1 ? '0' + now.getHours().toString() : now.getHours(); | |
var minutes = now.getMinutes().toString().length === 1 ? '0' + now.getMinutes().toString() : now.getMinutes(); | |
var seconds = now.getSeconds().toString().length === 1 ? '0' + now.getSeconds().toString() : now.getSeconds(); |
This file contains 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
module.exports = function(grunt) { | |
'use strict'; | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json') | |
, coffeelint: { | |
app: ['./assets/javascripts/**/*.coffee'] | |
} |
This file contains 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
module ApplicationHelper | |
# get the name of the current layout in views | |
# http://stackoverflow.com/a/9438314/2535178 | |
def current_layout | |
layout = controller.send(:_layout) | |
if layout.instance_of? String | |
layout | |
else | |
File.basename(layout.identifier).split('.').first | |
end |