Skip to content

Instantly share code, notes, and snippets.

View gilbertoca's full-sized avatar

Gilberto Caetano de Andrade gilbertoca

View GitHub Profile
@gilbertoca
gilbertoca / gist:bd3a4849c4d62033073d
Created March 18, 2016 17:55 — forked from leandrotoledo/gist:3019746
MDB to PostgreSQL with mdb-tools example
#!/bin/sh
mdb-schema Acadesc.mdb postgres | sed 's/Char/Varchar/g' | sed 's/Postgres_Unknown 0x0c/text/g' | psql -h localhost -U postgres -w -d acadesc > /dev/null 2>&1
tables=$(echo -en $(mdb-schema Acadesc.mdb postgres | grep "CREATE TABLE" | awk '{ print $3 }' | sed -e 's/"//g');)
for i in $tables
do
mdb-export -I postgres Acadesc.mdb $i | psql -h localhost -U postgres -w -d acadesc > /dev/null 2>&1
done
# STEP 1: ENSURE COMPLETION AND PROMPT FUNCTION ARE LOADED
# ========================================================
# OPTION 1: If on OSX using Homebrew:
#
# source $(brew --prefix)/etc/bash_completion.d/git-prompt.sh
# source $(brew --prefix)/etc/bash_completion.d/git-completion.bash
# OPTION 2: If on OSX using built-in Git (also works on ZSH):
#
@gilbertoca
gilbertoca / RWD-|-Responsive-HTML5-form-elements-with-CSS-Flexbox.markdown
Created March 31, 2016 02:34
RWD | Responsive HTML5 form elements with CSS Flexbox
[15:35] gilberto.andrade@BEM-INF007:gace (jsf-form-contrato * u=) $ mvn -P dev-postgresql clean package tomee-embedded:run -Dmaven.test.skip
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Gestão e Acompanhamento de Contratos de Empréstimos[GACE] 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ gace ---
[INFO] Deleting /home/gilberto.andrade/tmp/gace/target
[INFO]
import java.time.LocalDate;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
import java.time.format.DateTimeParseException;
import java.util.Locale;
import java.util.TimeZone;
import javax.faces.application.FacesMessage;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.convert.Converter;
[10:20] gilberto.andrade@BEM-INF007:gace (jsf-form-contrato *+ u=) $ mvn clean package tomee-embedded:run -Dmaven.test.skip
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Gestão e Acompanhamento de Contratos de Empréstimos[GACE] 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ gace ---
[INFO] Deleting /home/gilberto.andrade/tmp/gace/target
[INFO]
[10:49] gilberto.andrade@BEM-INF007:gace (jsf-form-contrato *+ u=) $ mvn clean package tomee-embedded:run -Dmaven.test.skip
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Gestão e Acompanhamento de Contratos de Empréstimos[GACE] 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ gace ---
[INFO] Deleting /home/gilberto.andrade/tmp/gace/target
[INFO]
[10:44] gilberto.andrade@BEM-INF007:gace (jsf-form-contrato *+ u=) $ mvn clean package tomee-embedded:run -Dmaven.test.skip
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Gestão e Acompanhamento de Contratos de Empréstimos[GACE] 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ gace ---
[INFO] Deleting /home/gilberto.andrade/tmp/gace/target
[INFO]
[11:54] gilberto.andrade@BEM-INF007:gace (ticket/18 * u=) $ mvn clean package tomee-embedded:run -Dmaven.test.skip
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Gestão e Acompanhamento de Contratos de Empréstimos[GACE] 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ gace ---
[INFO] Deleting /home/gilberto.andrade/tmp/gace/target
[INFO]
@gilbertoca
gilbertoca / gist:5ed86f72cfe17b39843330187ad287b4
Created May 10, 2016 19:36 — forked from jagregory/gist:710671
How to move to a fork after cloning
So you've cloned somebody's repo from github, but now you want to fork it and contribute back. Never fear!
Technically, when you fork "origin" should be your fork and "upstream" should be the project you forked; however, if you're willing to break this convention then it's easy.
* Off the top of my head *
1. Fork their repo on Github
2. In your local, add a new remote to your fork; then fetch it, and push your changes up to it
git remote add my-fork git@github...my-fork.git