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
@coltenkrauter
coltenkrauter / fix-wsl2-dns-resolution.md
Last active March 14, 2026 13:41
Fix DNS resolution in WSL2

Permanent WSL DNS Fix (WSL 2.2.1+)

If you're encountering ping github.com failing inside WSL with a Temporary failure in name resolution, you're not alone — this has been a long-standing issue, especially when using VPNs or corporate networks.

This issue is now fixed robustly with DNS tunneling, which preserves dynamic DNS behavior and avoids limitations like WSL’s former hard cap of 3 DNS servers in /etc/resolv.conf.

DNS tunneling is enabled by default in WSL version 2.2.1 and later, meaning that if you're still seeing DNS resolution issues, the first and most effective fix is simply to upgrade WSL. Upgrading WSL updates the WSL platform itself, but does not affect your installed Linux distributions, apps, or files.

To upgrade WSL, follow these steps,

" Specify a directory for plugins
call plug#begin('~/.vim/plugged')
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'scrooloose/nerdtree'
"Plug 'tsony-tsonev/nerdtree-git-plugin'
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
Plug 'ryanoasis/vim-devicons'
Plug 'airblade/vim-gitgutter'

Artigo Metodologia de Pesquisa em SI

Título

Relato de desenvolvimento de emulador NES usando Rust Relato do uso da linguagem Rust no desenvolvimento de um emulador de NES

Autores

Samuel M. Schultze samuelschultze@gmail.com

Manual de estilo

@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;
}
  1. Install @module-federation/nextjs-mf.
yarn add @module-federation/nextjs-mf
  1. Add resolutions to package.json:
  "resolutions": {
@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() };
}
@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 / 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),

@mukaschultze
mukaschultze / arch.md
Last active February 18, 2025 14:20
Free Arch Linux on GCP
/*
{
"compilerOptions": {
"baseUrl": ".",
"outDir": "build/dist",
"module": "esnext",
"target": "es6",
"lib": [
"es2019",
"dom",