Skip to content

Instantly share code, notes, and snippets.

View H6's full-sized avatar
🥥

H6 H6

🥥
View GitHub Profile
@H6
H6 / PS1.sh
Created February 15, 2018 09:09 — forked from markrendle/PS1.sh
Git Prompt
export PS1='\n[\e[0;32m\u@\h\e[m \e[1;33m\w\e[m\e[0;31m$(__git_ps1 " (%s)")\e[m]\n\$ '
@H6
H6 / .profile
Created February 9, 2017 09:49 — forked from bmhatfield/.profile
Automatic Git commit signing with GPG on OSX
# In order for gpg to find gpg-agent, gpg-agent must be running, and there must be an env
# variable pointing GPG to the gpg-agent socket. This little script, which must be sourced
# in your shell's init script (ie, .bash_profile, .zshrc, whatever), will either start
# gpg-agent or set up the GPG_AGENT_INFO variable if it's already running.
# Add the following to your shell init to set up gpg-agent automatically for every shell
if [ -f ~/.gnupg/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then
source ~/.gnupg/.gpg-agent-info
export GPG_AGENT_INFO
else
@H6
H6 / emr_bootstrap_java_8.sh
Created February 24, 2016 14:56 — forked from pstorch/emr_bootstrap_java_8.sh
Bootstrap script for installing Java 8 on an Amazon Elastic MapReduce instance (emr-4.0.0)
# Check java version
JAVA_VER=$(java -version 2>&1 | sed 's/java version "\(.*\)\.\(.*\)\..*"/\1\2/; 1q')
if [ "$JAVA_VER" -lt 18 ]
then
# Figure out how many versions of Java and javac we currently have
NR_OF_JRE_OPTIONS=$(echo 0 | alternatives --config java 2>/dev/null | grep 'There ' | awk '{print $3}' | tail -1)
NR_OF_SDK_OPTIONS=$(echo 0 | alternatives --config javac 2>/dev/null | grep 'There ' | awk '{print $3}' | tail -1)
# Silent install javac (includes jre)
@H6
H6 / .screenrc
Created February 9, 2016 20:32 — forked from nicerobot/.screenrc
.screenrc with "tabs" using hardstatus and caption options
# look and feel
caption always "%{= bb}%{+b w}%h %=%{=b rw} %l %{= db} ${USER}@%H %{= dg}%c"
hardstatus alwayslastline "%-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%<"
# skip the startup message
startup_message off
# go to home dir
chdir
@H6
H6 / WholeFile.java
Created January 7, 2016 17:26 — forked from sritchie/WholeFile.java
Hadoop input format for swallowing entire files.
package forma;
import forma.WholeFileInputFormat;
import cascading.scheme.Scheme;
import cascading.tap.Tap;
import cascading.tuple.Fields;
import cascading.tuple.Tuple;
import cascading.tuple.TupleEntry;
import java.io.IOException;
import org.apache.hadoop.mapred.JobConf;
@H6
H6 / README.md
Last active August 29, 2015 14:15 — forked from jonathantneal/README.md

Local SSL websites on Mac OSX

These instructions will guide you through the process of setting up local, trusted websites on your own computer.

These instructions are intended to be used on Mac OSX Yosemite.

NOTE: You may substitute the edit command for nano, vim, or whatever the editor of your choice is. Personally, I forward edit to Sublime Text:

alias edit="/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl"
@H6
H6 / rails_admin.de.yml
Created December 18, 2014 09:08 — forked from soemo/rails_admin.de.yml
fix wrong translation in pagination
# German rails_admin translation
de:
admin:
home:
name: "Home"
pagination:
previous: "&laquo; Zurück"
next: "Vor &raquo;"
truncate: "…"