Skip to content

Instantly share code, notes, and snippets.

@mike-ensor
mike-ensor / colorize-maven.sh
Created February 22, 2012 03:55
Colorize Maven output
#!/bin/sh
# Written by Mike Ensor (mike@ensor.cc)
# Copywrite 2012
# Use as needed, modify, have fun!
# This is intended to be used for Maven3 + Mac OSX
#
# To use:
# in your ".bashrc" or ".bash_profile" add the following line:
# source ~/<path to script>/colorize-maven.sh
@troy
troy / 01papertrail.config
Last active December 12, 2015 03:58
Aggregate logs from AWS Elastic Beanstalk instances (Java, PHP, Ruby, etc.) to Papertrail without a custom AMI. (DEPRECATED)
# DEPRECATED
# You probably want one of these newer, better examples:
# http://help.papertrailapp.com/kb/hosting-services/amazon-elastic-beanstalk
# Credits:
# Jason Pirkey, Táve Corporation, http://www.tave.com/
# Jeremy Mickelson, https://github.com/CyborgMaster
# See http://help.papertrailapp.com/kb/hosting-services/amazon-elastic-beanstalk
@tokenvolt
tokenvolt / simple_form_bootstrap3.rb
Last active November 2, 2023 11:55
Bootstrap 3 simple form initializer
inputs = %w[
CollectionSelectInput
DateTimeInput
FileInput
GroupedCollectionSelectInput
NumericInput
PasswordInput
RangeInput
StringInput
TextInput
@donnykurnia
donnykurnia / simple_form_3.x_bootstrap_3.x
Created February 28, 2014 09:22
Setting simple_form 3.x to work with bootstrap 3.x
---------------------------------------------------------------------------------------------------------
# app/helpers/application_helper.rb
---------------------------------------------------------------------------------------------------------
def horizontal_simple_form_for(record, options={}, &block)
options[:html] ||= {}
options[:html][:class] = "form-horizontal #{options[:html][:class]}".rstrip
options[:wrapper] = :bootstrap_horizontal
simple_form_for(record, options, &block)
end
---------------------------------------------------------------------------------------------------------
@rocketraman
rocketraman / equals-hash-tostring.java
Last active April 29, 2020 01:48 — forked from rocketraman/equals-hash-tostring.java
Example of JDK7+ Objects equals, hash and Guava 18+ toString implementations
import com.google.common.base.MoreObjects;
import java.util.Objects;
public class Address {
...
@Override
public boolean equals(Object obj) {