This allows you to receive desktop notifications from grunt running inside of a local vagrant box.
Install grunt-notify and add to dev dependencies
This is done on the guest VM (within the vagrant box).
| #!/usr/bin/env ruby | |
| require 'rubygems' | |
| require 'nokogiri' | |
| require 'open-uri' | |
| require 'timeout' # to catch HTTP timeouts | |
| INPUT_FILENAME = "urls.html" | |
| HTTP_TIMEOUT = 5 # seconds |
| #!/bin/bash | |
| # git-blame-revs | |
| # | |
| # Generate a list of revisions that a file is currently composed of. | |
| # Think of it as a high-level summary of a 'blame'. | |
| # | |
| # NOTE: It is currently hardcoded to work with SVN repos via git-svn. | |
| # | |
| # Author: justin@worksperfectly.net |
| #!/bin/bash | |
| set -e | |
| ### BEGIN mod by JSB 2014-12-03 | |
| # URL encode/decode functions courtesy of https://gist.github.com/cdown/1163649 | |
| # | |
| urlencode() { | |
| # urlencode <string> | |
| local length="${#1}" |
This allows you to receive desktop notifications from grunt running inside of a local vagrant box.
grunt-notify and add to dev dependenciesThis is done on the guest VM (within the vagrant box).
vagrant_local_status is a Bash function that returns the name and status the relevant Vagrant machine for the current directory.
The primary use case is in your PS1 environment variable, so the status of your current project's Vagrant machine is always visible at every shell prompt. Here's an example of my Bash prompt in a test project dir:
[01:29 PM]-[1506]-[justin@justin]-[~/projects/test]-[dev u= bb/dev @d59dc2d]-[vagrant:poweroff]
$
(vagrant:poweroff is the output of vagrant_local_status)
| #!/usr/bin/env bash | |
| if [ $# -ne 1 ] ; then | |
| echo "Usage: $0 target_dir " >&2 | |
| exit 1 | |
| fi | |
| TARGET_DIR=$1 | |
| while IFS= read -r f || [[ -n "$f" ]]; do |
(updates as they come)
(updates as they come)
| #!/usr/bin/env bash | |
| # findgitrepos | |
| # | |
| # For a given path, find all child dirs that appear to be local Git repos and | |
| # print some useful info (user config, list of remotes, hooks). Allows you to | |
| # review your Git config across many projects. Called without arguments, it | |
| # looks in $HOME. | |
| # | |
| # Author: justin@worksperfectly.net |