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 / gitblit_on_opensuse
Last active July 13, 2016 15:13
Manual install of the GitBlit project on openSUSE
#folder structure
#GITBLIT_PATH=/opt/gitblit/app/[VERSION]
#GITBLIT_BASE_FOLDER=/opt/gitblit/data
#GITBLIT_HTTP_PORT=0
#GITBLIT_HTTPS_PORT=8443
#GITBLIT_LOG=/opt/gitblit/app/[VERSION]/gitblit.log
#run as gitblit user
groupadd gitblit
useradd -g gitblit -d /opt/gitblit gitblit
@leandrotoledo
leandrotoledo / gist:3019746
Created June 29, 2012 18:13
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
@lichti
lichti / Warsaw-brwser.txt
Created June 26, 2017 13:28
warsaw-browser - Itau, CEF, BB e outros.
Imagem Docker para rodar um firefox com o warsaw configurado para acesso a bancos brasileiros.
É uma boa opção para acessar bancos através de GNU/Linux.
Have a nice day.
More Info:
https://hub.docker.com/r/lichti/warsaw-browser/
https://github.com/lichti/containers4docker/tree/master/warsaw-browser
@hofnerb
hofnerb / Undoing_Merges.md
Created April 9, 2015 16:15
Undoing Merges

Undoing the last (local) merge (and thus rewriting the history):

git reset --hard HEAD~

Reverting last commit (commits the commit of mainline before the last commit again)

git revert -m 1 HEAD
@jewelsea
jewelsea / Person.java
Last active August 28, 2022 22:11
JavaFX sample TableView with Add Buttons
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;
public class Person {
private StringProperty firstName;
private StringProperty lastName;
public Person(String firstName, String lastName) {
setFirstName(firstName);
setLastName(lastName);
How to keep git log and less output on the screen
http://serebrov.github.io/html/2014-01-04-git-log-and-less-keep-output.html
Just for git commands:
git config --global --replace-all core.pager "less -iXFR"
For less globally (including git) - add to .bashrc / .zshrc / etc:
export LESS=-iXFR
The options we set for less are:
@dvsingh9
dvsingh9 / spring.boot.90mb.Dockerfile
Created May 3, 2020 17:35
Spring boot ultra slim (less than 90 mb) docker build script
# (1) use Alpine Linux for build stage
FROM alpine:3.11.3 as build
# (2) install build dependencies
RUN apk --no-cache add openjdk11
RUN apk --no-cache add maven
# build JDK with less modules
RUN /usr/lib/jvm/default-jvm/bin/jlink \
--compress=2 \
--module-path /usr/lib/jvm/default-jvm/jmods \
@eliotsykes
eliotsykes / git-aware-bash-prompt.md
Last active April 28, 2023 12:18
Git Aware Bash Prompt
@floralvikings
floralvikings / AutoCompleteTextBox.java
Last active December 30, 2023 04:41
Simple JavaFX TextBox with AutoComplete functionality based on a supplied set.
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.geometry.Side;
import javafx.scene.control.ContextMenu;
import javafx.scene.control.CustomMenuItem;
import javafx.scene.control.Label;
import javafx.scene.control.TextField;
@magnetikonline
magnetikonline / README.md
Last active February 4, 2024 07:45
List all Git repository objects by size.

List all Git repository objects by size

Summary

Bash script to:

  • Iterate all commits made within a Git repository.