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
#!/usr/bin/env ruby | |
# | |
# Shotgun approach (read: slow and dirty hack) to help find unused helpers in a Rails application | |
# | |
start = Time.now | |
# Build an array of filename globs to process. | |
# Only search file types that might use or define a helper. | |
extensions = %w[rb js haml erb jbuilder].map { |ext| "app/**/**/*.#{ext}" } |
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
.vagrant |
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
// Array.forEach potentially faster than loop | |
// http://jsperf.com/testing-foreach-vs-for-loop | |
var links = document.querySelectorAll('a[href*="//' + window.location.host +'"]'); | |
[].slice.call(links).forEach(function(a) { | |
a.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
=respond-to($device) | |
@if $device == handheld | |
@media only screen and (min-width : 320px) | |
@content | |
@if $device == handheld-landscape | |
@media only screen and (min-width : 321px) | |
@content |
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.thePlugin = function(options) { | |
// build main options before element iteration: | |
var opts = $.extend({}, $.fn.thePlugin.defaults, options); | |
var $this = $(this); | |
var thePlugin = { | |
index: 0, |