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
| alias docker-gc='docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -v /etc:/etc spotify/docker-gc' | |
| alias gh='hub browse' # open Github project url from terminal | |
| alias s='"/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" .' | |
| alias sublime='"/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl"' | |
| alias server='python -m SimpleHTTPServer 8000' # quick static file server; use `http.server` in python 3 | |
| alias show-hidden-files='defaults write com.apple.finder AppleShowAllFiles YES; killall Finder /System/Library/CoreServices/Finder.app' | |
| alias hide-hidden-files='defaults write com.apple.finder AppleShowAllFiles NO; killall Finder /System/Library/CoreServices/Finder.app' | |
| alias timestamp='ts "[%Y-%m-%d %H:%M:%.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
| grunt.registerMultiTask('tape', 'Run tap/tape tests from within grunt.', function () { | |
| var done = this.async(); | |
| var faucet = require('faucet'); | |
| var tapParser = require('tap-parser'); | |
| var parser = tapParser(function (results) { | |
| if (results.fail > 0) { | |
| grunt.fail.warn(results.fail + ' test(s) have failed'); | |
| } else { | |
| done(); |
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 Application = { | |
| addInitializer: function(func) { | |
| return new Promise(func); | |
| } | |
| }; | |
| Promise.all([ | |
| Application.addInitializer(require('./initializers/something')), | |
| Application.addInitializer(require('./initializers/something-else')), | |
| Application.addInitializer(require('./initializers/blah')) |
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
| // This will create a readable stream that we can pipe our bundle to Exorcist with | |
| var stream = require('stream'); | |
| var grunt = require('grunt'); | |
| var exorcist = require('exorcist'); | |
| var createSourceMap = function(err, src, next) { | |
| var mapfile = grunt.template.process('<%= folders.output %>/<%= filenames.js %>.map'); | |
| var s = new stream.Readable(); | |
| s._read = function noop() {}; |
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
| require 'cgi' | |
| require 'csv' | |
| require 'open3' | |
| def readfile(file) | |
| data = {} | |
| CSV.foreach(file) do |row| | |
| date = row[0] | |
| text = row[1] |
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
| guard 'rspec', :env => {'RSPEC_ENV' => 'guard'} do | |
| # ... | |
| end |
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
| { | |
| "Statement": [ | |
| { | |
| "Action": [ | |
| "s3:ListAllMyBuckets" | |
| ], | |
| "Effect": "Allow", | |
| "Resource": "arn:aws:s3:::*" | |
| }, | |
| { |
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
| (function (window, devicePixelRatio, $, View, _) { | |
| 'use strict'; | |
| // I don't recommend adding objects on the window object, but it was quick. | |
| window.ImageView = View.extend({ | |
| // Array of images that we will attempt to load. | |
| // Images will be in priority order. | |
| images: 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
| require 'cgi' | |
| require 'digest/md5' | |
| require 'net/https' | |
| require 'uri' | |
| module Jekyll | |
| class GistTag < Liquid::Tag | |
| def initialize(tag_name, text, token) | |
| super | |
| @text = text |
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
| # | |
| # Colors | |
| # | |
| RED="\[\033[0;31m\]" | |
| YELLOW="\[\033[0;33m\]" | |
| GREEN="\[\033[0;32m\]" | |
| NORMAL="\[\033[0m\]" | |
| DARK_PURPLE="\[\033[1;34m\]" | |
| # |