Skip to content

Instantly share code, notes, and snippets.

View andrelugomes's full-sized avatar

André Luis Gomes andrelugomes

View GitHub Profile
@andrelugomes
andrelugomes / maven-snapshot
Last active December 11, 2019 01:55
Set pom.xml SNAPSHOT version to prepare a new Release
mvn versions:set -DnewVersion=1.2.0-SNAPSHOT
@andrelugomes
andrelugomes / mkv-to-mp4.rb
Last active August 28, 2016 22:25
Convert .mkv to .mp4
#sudo apt install ffmpeg
Dir.glob("*.mkv") do |mkv_file|
puts "working on: #{mkv_file}"
mp4_file = mkv_file.gsub(".mkv", ".mp4")
system "ffmpeg -i #{mkv_file} -acodec copy -vcodec copy -c:s mov_text #{mp4_file}"
end
@andrelugomes
andrelugomes / 0_setup_ubuntu.sh
Last active April 1, 2021 11:40
Setup Ubuntu.
# My Setup
# sudo chmod -x 0_setup_ubuntu.sh
wget https://gist.githubusercontent.com/andrelugomes/0dcedc905cc2bc855b958389cc62c5dd/raw/46a82de08d1f441d80b7a19922c5bff143263059/1_repos.sh
wget https://gist.githubusercontent.com/andrelugomes/0dcedc905cc2bc855b958389cc62c5dd/raw/46a82de08d1f441d80b7a19922c5bff143263059/2_apt.sh
wget https://gist.githubusercontent.com/andrelugomes/0dcedc905cc2bc855b958389cc62c5dd/raw/46a82de08d1f441d80b7a19922c5bff143263059/3_snap.sh
sudo chmod -x 1_repos.sh
sudo chmod -x 2_apt.sh
@andrelugomes
andrelugomes / .my_setup_oh-my-zsh
Last active August 15, 2023 18:07
Install oh-my-zsh, plugins and theme
- ok-my-zsh
- p10k.zsh : custon
- .zshrc : Plugins
@andrelugomes
andrelugomes / read_csv.rb
Created December 28, 2019 10:28
Read CSV from JIRA lead time issues
require 'csv'
require 'date'
csv = CSV.read('TASKS.csv', headers: true)
assignee = CSV.read('JIRA.csv', headers: false).drop(1).to_h
authors = {}
p assignee
def real_duration(duration)
@andrelugomes
andrelugomes / brightness.sh
Last active July 28, 2020 12:09
My Brightness Controll
#! /bin/zsh
VALUE=$1
if [[ "$VALUE" -ge 0.25 && "$VALUE" -le 1.0 ]]; then
xrandr | grep " connected" | cut -f1 -d " " | xargs -I DISPLAY xrandr --output DISPLAY --brightness $VALUE
else
echo "Value needs to be between 0 and 1"
fi
@andrelugomes
andrelugomes / my-ip.sh
Created November 18, 2020 17:37
How to send my IP over Slack
#!/bin/sh
#MEU_IP=$(dig +short myip.opendns.com @resolver1.opendns.com);
#MEU_IP=$(curl ifconfig.co)
MEU_IP=$(curl 'https://api.ipify.org?format=human')
USER=$(whoami)
curl -X POST --data-urlencode \
"payload={\"channel\": \"#channel\", \"username\": \"meu-ip\", \"text\": \"$USER : $MEU_IP\", \"icon_emoji\": \":aaaa:\"}" \
https://hooks.slack.com/services/WEB_HOOK
@andrelugomes
andrelugomes / jsonToEnv.js
Last active January 20, 2021 10:59
firebase functions:config:set from .env.json file
//from https://github.com/firebase/firebase-tools/issues/406
const env = process.argv[2];
const arg = process.argv[3];
const configPath = `./.env.${env}.json`;
const collectConfigLines = (o, propPath, configLines) => {
propPath = propPath || '';
configLines = configLines || [];
@andrelugomes
andrelugomes / keybase.md
Last active April 29, 2021 12:37
keybase.md

Keybase proof

I hereby claim:

  • I am andrelugomes on github.
  • I am andrelugomes (https://keybase.io/andrelugomes) on keybase.
  • I have a public key whose fingerprint is B326 781C 6A85 5338 B361 51A7 08BA E16B 1263 B4F6

To claim this, I am signing this object: