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
| // Imports required | |
| import java.util.List; | |
| import java.lang.StringBuilder; | |
| /** | |
| * Mimic's PHP's implode function. | |
| * | |
| * @param glue The character(s) you want to stick the peices together with | |
| * @param array The subject | |
| * @return A string concatenation of the List items |
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
| // Imports required | |
| import java.lang.StringBuilder; | |
| /** | |
| * Convert a debug back trace to a string. | |
| * | |
| * @param e The exception to be traced | |
| * @return The stack trace as a string | |
| */ | |
| final public static String stackTraceToString(Throwable e) |
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
| // Imports required | |
| import java.sql.ResultSet; | |
| import java.sql.ResultSetMetaData; | |
| import java.sql.SQLException; | |
| /** | |
| * Print a result set to system out. | |
| * | |
| * @param rs The ResultSet to print | |
| * @throws SQLException If there is a problem reading the ResultSet |
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
| // Imports required | |
| import java.io.File; | |
| import java.io.FileNotFoundException; | |
| import java.util.Scanner; | |
| /** | |
| * Read in a file. | |
| * | |
| * @param path The explicit path to the file to read | |
| * @return The contents of the file as a string |
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
| // Imports required | |
| import java.text.SimpleDateFormat; | |
| import java.text.ParseException; | |
| /** | |
| * Convert a date to a different format. | |
| * | |
| * @param currentFormat The current date format | |
| * @param newFormat The new date format | |
| * @param subject The date that's going to be converted |
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
| set nocompatible " be iMproved | |
| filetype off " required! | |
| set rtp+=~/.vim/bundle/vundle/ | |
| filetype plugin indent on " required! | |
| " | |
| " Brief help | |
| " :BundleList - list configured bundles | |
| " :BundleInstall(!) - install(update) bundles |
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 hg_in_repo() { | |
| hg branch 2> /dev/null | awk '{print "on "}' | |
| } | |
| function hg_dirty() { | |
| hg status --no-color 2> /dev/null \ | |
| | awk '$1 == "?" { print "?" } $1 != "?" { print "!" }' \ | |
| | sort | uniq | head -c1 | |
| } |
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
| [ui] | |
| username = | |
| verbose = True | |
| [auth] | |
| storm.prefix = | |
| storm.username = | |
| storm.password = | |
| [color] |
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
| [user] | |
| email = | |
| name = | |
| [alias] | |
| ci = commit | |
| st = status -sb | |
| co = checkout | |
| di = diff | |
| dis = diff --staged |
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
| brew install mysql libjpeg libpng gd mcrypt openssl; | |
| ./configure \ | |
| --prefix=/usr \ | |
| --mandir=/usr/share/man \ | |
| --infodir=/usr/share/info \ | |
| --sysconfdir=/private/etc \ | |
| --with-apxs2=/usr/sbin/apxs \ | |
| --enable-cli \ | |
| --with-config-file-path=/etc \ | |
| --with-libxml-dir=/usr \ |