Skip to content

Instantly share code, notes, and snippets.

View eliocapelati's full-sized avatar
👋
Hello world!

Elio eliocapelati

👋
Hello world!
View GitHub Profile
if defined?(PryByebug)
Pry.config.pager = false
Pry.commands.alias_command 'c', 'continue'
Pry.commands.alias_command 's', 'step'
Pry.commands.alias_command 'n', 'next'
end
@eliocapelati
eliocapelati / languagetool.sh
Last active January 7, 2024 20:32
Grammarly replacement
#!/usr/bin/env bash
echo "Installing Language Tool server using brew" &&
brew install languagetool &&
echo "Starting Language Tool Service" &&
brew services start languagetool
# install the browser extension from: https://languagetool.org/#firefox_chrome
# Go to extension options > advanced > LanguageTool server > Select "Local server (localhost) - requires LanguageTool server running locally"
@eliocapelati
eliocapelati / git-alias.sh
Created November 18, 2022 18:26
Create a log line for visualizing commit log tree, ref:https://ma.ttias.be/pretty-git-log-in-one-line/
git config --global alias.logline "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
@eliocapelati
eliocapelati / download_audios.sh
Created March 17, 2022 12:53
Download audio files of book IELTS, 4th Edition freely available on: https://barronsbooks.com/tp/ielts/audio/index_d83rd2.html
#!/usr/bin/env bash
## Download audio files of book:
## IELTS, 4th Edition
## freely available on: https://barronsbooks.com/tp/ielts/audio/index_d83rd2.html
# https://barronsbooks.com/tp/ielts/audio/d83rd2/Track%2001.mp3
@eliocapelati
eliocapelati / definition.yaml
Created October 27, 2021 20:30
Team definition
openapi: '3.0.0'
info:
title: API Teams
version: '1.0'
description: API for managing Teams
contact:
name: Elio Capelati Junior
email: eliocapelati@gmail.com
servers:
- url: 'http://localhost:8080/v1'
import time
def recursive_fib_memo(val, memo):
if val <= 1:
return val
elif val not in memo:
memo[val] = recursive_fib_memo(val - 2, memo) + recursive_fib_memo(val - 1, memo)
return memo[val]
@eliocapelati
eliocapelati / bluetooh_defibrillator.sh
Created February 18, 2021 13:22
Restart bluetooh service on Mac
#!/bin/bash
sudo launchctl stop com.apple.bluetoothd
sudo launchctl start com.apple.bluetoothd
livenessProbe:
httpGet:
path: /actuator/health
port: 8080
scheme: HTTP
initialDelaySeconds: 60
failureThreshold: 5
timeoutSeconds: 5
periodSeconds: 20
readinessProbe:
@eliocapelati
eliocapelati / gist:b5a5b4ceed5cde209afe907d607b7e2a
Created February 2, 2019 13:56
Turn on show hidden files (like dotenv) in Finder.
defaults write com.apple.finder AppleShowAllFiles YES
@eliocapelati
eliocapelati / keybindings.json
Last active December 26, 2018 13:05
VSCODE Key Bind for UpperCase and LowerCase
[
{
"key": "cmd+t l",
"command": "editor.action.transformToLowercase",
"when" : "editorTextFocus"
},
{
"key": "cmd+t u",
"command": "editor.action.transformToUppercase",
"when" : "editorTextFocus"