Skip to content

Instantly share code, notes, and snippets.

View brdebr's full-sized avatar

Bryan de Oliveira Brettas brdebr

View GitHub Profile
@brdebr
brdebr / index.html
Created March 9, 2024 23:20
Set an emoji as a favicon
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2280%22>🤖</text></svg>"></link>
@brdebr
brdebr / compose.yml
Created September 16, 2023 22:47 — forked from Nielio/compose.yml
Gitlab CE with build in Container Registry behind Traefik 2 with Letsencrypt
version: "3.6"
services:
gitlab:
image: gitlab/gitlab-ce
volumes:
- gitlab-data:/var/opt/gitlab
- gitlab-logs:/var/log/gitlab
- gitlab-config:/etc/gitlab
networks:
- traefik-public
@brdebr
brdebr / sticky fingers
Created December 22, 2022 16:58
sticky fingers
namespace SpriteKind {
export const Tail = SpriteKind.create()
}
enum Direction { Up, Right, Down, Left }
const NEXT_SECTION_KEY = "__child_node"
const background = img`
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
@brdebr
brdebr / command.js
Created September 6, 2022 10:33
remove basicAuth creds from website from website
document.execCommand("ClearAuthenticationCache")
@brdebr
brdebr / groupBy.ts
Created April 4, 2022 07:36
Group by ts
export const groupByFn = <T, K extends keyof any>(
list: T[],
getKey: (item: T) => K
) =>
list.reduce((acc, el) => {
const key = getKey(el);
if (!acc[key]) acc[key] = [];
acc[key].push(el);
return acc;
}, {} as Record<K, T[]>);
@brdebr
brdebr / do-it.bat
Created March 22, 2022 11:04
Remove fancy context menu windows 11
reg add "HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32" /f /ve
@brdebr
brdebr / cmd.bat
Last active April 26, 2022 10:34
Delete folder in windows cli
rmdir /s /q node_modules
@brdebr
brdebr / dayjs duration diff
Created October 28, 2021 18:33
Diff from dates
dayjs.duration(dayjs(new Date()).diff(dayjs('09/09/2019', 'DD/MM/YYYY'))).format("YY [años] MM [meses] DD [dias] HH [horas]")
@brdebr
brdebr / cmd__here.reg
Created October 18, 2021 15:02
Add cmd to context menu
Windows Registry Editor Version 5.00
; Command Prompt
[HKEY_CLASSES_ROOT\Directory\shell\01MenuCmd]
"MUIVerb"="Terminal"
"Icon"="cmd.exe"
"ExtendedSubCommandsKey"="Directory\\ContextMenus\\MenuCmd"
[HKEY_CLASSES_ROOT\Directory\background\shell\01MenuCmd]
@brdebr
brdebr / git
Created October 8, 2021 08:12
Patch from last 2 commits
git format-patch HEAD~2..HEAD --stdout > patchfile.patch