Skip to content

Instantly share code, notes, and snippets.

View izidorome's full-sized avatar
👾
Typing...

Rafael Izidoro izidorome

👾
Typing...
View GitHub Profile
@izidorome
izidorome / git-branches-by-commit-date.sh
Created May 27, 2025 22:57 — forked from jasonrudolph/git-branches-by-commit-date.sh
List remote Git branches and the last commit date for each branch. Sort by most recent commit date.
# Credit http://stackoverflow.com/a/2514279
for branch in `git branch -r | grep -v HEAD`;do echo -e `git show --format="%ci %cr" $branch | head -n 1` \\t$branch; done | sort -r
1. Install oh-my-zsh
sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
2. Clone necessary plugins.
git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-history-substring-search ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-history-substring-search
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
3. Add plugins to ~/.zshrc as
plugins = ( [plugins...] zsh-autosuggestions zsh-history-substring-search zsh-syntax-highlighting)
@izidorome
izidorome / configurar_pyenv.md
Created August 12, 2024 03:24 — forked from luzfcb/configurar_pyenv.md
instalar pyenv no ubuntu
@izidorome
izidorome / mixins.py
Created December 26, 2023 16:01 — forked from lu911/mixins.py
SQLAlchemy Mixins
# -*- coding:utf-8 -*-
from flask import abort
from datetime import datetime
from project.ext import db
class IdMixin(object):
"""
Provides the :attr:`id` primary key column
DROP TABLE if exists d_date;
CREATE TABLE d_date
(
date_dim_id INT NOT NULL,
date_actual DATE NOT NULL,
epoch BIGINT NOT NULL,
day_suffix VARCHAR(4) NOT NULL,
day_name VARCHAR(9) NOT NULL,
day_of_week INT NOT NULL,
@izidorome
izidorome / sidekiq.config
Created July 25, 2019 22:22 — forked from ssaunier/sidekiq.config
Running Sidekiq on AWS Elastic Beanstalk (Put that file in `.ebextensions` folder)
# Sidekiq interaction and startup script
commands:
create_post_dir:
command: "mkdir -p /opt/elasticbeanstalk/hooks/appdeploy/post"
ignoreErrors: true
files:
"/opt/elasticbeanstalk/hooks/appdeploy/post/50_restart_sidekiq.sh":
mode: "000755"
owner: root
group: root
@izidorome
izidorome / uuid.sql
Created July 22, 2019 22:32
Mysql bin_to_uuid & uuid_to_bin
DELIMITER |
CREATE FUNCTION bin_to_uuid(b BINARY(16))
RETURNS CHAR(36) DETERMINISTIC
BEGIN
DECLARE HEX CHAR(32);
SET HEX = HEX(b);
RETURN LOWER(CONCAT(LEFT(HEX, 8), '-', MID(HEX, 9,4), '-', MID(HEX, 13,4), '-', MID(HEX, 17,4), '-', RIGHT(HEX, 12)));
END
|
@izidorome
izidorome / Makefile
Created January 14, 2018 20:42 — forked from istepanov/Makefile
Makefile for deploying Python 3 AWS Lambda
PROJECT = myProject
FUNCTION = $(PROJECT)
REGION = us-west-1
ENVCHAIN = my-aws-env
all: build
.PHONY: clean build deploy
clean:
@izidorome
izidorome / Banks
Created March 29, 2017 14:08
Banks Hash
'001' => 'BANCO DO BRASIL S.A.',
'003' => 'BANCO DA AMAZONIA S.A.',
'004' => 'BANCO DO NORDESTE DO BRASIL S.A.',
'012' => 'BANCO STANDARD DE INVESTIMENTOS S.A.',
'014' => 'NATIXIS BRASIL S.A.',
'019' => 'BANCO AZTECA DO BRASIL S.A.',
'021' => 'BANESTES S.A. BANCO DO ESTADO DO ESPIRITO SANTO',
'024' => 'BANCO DE PERNAMBUCO S.A. - BANDEPE',
'025' => 'BANCO ALFA S.A.',
'029' => 'BANCO BANERJ S.A.',
@izidorome
izidorome / rails http status codes
Created March 8, 2016 18:53 — forked from mlanett/rails http status codes
HTTP status code symbols for Rails
HTTP status code symbols for Rails
Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings.
Status Code Symbol
1xx Informational
100 :continue
101 :switching_protocols
102 :processing