This file contains hidden or 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
| " Get coffeelint errors in the vim quickfix menu | |
| " requires coffeelint to be installed and in the path | |
| " http://www.coffeelint.org/ | |
| " lint the current file | |
| function! CoffeeLintFile() | |
| let current = fnamemodify(expand("%"), ':p') | |
| call CoffeeLintAnalyze(current) | |
| endfunction |
This file contains hidden or 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
| #! /bin/bash | |
| # First you need to have the "pgbackups" addon in your heroku app, for example: | |
| # $ heroku addons:add pgbackups:auto-week | |
| # your database name here | |
| DB_NAME='foobar_development' | |
| # grab the data directory for postgres from the running process | |
| DATA_DIR=`ps ax |grep [/]post | sed "s/^.*\-D //" | sed "s/ .*$//"` |
This file contains hidden or 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
| #! /bin/sh | |
| # For octopress/heroku: generate site, deploy, and tag as "deploy-yyyy-mm-dd" | |
| # This allows you to keep your public/ assets out of git, | |
| # and only add them just before deploying | |
| BRANCH=`git symbolic-ref -q HEAD | sed 's/refs\/heads\///'` | |
| SHA=`git rev-parse --short HEAD` |
This file contains hidden or 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
| git log --shortstat -C | awk '/Author:/ {author = $NF; if (!(author in lines)) {authors[length(authors)] = author; lines[author] = 0; commits[author] = 0} } /files changed/ {lines[author] += ($4 + $6); commits[author]++} END {for (i =0; i < length(authors); i++) {printf "%s lines in %s commits - %s\n", lines[authors[i]],commits[authors[i]], authors[i]}}' |sort -n -r |
This file contains hidden or 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
| I received an email from macys.com to an email address that I never use (an email address provided by my ISP), | |
| regarding my macys.com account. After changing the passwords on both the email account and the macys.com account, | |
| I attempted to find a way to alert their credit card department of at worst, potential fraud, and at best, an | |
| incorrect email address in one of their customer records. Unable to submit a "contact us" because I didn't have | |
| the account number (which is masked on the site), and not wanting to sit on hold on the telephone, I figured, | |
| what the hell, I'll give the chat support a go... | |
| Chat Transcript | |
| Please wait while we find an agent to assist you... |
This file contains hidden or 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 Differ = function(thing){ | |
| this.thing = thing; | |
| }; | |
| Differ.prototype.cacheVars = function(){ | |
| this.cache = {}; | |
| for(var prop in this.thing){ | |
| this.cache[prop] = this.thing[prop]; | |
| } | |
| }; |
This file contains hidden or 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
| $ rake spec | |
| Build ./build/iPhoneSimulator-5.1-Development | |
| Simulate ./build/iPhoneSimulator-5.1-Development/Hello_spec.app | |
| Application 'Hello' | |
| - has one window [FAILED] | |
| Bacon::Error: 0.==(1) failed | |
| spec.rb:553:in `satisfy:': Application 'Hello' - has one window | |
| spec.rb:567:in `method_missing:' | |
| spec.rb:183:in `block in run_spec_block' |
This file contains hidden or 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 | |
| current_filename = '' | |
| allowed_indent = 0 | |
| def indent_of line | |
| line.index /[a-z]/ | |
| end | |
| ARGF.lines do |line| |
This file contains hidden or 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
| DIR=$( cd "$( dirname "$0" )" && pwd ) | |
| pushd $DIR | |
| for d in `ls -d */` | |
| do | |
| echo "$d" | |
| pushd "$d" > /dev/null | |
| git remote update --prune | |
| popd > /dev/null | |
| done | |
| popd > /dev/null |
This file contains hidden or 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
| class Foo | |
| 'bar:baz' : => | |
| new Foo |