View gist:4e899670027062cefa2a
1 2 3 4 5 6 7 8 9
# BEGIN WordPress
RewriteRule ^index\.php$ - [L]
# uploaded files
RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule . index.php [L]
# END WordPress
View pre-commit
1 2 3 4 5 6 7 8 9 10
#!/bin/sh
# stash unstaged changes, run build task, stage release updates and restore stashed files
 
NAME=$(git branch | grep '*' | sed 's/* //')
 
# don't run on rebase
if [ $NAME != '(no branch)' ]
then
git stash -q --keep-index
grunt
View post-merge
1 2 3 4 5
#!/bin/sh
# run npm and bower after every pull
 
npm install
grunt exec:components
View .vimrc
1 2
let whitespace_blacklist = ['markdown']
autocmd BufWritePre * if index(whitespace_blacklist, &ft) < 0 | :%s/\s\+$//e
View Rakefile
1 2 3 4 5 6 7 8 9 10
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 =~ /\//
View Gruntfile.js
1 2 3 4 5 6 7 8 9 10
module.exports = function(grunt) {
 
grunt.initConfig({
 
jshint: {
options: {
jshintrc: ".jshintrc"
},
 
files: ["Gruntfile.js", "app/**/*.js", "test/qunit/tests/**/*.js"]
View .gitconfig
1 2 3 4
# usage: git sed 's/old/new/g'
 
[alias]
sed = !git grep --full-name -l -z '.' | xargs -0 gsed -i -e
View gist:4061527
1 2 3
$('.tableClose').click(function (ev) {
$(this).parents('.shopPlansTable').find('.shopPlansSectionHead').toggleClass('visible');
});​
View chain.js
1 2 3 4 5 6 7
this.$el.find('article')
.addClass('stage-center')
.prevAll('article')
.addClass('stage-left')
.end()
.nextAll('article')
.addClass('stage-right');
View qunit.js
1 2 3 4 5 6 7 8 9
var Windows = {
method1: function () { }
};
 
(function ($) {
module('windows-api', {
setup: function () {
sinon.spy(Windows, 'method1');
},
Something went wrong with that request. Please try again.