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
State.create([ | |
{ :name => 'Alabama', :abbr => 'AL' }, | |
{ :name => 'Alaska', :abbr => 'AK' }, | |
{ :name => 'Arizona', :abbr => 'AZ' }, | |
{ :name => 'Arkansas', :abbr => 'AR' }, | |
{ :name => 'California', :abbr => 'CA' }, | |
{ :name => 'Colorado', :abbr => 'CO' }, | |
{ :name => 'Connecticut', :abbr => 'CT' }, | |
{ :name => 'Delaware', :abbr => 'DE' }, | |
{ :name => 'Florida', :abbr => 'FL' }, |
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 ($) { | |
$(function () { | |
$('a[href^="https?:"]:not(a[href^="https?://' + document.location.hostname + '"])').click(function () { | |
try { _gat._getTrackerByName()._trackEvent('Outbound Links', $(this).attr('href')); } catch (e) {} | |
}); | |
}); | |
}) (jQuery); |
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 Windows = { | |
method1: function () { } | |
}; | |
(function ($) { | |
module('windows-api', { | |
setup: function () { | |
sinon.spy(Windows, 'method1'); | |
}, |
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
this.$el.find('article') | |
.addClass('stage-center') | |
.prevAll('article') | |
.addClass('stage-left') | |
.end() | |
.nextAll('article') | |
.addClass('stage-right'); |
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
$('.tableClose').click(function (ev) { | |
$(this).parents('.shopPlansTable').find('.shopPlansSectionHead').toggleClass('visible'); | |
}); |
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
# usage: git sed 's/old/new/g' | |
[alias] | |
sed = !git grep --full-name -l -z '.' | xargs -0 gsed -i -e |
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) { | |
grunt.initConfig({ | |
jshint: { | |
options: { | |
jshintrc: ".jshintrc" | |
}, | |
files: ["Gruntfile.js", "app/**/*.js", "test/qunit/tests/**/*.js"] |
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
require 'rake' | |
require 'erb' | |
namespace :setup do | |
desc "links dotfiles into home directory" | |
task :dotfiles do | |
replace_all = false | |
files = Dir['*'] - %w[Rakefile README.md oh-my-zsh resources packages] | |
files.each do |file| | |
system %Q{mkdir -p "$HOME/.#{File.dirname{file}}"} if file =~ /\// |
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
let whitespace_blacklist = ['markdown'] | |
autocmd BufWritePre * if index(whitespace_blacklist, &ft) < 0 | :%s/\s\+$//e |
OlderNewer