Skip to content

Instantly share code, notes, and snippets.


Wesley Egberto wesleyegberto

View GitHub Profile
rponte /
Last active May 10, 2021
Não use UUID como PK nas tabelas do seu banco de dados

Pretende usar UUID como PK em vez de Int/BigInt no seu banco de dados? Pense novamente...


Não use UUID como PK nas tabelas do seu banco de dados.

Um pouco mais de detalhes


I've been working with Apache Kafka for over 7 years. I inevitably find myself doing the same set of activities while I'm developing or working with someone else's system. Here's a set of Kafka productivity hacks for doing a few things way faster than you're probably doing them now. 🔥

Get the tools

rmpestano / Jenkinsfile.adoc
Last active Apr 23, 2019
Java maven jenkinsfile
View Jenkinsfile.adoc
pipeline {
    agent any
    tools {
        maven 'apache-maven-3.3.9'
        jdk 'jdk1.8'
    stages {
        stage('Build') {
            steps {
trongthanh / mojave.xml
Last active May 7, 2021
macOS Mojave dynamic background re-implement as GTK+ background slideshow. Background images are changed to reflect the time of the day.
View mojave.xml
<!-- Instructions:
- Download and unzip Mojave dynamic background here:
- Rename the extracted folder as "mojave-background" (Excuse the trouble but I renamed it on my machine and already use that path in the XML file)
- Save this xml file next to the Mojave background files
- Fix the path to the background images below (better using absolute path)
- Lastly, either:
+ GNOME: Use gnome-tweaks tool to select this XML as wallpaper (as default wallpaper settings won't let you choose wallpaper from custom path)
+ MATE: Go to background setting (in Appearance) > Choose +Add... > make sure **All files** filter is selected at the bottom right > Then choose mojave.xml

Quick Tips for Fast Code on the JVM

I was talking to a coworker recently about general techniques that almost always form the core of any effort to write very fast, down-to-the-metal hot path code on the JVM, and they pointed out that there really isn't a particularly good place to go for this information. It occurred to me that, really, I had more or less picked up all of it by word of mouth and experience, and there just aren't any good reference sources on the topic. So… here's my word of mouth.

This is by no means a comprehensive gist. It's also important to understand that the techniques that I outline in here are not 100% absolute either. Performance on the JVM is an incredibly complicated subject, and while there are rules that almost always hold true, the "almost" remains very salient. Also, for many or even most applications, there will be other techniques that I'm not mentioning which will have a greater impact. JMH, Java Flight Recorder, and a good profiler are your very best friend! Mea

View Find out git branch creator
git for-each-ref --format='%(color:cyan)%(authordate:format:%m/%d/%Y %I:%M %p) %(align:25,left)%(color:yellow)%(authorname)%(end) %(color:reset)%(refname:strip=3)' --sort=authordate refs/remotes
jeremypruitt / sns-publish
Last active Feb 9, 2021
AWS Lambda function to publish to SNS topic
View sns-publish
console.log('Loading function');
var AWS = require('aws-sdk');
AWS.config.region = 'us-west-2';
exports.handler = function(event, context) {
console.log("\n\nLoading handler\n\n");
var sns = new AWS.SNS();
luizgpsantos / Exemplo completo
Last active Feb 16, 2021
Analyzer para plural e acentos no elasticsearch
View Exemplo completo
// Ao [criar o índice][0], especifique um [analyzer customizado][1] responsável por tratar palavras
// com caracteres especiais e o plural da lingua Portuguesa. Algumas palavras precisarão de uma
// sintonia fina, o que pode ser feito através de [stemmer overrides][2]. Além disso, ao criar um
// campo atribua o analyzer a ele.
PUT produtos
"settings": {
"analysis": {
"analyzer": {
mislav /
Last active Apr 13, 2021
tmux-vim integration to transparently switch between tmux panes and vim split windows

I use tmux splits (panes). Inside one of these panes there's a Vim process, and it has its own splits (windows).

In Vim I have key bindings C-h/j/k/l set to switch windows in the given direction. (Vim default mappings for windows switching are the same, but prefixed with C-W.) I'd like to use the same keystrokes for switching tmux panes.

An extra goal that I've solved with a dirty hack is to toggle between last active panes with C-\.

Here's how it should work: