Skip to content

Instantly share code, notes, and snippets.


Bruno Wego brunowego

View GitHub Profile
felipou /
Last active Jan 18, 2021
DBeaver password decryption script - for newer versions of DBeaver
# requires pycrypto lib (pip install pycrypto)
import sys
import base64
import os
import json
from Crypto.Cipher import AES
drslump73 / config.vim
Last active Jan 22, 2019
spacevim config
View config.vim
# at .SpaceVim.d/autoload/config.vim
func! config#before() abort
let g:mapleader=','
set conceallevel=0
func! config#after() abort
let g:mapleader=','
Kurt108 / analytics-admin.conf
Last active Dec 17, 2019
using keycloak-gatekeeper with matomo for single-sign on
View analytics-admin.conf
server {
server_name analytics-admin-proxy.domain;
root /var/www/piwik;
access_log /var/log/nginx/access-piwik-admin.log combined;
error_log /var/log/nginx/error-piwik-admin.log;
index index.php;
listen 8081 default_server;
location / {
try_files $uri $uri/ /index.php$args;
View my-spacevim-init.vim
" Here are some basic customizations, please refer to the ~/.SpaceVim.d/init.vim
" file for all possible options:
let g:spacevim_default_indent = 4
let g:spacevim_max_column = 80
" Change the default directory where all miscellaneous persistent files go.
" By default it is ~/.cache/vimfiles.
let g:spacevim_plugin_bundle_dir = '~/.cache/vimfiles'
" set SpaceVim colorscheme
View _MicroService Proxy Gateway

MicroService Proxy Gateway Solutions

Kong, Traefik, Caddy, Linkerd, Fabio, Vulcand, and Netflix Zuul seem to be the most common in microservice proxy/gateway solutions. Kubernetes Ingress is often a simple Ngnix, which is difficult to separate the popularity from other things.

Github Star Trend:

Github Star History for Kong vs traefik vs fabio vs caddy vs Zuul

This is just a picture of this link from March 2, 2019

Originally, I had included some other solution

require 'sidekiq/api'
# 1. Clear retry set
# 2. Clear scheduled jobs
Revod / Material Theme.itermcolors
Created Nov 6, 2016
Material Theme For iTerm2
View Material Theme.itermcolors
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
<key>Ansi 0 Color</key>
<key>Color Space</key>
<key>Blue Component</key>
nrollr /
Last active Jan 18, 2021
Install MySQL on Sierra using Homebrew

Install MySQL on macOS Sierra

This procedure explains how to install MySQL using Homebrew on macOS Sierra 10.12

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.

Install MySQL

At this time of writing, Homebrew has MySQL version 5.7.15 as default formulae in its main repository :



Our app relies entirely on the current_user helper method (found in our ApplicationController) to retrieve the User object associated with the currently logged-in user (if any). You guys are using the devise gem for authentication, but you still have a current_user helper method which is made available to ApplicationController (and all subclasses).

Normally, the current_user method looks something like this:

def current_user
  # do some magic to get the user id from the (encrypted) session cookie…
  user_id = get_user_id_from_session
brendomaciel / percent_mask.js
Last active Dec 28, 2020
Máscara de porcentagem utilizando o plugin jQuery Mask Plugin (limita o valor máximo a 100)
View percent_mask.js
$('#percent').mask('P', {
translation: {
'P': {
pattern: /[\d\.,]/,
recursive: true
onKeyPress: function(val, e, field, options) {
var old_value = $(field).data('oldValue') || '';
You can’t perform that action at this time.