Skip to content

Instantly share code, notes, and snippets.

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

Elio eliocapelati

👋
Hello world!
View GitHub Profile

Games

  • Global Capitals Guessing game for global capitals that on every attempt it pins you on the new attempt with information of its getting hot or cold based on the proximity.
  • Metazooa Your goal is to figure out today's Animal in as few guesses as possible. Wrong guesses will narrow down the answer by taxonomic rank (kingdom, phylum, class, order, etc.) The more your guess has in common with the answer, the more you will learn about the Animal.
  • Metaflora Your goal is to figure out today's Mystery Plant in as few guesses as possible. Wrong guesses will narrow down the answer by taxonomic rank (kingdom, phylum, class, order, etc.) The more your guess has in common with the answer, the more you will learn about the Mystery Plant.
  • Framed Daily movie guessing game, every day a new movie you can try to guess with 6 attempts based on a scene.
  • JekBox Every turn one pla
# Global loading of all files in ~/.pry
begin
Dir["#{File.expand_path("~")}/.pry/*.rb"].each { |file| load file }
rescue StandardError => e
puts "Error loading custom pry files: #{e.message}"
ensure
puts "Custom Pry finish loading."
end
@eliocapelati
eliocapelati / 4panes.py
Last active October 17, 2024 21:35
open 4 panes in the same window using the current session and execute a command there. This is super handy when working in a project with multiple steps required to run and monitor it. Check out here how to use it: https://iterm2.com/python-api/tutorial/running.html
import iterm2
WORKING_DIRECTORY = "/path/to/your/folder"
async def main(connection):
app = await iterm2.async_get_app(connection)
window = app.current_terminal_window
if window is not None:
# Get the current session (pane)
@eliocapelati
eliocapelati / .alias99
Created September 23, 2024 22:27
Find and kill Rails process running on top of puma
function killr(){
ps -ef | grep puma | awk '{print $2}' | xargs kill -9 >> /dev/null 2>&1
}

Sunday, 01 Sep 2024

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'
Pry.commands.alias_command 'e', 'exit'
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'