Skip to content

Instantly share code, notes, and snippets.

View debemdeboas's full-sized avatar
:fishsticks:

rafael de bem debemdeboas

:fishsticks:
View GitHub Profile
@debemdeboas
debemdeboas / run.sh
Created October 23, 2018 23:30
VHDL Compiler and Simulator
#!/bin/bash
echo "Checking syntax..."
ghdl -s --ieee=synopsys full_adder.vhd cla_4bits.vhd sum_cla_8b.vhd sub_cla_8b.vhd cod.vhd ULA.vhd ULA_tb.vhd
ghdl -a --ieee=synopsys full_adder.vhd cla_4bits.vhd sum_cla_8b.vhd sub_cla_8b.vhd cod.vhd ULA.vhd ULA_tb.vhd
echo "Generating executable file..."
ghdl -e --ieee=synopsys ulatb
ghdl -r --ieee=synopsys ulatb --vcd=ulatbwave.vcd
echo "Opening gtkwave..."
gtkwave -o -g ulatbwave.vcd
@debemdeboas
debemdeboas / .omp_theme
Created August 18, 2021 13:18
Powerline setup
# Source this on your ~/.bash_profile or .bashrc or .profile
eval "$(oh-my-posh --init --shell bash --config ~/.poshthemes/powerlevel10k_rainbow.omp.json)"
@debemdeboas
debemdeboas / invoke_subprocess.cpp
Last active January 21, 2022 23:23
Invoke subprocess and capture output
#include <cstdio>
#include <iostream>
#include <memory>
#include <stdexcept>
#include <array>
const std::string InvokeSubprocess(const std::string strTargetSubprocess) {
std::array<char, 128> arBuffer;
std::string strResult;
@debemdeboas
debemdeboas / install_docker.sh
Last active January 21, 2022 23:20
Install Docker on Ubuntu
# https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository
echo "Installing Docker engine from the APT repository"
sudo apt update
sudo apt install \
ca-certificates \
curl \
gnupg \
lsb-release -y
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
@debemdeboas
debemdeboas / mongodb_cheat_sheet.md
Last active January 22, 2022 00:24 — forked from bradtraversy/mongodb_cheat_sheet.md
MongoDB Cheat Sheet

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

@debemdeboas
debemdeboas / launch.json
Created July 11, 2024 18:26
VSCode + Zig
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "(gdb) Launch",
"type": "cppdbg",
"request": "launch",