Skip to content

Instantly share code, notes, and snippets.

View dsfb's full-sized avatar
🎯
Focusing

Daniel Bruno dsfb

🎯
Focusing
View GitHub Profile
@dsfb
dsfb / wine_setup.md
Created January 13, 2025 01:31 — forked from RobinCPC/wine_setup.md
Wine Setup

Install Wine with Mono & Gecko in Ubuntu 20.04

Warning: Do not try those command in your main PC, I test in a virtual Machine

Note: Most of commands are from the Dockerfile in Reference section. If you want to test wine, just run their docker container

1. Setup PPA

sudo dpkg --add-architecture i386
wget -qO - https://dl.winehq.org/wine-builds/winehq.key | sudo tee /etc/apt/trusted.gpg.d/winehq.asc
@dsfb
dsfb / slides.md
Created September 1, 2024 17:31 — forked from rtimmons/slides.md
Learning C++ The Hard Way

Welcome

Who is this guy?

Goal(s)

  1. Don't WTF quite so much when looking at C++ PRs
  2. Know what you don't know (so you know what to look up to learn more)

Agenda

@dsfb
dsfb / fortran_links.md
Created August 7, 2024 03:07 — forked from ivan-pi/fortran_links.md
Resources on Fortran
@dsfb
dsfb / clean_code.md
Created July 13, 2024 21:58 — forked from wojteklu/clean_code.md
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

Sete Atitudes para Hackear a Indústria de Software

By Klaus Wuestefeld

1) Torne-se excelente.

Seja realmente bom em alguma coisa. Não fique só choramingando ou querendo progredir às custas dos outros. Não pense q pq vc sentou 4 anos numa faculdade ouvindo um professor falar sobre software q vc sabe alguma coisa. Jogador de futebol não aprende a jogar bola tendo

@dsfb
dsfb / julia_regression.py
Last active November 23, 2023 19:42 — forked from FilipeChagasDev/julia_regression.py
This code is a Python implementation of the Julia Regression method for calculating the square root of a natural number.
def sqrt_julia_regression(x, first_trial_root=1):
"""
Function that calculates the square root of an natural number using the Julia Regression Method.
For more info, see here: https://santamaria.pucminas.br/noticias/regressao-jn/
and here: https://www.terra.com.br/byte/ciencia/regressao-de-julia-genia-brasileira-de-11-anos-cria-novo-calculo-para-raiz-quadrada,a3c05efa73e8f7f085c03e8275cf3946v5q0ousw.html
.
Params:
x (int) - Natural input number
first_trial_root (int) - First root to try
Return (int): natural root found or None
@dsfb
dsfb / sqlite.py
Created February 6, 2021 12:46 — forked from ErisvaldoCorreia/sqlite.py
Criando, Inserindo e Consultando dados em SQLITE
#########################################################
# CRIANDO BANCO DE DADOS E FAZENDO UMA SIMPLES CONSULTA #
#########################################################
# importando o módulo SQLite3
import sqlite3
# conectando e criando o banco
connection = sqlite3.connect('baseDeDados.db')
cursor = connection.cursor()
@dsfb
dsfb / test.md
Created January 14, 2021 17:56 — forked from ityonemo/test.md
Zig in 30 minutes

A half-hour to learn Zig

This is inspired by https://fasterthanli.me/blog/2020/a-half-hour-to-learn-rust/

Basics

the command zig run my_code.zig will compile and immediately run your Zig program. Each of these cells contains a zig program that you can try to run (some of them contain compile-time errors that you can comment out to play with)

@dsfb
dsfb / LearnGoIn5mins.md
Created January 14, 2021 17:55 — forked from prologic/LearnGoIn5mins.md
Learn Go in ~5mins