Skip to content

Instantly share code, notes, and snippets.

View brunos3d's full-sized avatar
:shipit:
hunting bytes 🏹

Bruno Silva brunos3d

:shipit:
hunting bytes 🏹
View GitHub Profile
@soderlind
soderlind / README.md
Last active April 11, 2026 15:59
Ralph loop wrapper for GitHub Copilot CLI (programmatic mode)
β €β €β €β €β €β €β£€β£€β£Άβ‘Άβ’›β Ÿβ‘Ώβ »β’»β’Ώβ’Άβ’¦β£„β‘€β €β €β €β €β €β €β €β €β €β €
β €β €β €β’€β£ β‘Ύβ‘«β’Šβ Œβ‘β’‘β Šβ’°β β‘Žβ ˜β‘„β’’β ™β‘›β‘·β’€β‘€β €β €β €β €β €β €β €
β €β €β’ β’ͺβ’‹β‘žβ’ β ƒβ‘œβ €β Žβ €β ‰β €β ƒβ €β ƒβ €β ƒβ ™β ˜β Šβ’»β ¦β €β €β €β €β €β €
β €β €β’‡β‘‡β‘œβ €β œβ €β β €β’€β ”β ‰β ‰β ‘β „β €β €β‘°β Šβ ‰β ‘β‘„β‘‡β €β €β €β €β €β €
β €β €β‘Έβ §β „β €β €β €β €β €β ˜β‘€β Ύβ €β €β£Έβ €β €β’§β €β ›β €β Œβ‘‡β €β €β €β €β €β €
β €β ˜β‘‡β €β €β €β €β €β €β €β €β ™β ’β ’β šβ β ˆβ ‰β ²β‘β ’β ˆβ €β‘‡β €β €β €β €β €β €
β €β €β ˆβ ²β£†β €β €β €β €β €β €β €β €β£ β –β ‰β‘Ήβ €β Άβ β €β €β €β ˆβ’¦β €β €β €β €β €
β €β €β €β €β ˆβ£¦β‘€β €β €β €β €β §β£΄β β €β ˜β “β’²β£„β£€β£€β£€β‘€β ”β ƒβ €β €β €β €β €
β €β €β €β €β£œβ €β ˆβ “β ¦β’„β£€β£€β£Έβ €β €β €β €β β’ˆβ’‡β£Όβ‘β €β €β €β €β €β €β €β €
@mjbalcueva
mjbalcueva / password-input.tsx
Last active February 20, 2026 14:52
shadcn ui custom password input
'use client'
import * as React from 'react'
import { EyeIcon, EyeOffIcon } from 'lucide-react'
import { Button } from '@/components/ui/button'
import { Input, type InputProps } from '@/components/ui/input'
import { cn } from '@/lib/utils'
const PasswordInput = React.forwardRef<HTMLInputElement, InputProps>(({ className, ...props }, ref) => {
@lacolaco
lacolaco / 1.ngx-reactify.tsx
Last active September 15, 2025 04:33
A React component to render a standalone Angular component (Angular v14.2 is required)
import { ApplicationRef, ComponentRef, createComponent, Type } from "@angular/core";
import { createApplication } from "@angular/platform-browser";
import React, { useEffect, useRef, useState } from "react";
type AnyComponentRef = ComponentRef<unknown>;
export type ReactifyProps = {
component: Type<unknown>;
inputs?: Record<string, unknown>;
};
/*
{
"compilerOptions": {
"baseUrl": ".",
"outDir": "build/dist",
"module": "esnext",
"target": "es6",
"lib": [
"es2019",
"dom",
@mukaschultze
mukaschultze / arch.md
Last active April 22, 2026 13:54
Free Arch Linux on GCP
@mukaschultze
mukaschultze / loopback_bind.md
Last active January 2, 2025 00:30
Acessando serviΓ§os no docker sem expor as portas publicamente

Acessando serviΓ§os no docker sem expor as portas publicamente

Expondo portas apenas no loopback

Com Docker Γ© possΓ­vel configurar um container para que ele ouΓ§a conexΓ΅es Γ  uma porta apenas em um IP por meio da opΓ§Γ£o publish, no formato ip:hostPort:containerPort. Isso impede que conexΓ΅es sejam feitas por outros IPs sejam aceitas.

Se configurarmos o container para ouvir apenas no IP de loopback (127.0.0.1),

@jordienr
jordienr / Gradient.js
Created September 12, 2021 00:23
Stripe Mesh Gradient WebGL
/*
* Stripe WebGl Gradient Animation
* All Credits to Stripe.com
* ScrollObserver functionality to disable animation when not scrolled into view has been disabled and
* commented out for now.
* https://kevinhufnagl.com
*/
@mukaschultze
mukaschultze / rxjs-hooks.ts
Created September 5, 2021 19:39
RxJS hooks for React
import { useEffect, useRef, useState } from "react";
import { BehaviorSubject, Observable, PartialObserver, Subject } from "rxjs";
function useConstant<T>(factory: () => T): T {
const ref = useRef<{ value: T }>();
if (!ref.current) {
ref.current = { value: factory() };
}
  1. Install @module-federation/nextjs-mf.
yarn add @module-federation/nextjs-mf
  1. Add resolutions to package.json:
  "resolutions": {
@Froelund
Froelund / _error.tsx
Last active November 30, 2023 04:35
Next.js Typescript error reporting
import { captureException, flush } from '@sentry/nextjs';
import NextErrorComponent from 'next/error';
import type { ErrorProps } from 'next/error';
import type { NextPage } from 'next';
interface AppErrorProps extends ErrorProps {
err?: Error;
hasGetInitialPropsRun?: boolean;
}