Skip to content

Instantly share code, notes, and snippets.

View bruhtus's full-sized avatar
🤔
¯\_(ツ)_/¯

Robertus Chris bruhtus

🤔
¯\_(ツ)_/¯
View GitHub Profile
@bruhtus
bruhtus / file-open-write.c
Created October 12, 2025 04:35
file-open-and-write-in-c
#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
#include <string.h>
int main()
{
int fd = open("./file.db", O_RDWR | O_CREAT, 0644);
if (fd == -1) {
@bruhtus
bruhtus / errno-example.c
Created October 9, 2025 06:24
errno-example-in-c
#include <stdio.h>
#include <fcntl.h>
int main()
{
int fd = open("./anu", O_RDONLY);
if (fd == -1) {
perror("anu");
return -1;
@bruhtus
bruhtus / double-pointer.c
Last active October 10, 2025 04:55
double-pointer-in-c
#include <stdio.h>
#include <stdlib.h>
enum status_t {
STATUS_GOOD,
STATUS_BAD,
};
enum status_t resize(int **data, int len)
{
@bruhtus
bruhtus / pyrightconfig.json
Last active March 11, 2025 00:04
example-pyright-config
{
"venvPath": "./apps/api/",
"venv": ".venv",
"typeCheckingMode": "basic",
"reportGeneralTypeIssues": "warning",
"reportArgumentType": "warning",
"reportCallIssue": "warning",
"reportPropertyTypeMismatch": "warning",
"reportImportCycles": "warning",
"reportUnusedImport": "warning",

Notes from The Effective Engineer by Edmond Lau

Foreword

While, in theory, product managers are judged on the success of the products they work on, in practice, large companies also judge product managers on their ability to manage all the people and departments that have a stake in a product's outcome.

At software companies that aren't as enlightened as Google, product managers

Check if locate command exist with this command:

command -v locate

If the command above return a path, like /usr/bin/locate, then we can use this command:

locate Xorg

and check something like Xorg.*.log, for example: Xorg.0.log, Xorg.1.log, and so on.

@bruhtus
bruhtus / exclude.list
Created October 14, 2023 05:00
timeshift-rsync-exclude-list
/dev/*
/proc/*
/sys/*
/media/*
/mnt/*
/tmp/*
/run/*
/var/run/*
/var/lock/*
/var/lib/dhcpcd/*
" function! EchoQuote(quote, ...)
" echo a:quote
" echo a:2
" echo a:1
" endfunction
" let Example = function('EchoQuote')
" let s:quote = 'something'
" let Something = call(Example, [s:quote, '1969', 'anu'])
" echo string(Example)
" before split up
call plug#begin()
Plug 'vimwiki/vimwiki'
Plug 'xtal8/traces.vim'
Plug 'tpope/vim-surround'
Plug 'luochen1990/rainbow'
Plug 'airblade/vim-rooter'
Plug 'tpope/vim-commentary'
Plug 'lambdalisue/fern.vim'
Plug 'junegunn/seoul256.vim'
#!/bin/sh
which vim || sudo pacman -S gvim
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
wget https://raw.githubusercontent.com/bruhtus/dotfiles/master/.vimrc
printf '\n' | vim +PlugInstall +qall 2> /dev/null