Skip to content

Instantly share code, notes, and snippets.

View crissilvaeng's full-sized avatar

Cristina Silva crissilvaeng

View GitHub Profile
@crissilvaeng
crissilvaeng / README.md
Created May 9, 2016 19:40
Padrão e mensagens de commit.

Styleguides

Mensagens de commit styleguide

  • Usar modo imperativo ("Adiciona feature" não "Adicionando feature" ou "Adicionada feature")
  • Primeira linha deve ter no máximo 72 caracteres
  • Considere descrever com detalhes no corpo do commit
  • Considere usar um emoji no início da mensagem de commit

Emoji | Code | Commit Type

@crissilvaeng
crissilvaeng / .devcontainer_devcontainer.json
Created July 10, 2025 23:37
A ready-to-code Elixir/Phoenix/Erlang dev environment using VS Code Dev Containers, Docker Compose, and PostgreSQL. Includes automatic setup, common utilities, and recommended extensions for a seamless onboarding and development experience.
{
"name": "boilerplate-dev",
"dockerComposeFile": "docker-compose.yml",
"service": "elixir",
"workspaceFolder": "/workspace",
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {
"installZsh": "true",
"configureZshAsDefaultShell": "true",
"installOhMyZsh": "true",
@crissilvaeng
crissilvaeng / Makefile
Created October 6, 2024 04:17
Golang Makefile
APP_NAME ?= $(shell basename `go list`)
GOPRIVATE ?= $(dir $(shell go list))*
LOCAL := $(dir $(shell go list))
OUTPUT := $(CURDIR)/out
SOURCES := $(shell find . -type f -name '*.go' -not -path "./vendor/*")
TOOLS := goimports golangci-lint
SHELL := /bin/bash
@crissilvaeng
crissilvaeng / docker-compose.yaml
Last active February 10, 2024 05:06
Pi-hole (docker+macvlan+ipv6)
version: '3'
services:
app:
image: jacklul/pihole:latest
environment:
TZ: America/Sao_Paulo
FTLCONF_LOCAL_IPV4: 192.168.0.10
FTLCONF_LOCAL_IPV6: 2804:14d:5c5a:a96a::10
DNSSEC: true
@crissilvaeng
crissilvaeng / Vagrantfile
Created March 16, 2019 02:28
Puppet Lab with Vagrant
# -*- mode: ruby -*-
# vi: set ft=ruby :
$script = <<-SCRIPT
wget https://apt.puppetlabs.com/puppetlabs-release-pc1-xenial.deb
dpkg -i puppetlabs-release-pc1-xenial.deb
apt-get update
SCRIPT
$server = <<-SCRIPT
SCRIPTS := scripts/cmd
CMD := $(sort $(basename $(notdir $(wildcard $(SCRIPTS)/*.sh))))
.DEFAULT_GOAL := help
.PHONY: help $(CMD) scripts
SHELL := /bin/bash
.ONESHELL:
.EXPORT_ALL_VARIABLES:
@crissilvaeng
crissilvaeng / README.md
Last active April 5, 2023 18:58
PDF to MP3

Audiobook Generator

This script converts a PDF file into an audiobook by extracting its text content and organizing it into chapters. It then uses a text-to-speech engine to generate audio files for each chapter and saves them in a specified output folder. The script takes a PDF file as input and allows users to set an optional output folder. It uses the PyMuPDF library for PDF processing, the re library for regular expressions, and the pyttsx3 library for text-to-speech conversion.

Installation

Follow these steps to install the required dependencies:

sudo apt update
@crissilvaeng
crissilvaeng / keybase.md
Created December 23, 2022 16:49
keybase.md

Keybase proof

I hereby claim:

  • I am crissilvaeng on github.
  • I am crissilvaeng (https://keybase.io/crissilvaeng) on keybase.
  • I have a public key ASCfEFRXivc3yNwHQhyho0GDFhw-nH-FmIUga8pDdhczHwo

To claim this, I am signing this object:

@crissilvaeng
crissilvaeng / main.rs
Created October 24, 2022 18:38
Exercism Poker Card to Cactus Kev's Poker Card
let mut chars = val.chars();
let suit = chars.next_back().unwrap().to_string();
let rank = chars.as_str();
let mut card: u32 = 0;
card |= match rank {
"2" => 1 << 16 ^ (0 << 8) + 2,
"3" => 1 << 17 ^ (1 << 8) + 3,
"4" => 1 << 18 ^ (2 << 8) + 5,
"5" => 1 << 19 ^ (3 << 8) + 7,
@crissilvaeng
crissilvaeng / alias
Last active October 21, 2021 01:54
Git Aliases
close = !sh -c 'git branch -d $1' -
local = rev-parse --abbrev-ref HEAD
swap = !sh -c 'git switch -c $1 --track origin/\"$(git local)\"' -
sync = pull --rebase --autostash