Skip to content

Instantly share code, notes, and snippets.

View ogabrielp's full-sized avatar

Gabriel Costa ogabrielp

  • Stem.is
  • Rio de Janeiro - Brazil
  • 01:43 (UTC -03:00)
View GitHub Profile
create-remix () {
# Run the default script
bunx create-remix@latest "$1" --package-manager bun --install --git-init && cd "$1"
# Add Biome
bun add --dev --exact @biomejs/biome
# Stage and commit
git add bun.lockb package.json && git commit -m "Add Biome as dep"
# Setup Biome
bunx @biomejs/biome init
# Stage and commit
@ogabrielp
ogabrielp / react-parcel.sh
Last active August 15, 2024 19:10
Setup minimal React with Parcel
# References:
# 1. https://blog.logrocket.com/build-component-library-react-typescript/
# 2. https://parceljs.org/recipes/react/
# You can run this function by using
# $ react-parcel your-project-name
#
# And then run the standard command to start it:
# $ npm run dev
@ogabrielp
ogabrielp / miojo.py
Last active December 1, 2021 19:51
miojo
def get_minimum_time_to_prepare(t, a, b):
# Validar os parametros ne familia
if t < 0 or a < 0 or b < 0:
raise ValueError('tempo negativo amigo?')
if t > a and t > b:
raise ValueError('t tem que ser menor que a ou b.')
# Se alguma das ampulhetas for exatamente o tempo que ele precisa retorna direto
if t == a:
return a
@ogabrielp
ogabrielp / netflixSkip.js
Created May 5, 2020 15:42
Skips Netflix intros and "continue watching" messages
function checkInterrupter() {
if ($(".interrupter-actions") && $(".interrupter-actions").children.length > 0) {
$(".interrupter-actions").children[0].click()
}
}
function checkSkipIntro() {
if ($(".skip-credits") && $(".skip-credits").children.length > 0) {
$(".skip-credits").children[0].click()
}