Skip to content

Instantly share code, notes, and snippets.

View jotajr's full-sized avatar
🇨🇦
Working and Studying

Jota Freitas Jr jotajr

🇨🇦
Working and Studying
View GitHub Profile
@jotajr
jotajr / gitlab-artifacts-cleanup.py
Created April 14, 2023 18:24 — forked from smashnet/gitlab-artifacts-cleanup.py
GitLab Artifacts Clean-Up
"""
This is a small python script to clear up old gitlab build artifacts.
There are 3 variables you should modify:
* base_url: path to your gitlab
* access_token: your personal access token to make gitlab api calls
* delete_everything_older_than: configure the timedelta as you wish
!!IMPORTANT!!
By default this script does only make dry-runs and does not actually delete any files!
@jotajr
jotajr / logback.xml
Last active April 3, 2023 17:53
Sample of logback configuration file for using with Spring Boot
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<appender name="Console"
class="ch.qos.logback.core.ConsoleAppender">
<layout class="ch.qos.logback.classic.PatternLayout">
<pattern>[%d{yyyy/MM/dd HH:mm:ss:SSS}] %yellow([%thread]) %highlight(%-5level) [%cyan(%logger{15}):%green(%M):%magenta(%L)] - %m%n</pattern>
</layout>
</appender>
<appender name="RollingFile"
class="ch.qos.logback.core.rolling.RollingFileAppender">
@jotajr
jotajr / deploy.sh
Created July 15, 2022 12:20 — forked from jed/deploy.sh
Using AWS CloudFormation to deploy an edge lambda
#!/bin/sh
aws cloudformation deploy \
--template-file stack.yaml \
--stack-name edge-lambda-test \
--capabilities CAPABILITY_IAM \
--parameter-overrides Nonce=$RANDOM
@jotajr
jotajr / tmux-cheatsheet.markdown
Last active January 22, 2021 13:12 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@jotajr
jotajr / .vimrc
Created February 17, 2020 13:51
Minhas configurações do VIM
" Vim configuration by jotajr
" Seta o numero de linhas que o vim tem que lembrar
set history=500
" Seta a auto deteccao de sintaxe
syntax on
" Sempre mostra a posicao corrente
set ruler
@jotajr
jotajr / vscodebutton
Created November 25, 2019 12:30
Create a custom toolbar button on XYPlorer to open VSCode
// XYPLORER SCRIPT: Run application
$script_name = "Open VsCode";
$cpath = "<curpath>";
$selected = "<curname>";
$app = "C:\Program Files\Microsoft VS Code\Code.exe";
$target = "";
if ($selected == "") {
$target = $cpath;
} else {
@jotajr
jotajr / History\-1eef2ede\5TL5.json
Last active May 19, 2022 11:58
VscodeCloudSettings
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "GERTEC MDM Lambda Functions Templates for Lambda",
"Parameters": {
"REGION": {
"Type": "String",
"Default": "us-east-1"
}
},
"Resources": {
@jotajr
jotajr / GitEmojiFunCommits.md
Last active October 3, 2019 19:47
Be creative in your commit messages and have fun while coding

Be creative on yours Git commit messages using the following Emojis

While using the seven rules of a great Git commit message:

  1. Separate subject from body with a blank line
  2. Limit the subject line to 50 chareacters
  3. Capitalize the subject line
  4. Don't end the subject line with a period
  5. Use imperative mood in the subject line
  6. Wrap the body at 72 characters
@jotajr
jotajr / renameAuthorEmailGit.sh
Last active February 15, 2023 18:08
[GIT] Renomear os emails de um repositório Git
#!/bin/sh
# Faz o clone de uma nova versão do repositório
# git clone --bare https://github.com/user/repo.git
# cd repo.git
# Execute este script
echo "Alterando os commits com o novo autor"
-- Jota Freitas Jr - Remover tabelas para controle de Spring Batch
DROP TABLE BATCH_STEP_EXECUTION_CONTEXT ;
DROP TABLE BATCH_JOB_EXECUTION_CONTEXT ;
DROP TABLE BATCH_STEP_EXECUTION ;
DROP TABLE BATCH_JOB_EXECUTION_PARAMS ;
DROP TABLE BATCH_JOB_EXECUTION ;
DROP TABLE BATCH_JOB_INSTANCE ;
DROP SEQUENCE BATCH_STEP_EXECUTION_SEQ ;