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-each-subdir | |
# =============== | |
# | |
# ## SYNOPSIS | |
# | |
# $ for-each-subdir [FLAGS] | |
# | |
# ## DESCRIPTION |
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 | |
# | |
# git-ls-github-repos(1) - list a user's GitHub repositories | |
# ========================================================== | |
# | |
# ## SYNOPSIS | |
# | |
# `git-ls-github-repos` <user> | |
# | |
# ## REQUIREMENTS |
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 | |
# | |
# You can use `git branch --edit-description` to write a description | |
# for a branch, but Git provides no simple command to display that | |
# description. The "easiest" way to see it is via `git config --get | |
# branch.BRANCH_NAME.description`. | |
# | |
# This script automates that process and is meant to be used as | |
# a Git alias to provide a shorter command for showing the | |
# description of the current branch. |
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 build-php --description="Build PHP from source in the current directory" | |
sh configure --prefix=/opt/php \ | |
--with-openssl \ | |
--enable-soap \ | |
--enable-sockets \ | |
--enable-intl \ | |
--enable-ftp \ | |
--enable-bcmath \ | |
--enable-calendar \ | |
--enable-zip \ |
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 | |
# | |
# This simple shell script is a Git hook that will automatically | |
# update all submodules any time you perform a merge or pull. | |
# This can be useful because you can do things like... | |
# | |
# $ git checkout master && git pull | |
# | |
# ...without having to remember to potentially update any | |
# submodules in the repository. |
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 function runs a command while copying standard error to a | |
# temporary file. If the command has a non-zero exit code then the | |
# function copies the last line of standard error to the clipboard. | |
# This makes it easy to switch over to my browser and do a search for | |
# that error message. | |
function run-cp-stderr --description="Run a command copying the tail of STDERR to the clipboard" | |
set --local ERROR_FILE (mktemp --suffix=".fish-command.log" --tmpdir="/tmp") | |
if not eval $argv ^$ERROR_FILE | |
tail --lines=1 "$ERROR_FILE" | xclip -in -selection "clipboard" |
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 | |
# | |
# git pick-branch | |
# | |
# This command checks out a branch, using the commnad `pick` to | |
# provide fuzzy-selection of the branch names. | |
# | |
# https://github.com/thoughtbot/pick | |
# | |
###################################################################### |
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 | |
# | |
# Running this script in a directory with a Makefile will print the | |
# targets in that Makefile, e.g. | |
# | |
# $ list-makefile-targets | |
# all | |
# clean | |
# docs | |
# install |