Skip to content

Instantly share code, notes, and snippets.

View petronetto's full-sized avatar
🤖
What's up human?

Juliano Petronetto petronetto

🤖
What's up human?
View GitHub Profile
@petronetto
petronetto / ssm2env
Created July 31, 2023 11:09 — forked from naoty/ssm2env
Create .env file from SSM parameter store
#!/bin/bash -e
aws ssm get-parameters-by-path \
--path "/myapp/" \
--with-decryption \
--query "Parameters[*].[Name,Value]" \
--output text |
while read line
do
name=$(echo ${line} | cut -f 1 -d ' ' | sed -e 's/\/myapp\///g')
@petronetto
petronetto / read_dotenv_and_create_parameter_store_on_aws.sh
Created July 31, 2023 11:08 — forked from almerindo/read_dotenv_and_create_parameter_store_on_aws.sh
Bash script to read .env and creates parameter store on aws.
#! /bin/bash
ENVS=$(egrep -v '^#' .env | xargs)
ARRAY_ENVS=($(echo $ENVS | tr ' ' ' '))
prop="name"
APP_NAME="$(node -pe "require('./package.json')['$prop']")"
TOTAL="${#ARRAY_ENVS[@]}"
TOTAL=$((TOTAL - 1))
<?php
/*
* This document has been generated with
* https://mlocati.github.io/php-cs-fixer-configurator/#version:3.12.0|configurator
* you can change this configuration by importing this file.
*/
$config = new PhpCsFixer\Config();
return $config
->setRiskyAllowed(true)
@petronetto
petronetto / nerd_fonts.sh
Created April 3, 2023 15:06 — forked from davidteren/nerd_fonts.md
Install Nerd Fonts via Homebrew [updated & fixed]
# Nerd Fonts for your IDE
# https://www.nerdfonts.com/font-downloads
brew tap homebrew/cask-fonts && brew install --cask font-3270-nerd-font
brew tap homebrew/cask-fonts && brew install --cask font-fira-mono-nerd-font
brew tap homebrew/cask-fonts && brew install --cask font-inconsolata-go-nerd-font
brew tap homebrew/cask-fonts && brew install --cask font-inconsolata-lgc-nerd-font
brew tap homebrew/cask-fonts && brew install --cask font-inconsolata-nerd-font
brew tap homebrew/cask-fonts && brew install --cask font-monofur-nerd-font
brew tap homebrew/cask-fonts && brew install --cask font-overpass-nerd-font
@petronetto
petronetto / .zshrc
Created January 27, 2023 13:10 — forked from bashbunni/.zshrc
CLI Pomodoro for Linux
# study stream aliases
# Requires https://github.com/caarlos0/timer to be installed. spd-say should ship with your distro
declare -A pomo_options
pomo_options["work"]="45"
pomo_options["break"]="10"
pomodoro () {
if [ -n "$1" -a -n "${pomo_options["$1"]}" ]; then
val=$1
@petronetto
petronetto / .vimrc
Created February 4, 2022 13:44 — forked from miguelgrinberg/.vimrc
My .vimrc configuration for working in Python with vim
" plugins
let need_to_install_plugins = 0
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
let need_to_install_plugins = 1
endif
call plug#begin()
Plug 'tpope/vim-sensible'
@petronetto
petronetto / tmux-cheat-sheet.md
Created September 26, 2019 11:09 — forked from michaellihs/tmux-cheat-sheet.md
tmux Cheat Sheet
@petronetto
petronetto / Mac OS X: Open in Visual Studio Code
Created May 9, 2018 23:39 — forked from tonysneed/Mac OS X: Open in Visual Studio Code
Add a command to Finder services in Mac OSX to open a folder in VS Code
- Open Automator
- File -> New -> Service
- Change "Service Receives" to "files or folders" in "Finder"
- Add a "Run Shell Script" action
- Change "Pass input" to "as arguments"
- Paste the following in the shell script box: open -n -b "com.microsoft.VSCode" --args "$*"
- Save it as something like "Open in Visual Studio Code"
curl -OL http://ftpmirror.gnu.org/libtool/libtool-2.4.2.tar.gz
tar -xzf libtool-2.4.2.tar.gz
cd libtool-2.4.2
./configure && make && sudo make install
# brew install 'https://raw.github.com/simonair/homebrew-dupes/e5177ef4fc82ae5246842e5a544124722c9e975b/ab.rb'
# brew test ab
curl -O https://archive.apache.org/dist/httpd/httpd-2.4.2.tar.bz2
tar zxvf httpd-2.4.2.tar.bz2
@petronetto
petronetto / iterm2-solarized.md
Created April 16, 2017 05:32 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Meslo powerline font + [Powerlevel9k] - (macOS)

Default

Default

Powerlevel9k

Powerlevel9k