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
jlist () { | |
GREP_COMMAND="jim instance list " | |
for arg in $@; do | |
GREP_COMMAND=${GREP_COMMAND}"| grep $arg " | |
done; | |
echo $GREP_COMMAND | |
eval "$GREP_COMMAND" | |
} |
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
git branch | grep -v master | 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
# Credit where credit is due to Nathaniel Landau for the sweet little bash hacks (http://natelandau.com/bash-scripting-utilities/) | |
bold=$(tput bold) | |
underline=$(tput sgr 0 1) | |
reset=$(tput sgr0) | |
purple=$(tput setaf 5) | |
red=$(tput setaf 1) | |
green=$(tput setaf 2) | |
tan=$(tput setaf 3) |
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
\[([ \w].*)\]\(([\w:/.-]*)\) |
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 com.radams.play; | |
import org.junit.Test; | |
/** | |
* @author Rich Adams | |
*/ | |
public class WaterPercolation | |
{ | |
public boolean percolate(int[][] grid) |
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
CREATE OR REPLACE FUNCTION posix_hours(val TIMESTAMPTZ) RETURNS INTEGER AS $$ | |
BEGIN | |
RETURN (EXTRACT(EPOCH FROM (val - TIMESTAMPTZ '1970-01-01 00:00:00+00')) / | |
EXTRACT(EPOCH FROM INTERVAL '1 hour'))::INT; | |
END; | |
$$ LANGUAGE plpgsql; | |
CREATE OR REPLACE FUNCTION posix_minutes(val TIMESTAMPTZ) RETURNS INTEGER AS $$ | |
BEGIN | |
RETURN (EXTRACT(EPOCH FROM (val - TIMESTAMPTZ '1970-01-01 00:00:00+00')) / |
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
rebuildall(){ | |
jim instance list | grep "$1" | cut -c 1-10 | xargs -I '{}' jim instance rebuild '{}'; | |
} |
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
workspaceclone () { jazz cog workspace switch -p ./$(basename $1) $1 ; } |
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
# --------------------------------------------------------------------------- | |
# | |
# Description: This file holds all my BASH configurations and aliases | |
# | |
# Sections: | |
# 1. Environment Configuration | |
# 2. Make Terminal Better (remapping defaults and adding functionality) | |
# 3. File and Folder Management | |
# 4. Searching | |
# 5. Process Management |