Skip to content

Instantly share code, notes, and snippets.

View Dpbm's full-sized avatar
:shipit:
hello there!

Alexandre Dpbm

:shipit:
hello there!
View GitHub Profile

Tutorial de Instalação e Configuração do NHipster

Este tutorial irá guiá-lo através do processo de instalação e configuração do ambiente necessário para utilizar a ferramenta NHipster em máquinas como Windows, Linux e MacOS.

Nota do criado: Não é necessário instalar o NVM ou SDKMan, por isso no sumário estão como opcional, porém é obrigatório ter instalado o Java na versão 11.0.12-open e o Node na versão 14.16.x!

Sumário

@primaryobjects
primaryobjects / logic.py
Created July 31, 2021 15:16
Quantum Computing logic gates for XOR, AND, NAND, OR using Qiskit.
from qiskit import qiskit, QuantumCircuit
def execute(func):
print('0 0: {}'.format(func(0, 0)))
print('0 1: {}'.format(func(0, 1)))
print('1 0: {}'.format(func(1, 0)))
print('1 1: {}'.format(func(1, 1)))
def xor(a, b):
"""
@YoEight
YoEight / improve_fonts.md
Created January 15, 2021 10:11 — forked from j1cs/improve_fonts.md
Improve fonts archlinux

Improve Fonts

Newest

Make your Arch fonts beautiful easily! This is what I do when I install Arch Linux to improve the fonts.

You may consider the following settings to improve your fonts for system-wide usage without installing a patched font library packages (eg. Infinality):

Install some fonts, for example:
sudo pacman -S ttf-dejavu ttf-liberation noto-fonts

@umanghome
umanghome / publish.yml
Last active May 12, 2024 14:27
GitHub Action: Generate a build and push to another branch
# .github/workflows/publish.yml
name: Generate a build and push to another branch
on:
push:
branches:
- master # Remove this line if your primary branch is "main"
- main # Remove this line if your primary branch is "master"
jobs:
@growlnx
growlnx / CMakeLists.txt
Last active May 12, 2024 23:37
GLIB with cmake
PROJECT(project C)
CMAKE_MINIMUM_REQUIRED(VERSION 3.1.0)
FIND_PACKAGE(PkgConfig REQUIRED)
PKG_CHECK_MODULES(GLIB REQUIRED glib-2.0)
INCLUDE_DIRECTORIES(
src/include/
@wldomiciano
wldomiciano / circle-drawing.c
Created May 23, 2019 23:23
Drawing a normal and filled circle with SDL 2
#include <SDL.h>
SDL_Window* window;
SDL_Renderer* renderer;
void drawCircle(int xc, int yc, int x, int y) {
SDL_RenderDrawPoint(renderer, xc + x, yc + y);
SDL_RenderDrawPoint(renderer, xc - x, yc + y);
SDL_RenderDrawPoint(renderer, xc + x, yc - y);
@hmps
hmps / gist:3c58f2e75d2d64233c66344561347241
Last active February 20, 2024 11:51
TMUX config and keybindings

Key bindings

So ~/.tmux.conf overrides default key bindings for many action, to make them more reasonable, easy to recall and comforable to type.

Let's go through them.

If you are an iTerm2 user, third column describes the keybinding of similar "action" in iTerm2. It's possible to reuse very same keys you already get used to and tell iTerm2 to execute analogous tmux actions. See iTerm2 and tmux integration section below.

@rene-d
rene-d / colors.py
Last active May 17, 2024 03:47
ANSI color codes in Python
# SGR color constants
# rene-d 2018
class Colors:
""" ANSI color codes """
BLACK = "\033[0;30m"
RED = "\033[0;31m"
GREEN = "\033[0;32m"
BROWN = "\033[0;33m"
BLUE = "\033[0;34m"
@Leo-Lima-Mar
Leo-Lima-Mar / clean-code-resumo.md
Last active January 9, 2024 23:03
Resumo de parte do livro Clean Code

Clean Code

Aqui estão listadas algumas das principais recomendações do livro Clean Code - Robert C. Martin, 2008

2) Meaningful Names

Use Intention-Revealing names

Avoid Disinformation

  • Não adicionar o tipo da variável no seu nome.
    Ex: accountList.
  • Não utilizar nomes parecidos.
@yellowbyte
yellowbyte / compiling_asm.md
Last active May 15, 2024 07:32
how to assemble assembly with NASM assembler to 32-bit or 64-bit ELF binary with or without libc

32-bit ELF binary

how to assemble and link:

nasm -f elf32 -o <filename>.o <filename>.asm
ld -m elf_i386 -o <filename> <filename>.o

template code (hello world):

section .text
global _start