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> | |
<body> | |
<script> | |
// var sRandomLine = "####################################################################################"; | |
// var sSolidRandomLine = "%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F%7F"; | |
// var sEmptyLine = "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20"; | |
// var asRandom = [ | |
// sRandomLine, sRandomLine, sRandomLine, sRandomLine, sRandomLine, | |
// sRandomLine, sRandomLine, sRandomLine, sRandomLine, sRandomLine, |
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
# ALIASES FTW | |
alias ll='ls -Fla' | |
alias b='bundle' | |
alias be='bundle exec' | |
alias bed='bundle exec deploy' | |
alias bedable='bundle exec deployable' | |
alias silent-deploy='cap staging2 deploy:upload FILES=app/path/to/file/you/keep/changing.rb' | |
alias bepr='bundle exec pull-request' | |
alias benb='bundle exec new-branch' | |
alias g='git' |
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
// For each image of the feed | |
$j('.newsPreviewThumb').each(function() { | |
var src = $j(this).attr('src'); | |
// Find and replace the _thumb. so we have a large image to work with | |
$j(this).attr('src', src.replace(/_thumb\.(png|jpg|jpeg|gif)$/, '.$1')); | |
}); |
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
@mixin use-rems($property, $size1, $size2:null, $size3:null, $size4:null) { | |
@if ($size4) { | |
#{$property}: $size1+px $size2+px $size3+px $size4+px; | |
#{$property}: ($size1/10)+rem ($size2/10)+rem ($size3/10)+rem ($size4/10)+rem; | |
} @else if ($size3) { | |
#{$property}: $size1+px $size2+px $size3+px; | |
#{$property}: ($size1/10)+rem ($size2/10)+rem ($size3/10)+rem; | |
} @else if ($size2) { | |
#{$property}: $size1+px $size2+px; | |
#{$property}: ($size1/10)+rem ($size2/10)+rem; |
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 Handlebars = require('handlebars') | |
// Oneof block helper. Works like an `if` block helper but allows you to evalutate context against a set. | |
// You can also use this as a part of a "if else" statement. | |
// The `key` argument is optional, if not set the key is the context. | |
// | |
// {{#oneof foo set='bar, baz' key=foo}}{{/oneof}} | |
// | |
// {{#oneof foo set='bar, baz' key=foo}}<div/>{{else}}<div/>{{/oneof}} |
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
// Build the select dropdown | |
// This goes in the page where you would like the search to render. | |
<div id="searchHeader"> | |
<ul> | |
<li> | |
<label for="filterByType">Filter By Type:</label> | |
<select id="filterByType"> | |
</select> | |
</li> | |
<li style="display: none;"> |
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
[user] | |
name = Kevin Marx | |
email = [email protected] | |
[alias] | |
unstage = reset HEAD | |
aa = add . | |
AA = add -A | |
cm = commit -m | |
c = commit | |
b = branch |
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
Date.prototype.stdTimeOffset = function() { | |
var jan = new Date(this.getFullYear(), 0, 1) // july and jan are currently in/out of DST in every timezone. | |
var jul = new Date(this.getFullYear(), 6, 1) | |
return Math.max(jan.getTimezoneOffset(), jul.getTimezoneOffset()) | |
} | |
Date.prototype.isDST = function() { | |
return this.getTimezoneOffset() < this.stdTimeOffset() | |
} |
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(array, chunk) { | |
return [].concat.apply([], | |
array.map(function(elem, i) { | |
return i % chunk ? [] : [array.slice(i, i + chunk)] | |
}) | |
) | |
} |
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 Handlebars = require('handlebars') | |
var _ = require('underscore') | |
/* | |
* Adds support for passing items into a context as variables | |
* | |
* USAGE: {{#topic this foo=bar baz=qux}} | |
* USAGE: {{#topic foo=bar}} no need for a context, this will create a new context object | |
*/ |
OlderNewer