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
# http://junegunn.kr/2015/03/browsing-git-commits-with-fzf/ | |
# https://gist.github.com/junegunn/f4fca918e937e6bf5bad | |
# fshow - git commit browser (enter for show, ctrl-d for diff, ` toggles sort) | |
fzf-git-show() { | |
local out shas sha q k | |
if [[ -d .git ]] || git rev-parse --git-dir > /dev/null 2>&1; then | |
while out=$( | |
git log --graph --color=always \ | |
--format="%C(auto)%h%d %s %C(black)%C(bold)%cr" "$@" | |
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
#!/usr/bin/env bash | |
VBM="$(command -v VBoxManage)" | |
[[ -z "$VBM" ]] && echo "VBoxManage not found!" && exit | |
PROMPT="[Target?<space>Action? or 'q' to quit] " | |
while [[ "$target" != "q" ]]; do | |
VMS_ALL="$($VBM list vms | sort)" | |
VMS_ALL_COUNT=$([[ ! -z "$VMS_ALL" ]] && echo "$VMS_ALL" | wc -l || echo 0) |
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
# Usage: vagrant up windowsVersion-IEversion | |
# | |
# Eg. vagrant up win10-edge | |
# | |
# Based off of: # https://gist.github.com/anthonysterling/7cb85670b36821122a4a | |
boxes = { | |
# http://www.vagrantbox.es/ | |
"xp-6" => "http://aka.ms/ie6.xp.vagrant", | |
"xp-8" => "http://aka.ms/ie8.xp.vagrant", | |
"vista-7" => "http://aka.ms/ie7.vista.vagrant", |
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
fzf-git-ls-files() { | |
if [[ -f '.git/config' ]]; then | |
LBUFFER="$(git ls-files | fzf +s +m -n2..,..)" | |
else | |
echo "Not a git repo\n" | |
fi | |
zle redisplay | |
} |
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
# https://gist.github.com/jeebak/e13c209da18ef5981792 | |
# Derived from fzf-history-widget() that's provided by: | |
# | |
# https://github.com/junegunn/fzf | |
fzf-history-search-backward() { | |
local buffer="$BUFFER" | |
buffer="${buffer#"${buffer%%[![:space:]]*}"}" | |
buffer="${buffer%"${buffer##*[![:space:]]}"}" | |
# http://unix.stackexchange.com/a/11941 |
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 | |
# | |
# https://gist.github.com/jeebak/b864027c7b0338832e76 | |
# | |
# Wrapper for pb{copy,paste}, as symlinks to this script, that's be in your | |
# $PATH. i.e., | |
# ln -s pasteboard.bash pbcopy | |
# ln -s pasteboard.bash pbpaste | |
# The purpose of this script is to provide the familiar pb{copy,paste} commands | |
# on a Mac, and in Linux, either in X (where $DISPLAY'd be set) or in a |
NewerOlder