git remote update --prune
git branch -r | awk '{print $1}' | egrep -v -f /dev/fd/0 <(git branch -vv | grep origin) | awk '{print $1}' | xargs git branch -d
This file contains 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 extend(subClass, superClass) { | |
var F = function() {}; | |
F.prototype = superClass.prototype; | |
subClass.prototype = new F(); | |
subClass.prototype.constructor = subClass; | |
subClass.superclass = superClass.prototype; | |
if(superClass.prototype.constructor == Object.prototype.constructor) { | |
superClass.prototype.constructor = superClass; | |
} | |
} |
This file contains 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
/* jQuery Tiny Pub/Sub - v0.7 - 10/27/2011 | |
* http://benalman.com/ | |
* Copyright (c) 2011 "Cowboy" Ben Alman; Licensed MIT, GPL */ | |
(function($) { | |
var o = $({}); | |
$.subscribe = function() { | |
o.on.apply(o, arguments); |
This file contains 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 MyModel = Backbone.Model.extend({ | |
someMethod: function(opts) { | |
var url = this.url() + '/someMethod', | |
// note that these are just $.ajax() options | |
options = { | |
url: url, | |
type: 'POST' | |
}; | |
// add any additional options, e.g. a "success" callback or data |
This file contains 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
<project name="Test" default="test" basedir="."> | |
<target name="test"> | |
<exec executable="phpunit" failonerror="true" /> | |
</target> | |
</project> |
This file contains 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
val customMergeStrategy: String => MergeStrategy = { | |
case x if Assembly.isConfigFile(x) => | |
MergeStrategy.concat | |
case PathList(ps @ _*) if Assembly.isReadme(ps.last) || Assembly.isLicenseFile(ps.last) => | |
MergeStrategy.rename | |
case PathList("META-INF", xs @ _*) => | |
(xs map {_.toLowerCase}) match { | |
case ("manifest.mf" :: Nil) | ("index.list" :: Nil) | ("dependencies" :: Nil) => | |
MergeStrategy.discard | |
case ps @ (x :: xs) if ps.last.endsWith(".sf") || ps.last.endsWith(".dsa") => |
This file contains 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
package co.bench.api.spray | |
import spray.routing.{Directives, Route} | |
import spray.http.HttpHeaders.{`Access-Control-Allow-Credentials`, `Access-Control-Allow-Headers`, `Access-Control-Allow-Methods`, `Access-Control-Allow-Origin`} | |
import spray.http.{StatusCodes, HttpOrigin, SomeOrigins} | |
import spray.http.HttpMethods._ | |
trait CORSSupport extends Directives { | |
private val CORSHeaders = List( |
This file contains 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 | |
# Original was modified to do backup only for one specified volume. | |
set -ue | |
set -o pipefail | |
export PATH=$PATH:/usr/local/bin/:/usr/bin | |
## START SCRIPT |
This file contains 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 | |
_appName=$1 | |
_limit=$2 | |
echo "$(date) checking app:$_appName with limit:$_limit " | |
# get app versions above the limit as a list | |
versions=$(aws elasticbeanstalk describe-application-versions\ | |
--application-name $_appName\ |
https://github.com/j-martin/dotfiles
- iTerm2 v3
- Sublime Text 3
- IntelliJ IDEA
- vim
- Spacemacs (org-mode)
- zsh
- shellcheck
- tmux
OlderNewer