Skip to content

Instantly share code, notes, and snippets.

@silasrm
silasrm / index.js
Last active December 20, 2025 15:13
Entendendo a api do bibliaonline.com.br (http://jsbin.com/debagax/1/edit?html,js,output)
// Total de capítulos por livro, na ordem
var totalCapitulos = [50,40,27,36,34,24,21,4,31,24,22,25,29,36,10,13,10,42,150,31,12,8,66,52,5,48,12,14,3,9,1,4,7,3,3,3,2,14,4,28,16,24,21,28,16,16,13,6,6,4,4,5,3,6,4,3,1,13,5,5,3,5,1,1,1,22];
// Livros da bíblia
var livros = [
{
number: 1,
name: "Gênesis",
slugByLang:
{
@nachoparker
nachoparker / git-forget-blob.sh
Last active December 20, 2025 15:08
Completely remove a file from a git repository with git-forget-blob
#!/bin/bash
# Completely remove a file from a git repository history
#
# Copyleft 2017 by Ignacio Nunez Hernanz <nacho _a_t_ ownyourbits _d_o_t_ com>
# GPL licensed (see end of file) * Use at your own risk!
#
# Usage:
# git-forget-blob file_to_forget
#
# Notes:
@briceburg
briceburg / mk-jwt-token
Last active December 20, 2025 15:04
mk-jwt-token -- bash shell script for generating JWT tokens. requires `openssl` and `base64` which you have.
#!/usr/bin/env bash
#
# usage: JWT_SECRET="silly" mk-jwt-token
# @WARN: modify the payload and header to your needs.
#
main(){
set -eo pipefail
[ -n "$JWT_SECRET" ] || die "JWT_SECRET environment variable is not set."
@cemizm
cemizm / aqara_fp300.py
Last active December 20, 2025 15:03
Aqara FP300 Presence Sensor
from __future__ import annotations
from dataclasses import dataclass
from typing import Any, Final
from zigpy import types as t
from zigpy.quirks.v2 import QuirkBuilder, ReportingConfig
from zigpy.quirks.v2.homeassistant import EntityType, UnitOfTime, UnitOfLength
from zigpy.quirks.v2.homeassistant.binary_sensor import BinarySensorDeviceClass
from zigpy.quirks.v2.homeassistant.number import NumberDeviceClass
@ykmm
ykmm / wraplabel.py
Last active December 20, 2025 14:52
Kivy wrap label
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from kivy.uix.label import Label
from kivy.graphics import Color
from kivy.graphics import Rectangle
from kivy.metrics import sp
from kivy.logger import Logger
from kivy.properties import ListProperty, BooleanProperty
@Patbox
Patbox / cardboard-not-so-great.md
Last active December 20, 2025 14:52
Why you shouldn't use cardboard, banner or any other "hybrid" server

By looking that you are here you most likely use Cardboard/Banner/some other weird bukkit + Fabric project (or just someone linked to it).

Don't do it, it will cause more harm/instabilities to your server than good. But let's start at the beginning.

Few definitions before we start:

  • Bukkit - It means bukkit, spigot, paper and any forks of these,
  • Cardboard - mod by IsaiahPatton that tries to port bukkit ecosystem to fabric.
  • Banner - another mod trying to make plugins work with Fabric, similar to Cardboard.
  • Fabric - a Minecraft modding platform, includes Fabric Loader and Fabric API, everything written in this gist also applies to Quilt.
  • Mods - Mods designed for fabric and compatible platforms
@jeffersongoncalves
jeffersongoncalves / jetbrains-prompt.txt
Created March 4, 2025 11:46
JetBrains AI prompt using Conventional Commits
Generate a commit message following the Conventional Commits specification. Use one of the following types:
Type Format: <type>(<scope>): <description>
Available Types:
- feat: A new feature
- fix: A bug fix
- docs: Documentation only changes
- style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
- refactor: A code change that neither fixes a bug nor adds a feature
@ubeyidah
ubeyidah / wrapper.tsx
Created December 20, 2025 14:48
Reusable React Wrapper component with Tailwind CSS and TypeScript support.
import React, { JSX } from "react";
import clsx from "clsx";
interface WrapperProps {
className?: string;
children: React.ReactNode;
as?: keyof JSX.IntrinsicElements;
id?: string;
}
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active December 20, 2025 14:48
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This does not works in browser for quests which require you to play a game! Use the desktop app to complete those.

How to use this script:

  1. Accept a quest under Discover -> Quests
  2. Press Ctrl+Shift+I to open DevTools
  3. Go to the Console tab
  4. Paste the following code and hit enter: