Skip to content
View routes.application.js
import Ember from 'ember';
export default Ember.Route.extend({
model: function() {
return Ember.A([
{ title: 'hello' },
{ title: 'world' }
]);
}
});
View gist:4e899670027062cefa2a
# 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
#!/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
#!/bin/sh
# run npm and bower after every pull
npm install
grunt exec:components
View .vimrc
let whitespace_blacklist = ['markdown']
autocmd BufWritePre * if index(whitespace_blacklist, &ft) < 0 | :%s/\s\+$//e
View Rakefile
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
module.exports = function(grunt) {
grunt.initConfig({
jshint: {
options: {
jshintrc: ".jshintrc"
},
files: ["Gruntfile.js", "app/**/*.js", "test/qunit/tests/**/*.js"]
View .gitconfig
# usage: git sed 's/old/new/g'
[alias]
sed = !git grep --full-name -l -z '.' | xargs -0 gsed -i -e
View gist:4061527
$('.tableClose').click(function (ev) {
$(this).parents('.shopPlansTable').find('.shopPlansSectionHead').toggleClass('visible');
});​
View chain.js
this.$el.find('article')
.addClass('stage-center')
.prevAll('article')
.addClass('stage-left')
.end()
.nextAll('article')
.addClass('stage-right');
Something went wrong with that request. Please try again.