Skip to content

Instantly share code, notes, and snippets.

First Name Last Name Gender Title Login Email Manager Email Department Team Location Employee ID Hiring Date Alternative Email Secondary Reviewer Preferred name Leaving Date Termination Type Employment Type
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
<module name="Checker">
<module name="TreeWalker">
<!-- Checks for redundant import statements. -->
{
"title": "Exchange numbers and symbols",
"rules": [
{
"description": "Switch @ and double quote symbols",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "2",
@drei01
drei01 / Pgbadger RDS
Created March 7, 2017 10:19
Running pgbadger against an RDS log
pgbadger -j 4 -p '%t:%r:%u@%d:[%p]:' pg.log
@drei01
drei01 / elasticbeanstalk_deploy.sh
Created October 20, 2015 13:31
AWS CLI - Deploy Beanstalk Application Version
#!/bin/bash
appname=$1
envname=$2
versionid=$3
#if version id is not set, get the latest
if [ -z "$versionlabel" ]; then
#get the latest application version, piping to sed to remove quotes from string
versionid="$(aws elasticbeanstalk describe-application-versions --application-name $appname | jq '.ApplicationVersions[0].VersionLabel' | sed -e 's/^"//' -e 's/"$//')"
fi
@drei01
drei01 / ebs_backup.sh
Last active September 15, 2015 16:22
Create a volume snapshot from the instance itself. Prerequisites are having ec2 command line tools installed.
#!/bin/bash
#Before running this script, add the following to your ~/.bashrc
#export AWS_ACCESS_KEY=your_access_key
#export AWS_SECRET_KEY=your_secret_key
#export AWS_REGION=eu-west-1
# initialize the EC2 environment
[ -e /etc/profile.d/aws-apitools-common.sh ] && source /etc/profile.d/aws-apitools-common.sh
# load the access keys
@drei01
drei01 / ebs_backup.sh
Created September 15, 2015 16:05
Before running this script, add the following to your ~/.bashrc
#!/bin/bash
# initialize the EC2 environment
[ -e /etc/profile.d/aws-apitools-common.sh ] && source /etc/profile.d/aws-apitools-common.sh
# load the access keys
source ~/.bashrc
# locate the instance ID of this VM
@drei01
drei01 / bcompare-git.md
Last active August 29, 2015 14:28 — forked from jfromaniello/bcompare-git.md
Integrate beyond compare 4 with git

Install command line tools:

then run this:

git config --global diff.tool bc3
git config --global difftool.bc3 trustExitCode true
git config --global merge.tool bc3
@drei01
drei01 / JSONUserType.java
Created March 19, 2015 14:25
Hibernate Postgres Json User Type
import java.io.IOException;
import java.io.Serializable;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Types;
import java.util.Properties;
import org.hibernate.HibernateException;
import org.hibernate.engine.spi.SessionImplementor;
<com.google.android.gms.maps.mapview xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/mapView">
</com.google.android.gms.maps.mapview>