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 ruby | |
require "open3" # for reading stderr | |
# A dirt-simple script to merge a pull request from someone on github. | |
# Andre Lewis, 2009 | |
# | |
# Assumptions: | |
# 1. you're currently working on master | |
# 2. you've already reviewed the pull request and have decided to include it. |
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
public static void setSwingFontDefault(javax.swing.plaf.FontUIResource newFont) { | |
java.util.Enumeration<Object> uiManagerKeys = UIManager.getDefaults().keys(); | |
while (uiManagerKeys.hasMoreElements()) { | |
Object key = uiManagerKeys.nextElement(); | |
Object value = UIManager.get(key); | |
if (value instanceof javax.swing.plaf.FontUIResource) | |
UIManager.put(key, newFont); | |
} | |
} |
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://henrik.nyh.se/2008/12/git-dirty-prompt | |
# http://www.simplisticcomplexity.com/2008/03/13/show-your-git-branch-name-in-your-prompt/ | |
# username@Machine ~/dev/dir[master]$ # clean working directory | |
# username@Machine ~/dev/dir[master*]$ # dirty working directory | |
function parse_git_dirty { | |
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*" | |
} | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/" |
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/sh | |
#Example Usage: findjars com/ambientideas/groovy | |
CLASSNAMETOFIND="$1" | |
echo "Searching all JARs recursively..." | |
for eachjar in `find . -iname "*.jar"` | |
do | |
#echo "Searching in $eachjar ..." |
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
RED="\[\033[0;31m\]" | |
YELLOW="\[\033[0;33m\]" | |
GREEN="\[\033[0;32m\]" | |
BLUE="\[\033[0;34m\]" | |
LIGHT_RED="\[\033[1;31m\]" | |
LIGHT_GREEN="\[\033[1;32m\]" | |
WHITE="\[\033[1;37m\]" | |
LIGHT_GRAY="\[\033[0;37m\]" | |
COLOR_NONE="\[\e[0m\]" | |
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
function parse_git_branch { | |
[ -d .git ] || return 1 | |
git_status="$(git status 2> /dev/null)" | |
branch_pattern="^# On branch ([^${IFS}]*)" | |
remote_pattern="# Your branch is (.*) of" | |
diverge_pattern="# Your branch and (.*) have diverged" | |
if [[ ! ${git_status}} =~ "working directory clean" ]]; then | |
state="*" | |
fi | |
# add an else if or two here if you want to get more specific |
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
<project> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.mycompany.app</groupId> | |
<artifactId>my-app</artifactId> | |
<version>1</version> | |
<dependencies> | |
<dependency> | |
<groupId>org.springframework</groupId> | |
<artifactId>spring-context</artifactId> | |
<version>3.0.3.RELEASE</version> |
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
[INFO] Scanning for projects... | |
[INFO] Searching repository for plugin with prefix: 'dependency'. | |
[INFO] ------------------------------------------------------------------------ | |
[INFO] Building Unnamed - com.mycompany.app:my-app:jar:1 | |
[INFO] task-segment: [dependency:tree] | |
[INFO] ------------------------------------------------------------------------ | |
Downloading: http://download.java.net/maven/2/org/springframework/spring-context/3.0.3.RELEASE/spring-context-3.0.3.RELEASE.pom | |
[INFO] Unable to find resource 'org.springframework:spring-context:pom:3.0.3.RELEASE' in repository java-net (http://download.java.net/maven/2) | |
Downloading: http://repo1.maven.org/maven2/org/springframework/spring-context/3.0.3.RELEASE/spring-context-3.0.3.RELEASE.pom |
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
Apache Maven 3.0-beta-1 (r935667; 2010-04-19 19:00:39+0200) | |
Java version: 1.6.0_20 | |
Java home: /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home | |
Default locale: en_US, platform encoding: MacRoman | |
OS name: "mac os x" version: "10.6.3" arch: "x86_64" Family: "mac" |
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
# Ignore all IntelliJ IDEA project files | |
.idea/ | |
*.iml | |
*.ipr | |
*.iws | |
# Ignore Maven target directories | |
target/ | |
# Ignore all log files |
OlderNewer