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 / AutoCompleteTextBox.java
Created May 10, 2021 19:58 — forked from floralvikings/AutoCompleteTextBox.java
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;
@gilbertoca
gilbertoca / README.md
Created September 16, 2020 16:26 — forked from magnetikonline/README.md
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.
  • List every object at each commit.
@gilbertoca
gilbertoca / docker-compose.jenkins-dind.yml
Created September 2, 2020 11:56 — forked from adelmofilho/docker-compose.jenkins-dind.yml
Docker-in-Docker approach to run Jenkins as a Docker container
# This docker-compose file intent to create a multi-container application
# that runs a Jenkins container connected via TLS to a Docker-in-Docker (dind) container as Docker daemon.
#
# Advice about this approach can be found at:
# http://jpetazzo.github.io/2015/09/03/do-not-use-docker-in-docker-for-ci/
#
# As well discussion about another alternatives on this setup can be found at:
# https://forums.docker.com/t/using-docker-in-a-dockerized-jenkins-container/322/11
#
# Quick reference about Docker-in-Docker can be fount at:
Imagem Docker para rodar um firefox com o warsaw
Créditos: https://gist.github.com/lichti/6654ee35db133949101bdf61c4e2412c
More Info:
https://hub.docker.com/r/lichti/warsaw-browser/
https://github.com/lichti/containers4docker/tree/master/warsaw-browser
Acrescente essa função no arquivo .bashrc
function warsaw-browser {
xhost +
docker run -it --rm \
@gilbertoca
gilbertoca / Undoing_Merges.md
Created January 23, 2020 15:28 — forked from hofnerb/Undoing_Merges.md
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
@gilbertoca
gilbertoca / gh-pages-deploy.md
Created January 23, 2020 15:13 — forked from cobyism/gh-pages-deploy.md
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

<plugin>
<groupId>org.apache.tomee.maven</groupId>
<artifactId>tomee-maven-plugin</artifactId>
<version>${tomee.version}</version>
<configuration>
<tomeeVersion>${tomee.version}</tomeeVersion>
<tomeeClassifier>webprofile</tomeeClassifier>
<!--tomeeClassifier>plus</tomeeClassifier-->
<!--tomeeClassifier>plume</tomeeClassifier-->
<zip>false</zip>
@gilbertoca
gilbertoca / tomee-embedded-hibernate-maven-plugin.xml
Created October 20, 2016 11:49
tomee-embedded-hibernate-maven-plugin config
<plugin>
<groupId>org.apache.tomee.maven</groupId>
<artifactId>tomee-embedded-maven-plugin</artifactId>
<version>7.0.1</version>
<dependencies>
<dependency>
<groupId>org.apache.tomee</groupId>
<artifactId>openejb-core</artifactId>
<version>7.0.1</version>
<exclusions>
@gilbertoca
gilbertoca / tomee-embedded-eclipselink-mojarra-maven-plugin.xml
Last active September 1, 2016 23:23
tomee-embedded-eclipselink-mojarra-maven-plugin config