Skip to content

Instantly share code, notes, and snippets.

View Grabber's full-sized avatar

Luiz Vitor Martinez Cardoso Grabber

View GitHub Profile
@Grabber
Grabber / a.py
Last active June 29, 2023 19:34
virtualized list, equations and testing!
import math
import random
elt_offsets = []
elts = ['a', 'b', 'c', 'd']
m = 176
mx = 0
# pre-render, best height approximation
@Grabber
Grabber / settings.json
Last active July 10, 2023 23:47
Zed Editor / settings
{
"theme": "Atelier Sulphurpool Dark",
"buffer_font_size": 12,
"hard_tabs": false,
"tab_size": 2,
"auto_update": true,
"remove_trailing_whitespace_on_save": false,
"projects_online_by_default": false,
"blinking": "off",
"format_on_save": "off",
@Grabber
Grabber / main.go
Last active December 6, 2023 23:54
Golang / sync.WaitGroup / data race investigation with nested structs
package main
import (
"fmt"
"sync"
"time"
)
type Session struct {
Id string
@Grabber
Grabber / OSX.md
Last active March 27, 2024 14:50
OSX: speed-up by disabling useless animations and features
defaults write -g NSScrollViewRubberbanding -int 0
defaults write com.apple.desktopservices DSDontWriteNetworkStores true
defaults write com.apple.Dock autohide-delay -float 0
defaults write com.apple.dock autohide-time-modifier -int 0
defaults write com.apple.finder DisableAllAnimations -bool true
defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool false
defaults write NSGlobalDomain NSWindowResizeTime .001
package main
type S struct {
Id string
}
var Sessions = make(map[string][]*S)
func main() {
sess_1 := &S{Id: "001"}
@Grabber
Grabber / main.cc
Created December 6, 2025 03:39
C/C++: unsync stdio and untie cin/cout.
#include <iostream>
// g++ main.cc -o main; ./main
static const auto fast = [](){
std::ios::sync_with_stdio(false);
std::cin.tie(nullptr);
return 0;
}();