Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| @ngInject('bus', '$ionicModal') | |
| class Adder { | |
| constructor(num) { | |
| this.num = num | |
| } | |
| // order matters | |
| // if you @swallow first, then @log won't log caught exceptions | |
| @log | |
| @swallow |
| #!/usr/bin/env ruby | |
| # Checks for things that I often commit accidentally and bails out of the | |
| # commit. To skip this pre-commit hook use `git commit --no-verify`. | |
| checks = [ | |
| /\bddescribe\b/, | |
| /\biit\b/, | |
| /\bxit\b/, | |
| /binding.pry/, |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| #!/usr/bin/env ruby | |
| spec_hits = [] | |
| checks = { | |
| '_spec\.rb$' => ['focus:[:space:]*true'], | |
| '\.rb$' => ['binding\.pry', 'debugger'] | |
| } | |
| # Find the names of all the filenames that have been (A)dded (C)opied or (M)odified | |
| filenames = `git diff --cached --name-only --diff-filter=ACM`.split("\n") |
| #!/bin/bash | |
| case "$1" in | |
| *_EDITMSG|*MERGE_MSG|*_TAGMSG ) | |
| /usr/local/bin/vim "$1" | |
| ;; | |
| *.md ) | |
| /usr/local/bin/mmdc "$1" | |
| ;; | |
| *.txt ) |
| html(ng-app="persona") | |
| body(ng-controller="PersonaCtrl") | |
| div(ng-hide="verified") | |
| button(ng-click="verify()") Verify Identity | |
| div(ng-show="verified") | |
| | Hello {{email}} | |
| br | |
| button(ng-click="logout()") Log Out | |
| div(ng-show="error") | |
| strong {{error}} |
| autocmd User Rails/app/assets/javascripts/*/*.js | |
| \ let b:rails_alternate = substitute( | |
| \ substitute(rails#buffer().path(), 'app/assets/', 'spec/', ''), | |
| \ '.js', '_spec.js', '') | |
| autocmd User Rails/spec/javascripts/*/*_spec.js | |
| \ let b:rails_alternate = substitute( | |
| \ substitute(rails#buffer().path(), 'spec/', 'app/assets/', ''), | |
| \ '_spec.js', '.js', '') |
| JSWEEKLY BINGO | |
| +-------------------------------+-------------------------------+-------------------------------+ | |
| | An atricle from someone who | | | | |
| | just figured out | Baby's first functional | How to do this one very | | |
| | prototype-based OO and thinks | programming | specific thing in Node.js | | |
| | everyone else needs telling | | | | |
| +-------------------------------+-------------------------------+-------------------------------+ | |
| | | | | | |
| | A new jQuery release | A job in San Francisco | An introduction to an MVC | | |
| | | | framework | |
| (set -e && ls content/*.markdown | while read p; do DATE=$(echo $p | cut -d '/' -f 2 | cut -d '-' -f 1-3); TARGET=$(echo $p | sed 's/-/\//' | sed 's/-/\//' | sed -E 's/[0-9]+-//' | perl -pe 's/^(.*\/.*\/.*\/)(.)(.*)$/\1\u\2\3/' | sed -E 's/-|_/ /g'); echo $TARGET; mkdir -p $(dirname $TARGET); echo "<\!-- $DATE -->" > $TARGET; cat $p >> $TARGET; rm $p; done) |
| // Copyright 2012 Square, Inc. | |
| package com.squareup.test; | |
| import android.app.Activity; | |
| import android.content.Context; | |
| import android.view.LayoutInflater; | |
| import android.view.View; | |
| import com.actionbarsherlock.ActionBarSherlock; | |
| import com.actionbarsherlock.app.ActionBar; | |
| import com.actionbarsherlock.internal.ActionBarSherlockCompat; |