Skip to content

Instantly share code, notes, and snippets.

@dva
dva / mate_reset.sh
Created September 18, 2019 11:12
TextMate Reverting To Defaults
#!/usr/bin/env bash -ex
# https://github.com/textmate/textmate/wiki/Reverting-To-Defaults
rm -rf ~/Library/Application Support/TextMate
rm -rf ~/Library/Caches/com.macromates.TextMate/BundlesIndex.binary
rm -rf ~/Library/Preferences/com.macromates.TextMate.plist
# uncomment to remove pre-defined properties
# rm -rf ~/.tm_properties
@dva
dva / brew.log
Created August 20, 2015 14:57
brew install gitup
brew install gitup ⏎
==> Downloading https://homebrew.bintray.com/bottles/gitup-0.3.yosemite.bottle.tar.gz
######################################################################## 100.0%
==> Pouring gitup-0.3.yosemite.bottle.tar.gz
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink bin/gitup
Target /usr/local/bin/gitup
already exists. You may want to remove it:
rm '/usr/local/bin/gitup'
2015-08-17 12:49:19 +0300
make
release-client
go get github.com/jteeuwen/go-bindata
GOOS="" GOARCH="" go install github.com/jteeuwen/go-bindata/go-bindata
bin/go-bindata -nomemcopy -pkg=assets -tags=release \
-debug=false \
-o=src/ngrok/client/assets/assets_release.go \
// Permutation
function permute(input) {
var permArr = [],
usedChars = [];
function main(input) {
var i, ch;
for (i = 0; i < input.length; i++) {
ch = input.splice(i, 1)[0];
usedChars.push(ch);
@dva
dva / git-flow-cleanup
Last active January 3, 2016 11:09
Git Flow: Remove feature branches which are merged.
#!/bin/sh
#
# Remove feature branches which are merged.
#
OLD_BRANCH=`git branch | awk '/\*/{ print $2 }'`
git checkout develop
git branch --merged | awk '/feature/{ print $1 }' | xargs git branch -d {}
@dva
dva / skype.sh
Last active December 25, 2015 21:09
OS X multi Skype
#!/bin/bash
rm -rf ~/Library/Application\ Support/Skype/Skype.pid
sleep 1
open -n "/Applications/Skype.app"