Skip to content

Instantly share code, notes, and snippets.

View MrVideo's full-sized avatar

Mario Merlo MrVideo

View GitHub Profile
@MrVideo
MrVideo / GCC_Vulkan_Windows_Guide.md
Last active November 20, 2024 12:05
Setup GCC and Make to compile Vulkan/GLFW projects on Windows without an IDE

GCC and GNU Make Setup for Vulkan/GLFW projects on Windows without Visual Studio or other IDEs

This guide is meant to let you compile and run C++ projects made with Vulkan and GLFW on Windows machines without the need to set up Visual Studio or other IDEs first. This all works from the command line, so that you can both compile cross-platform and use the tools you prefer for your development.

Important note!

This guide was made specifically for a Computer Graphics project at Politecnico di Milano, thus the compilation script provided uses some header files in a directory called headers. You can simply remove it if you are not working on the same project, as all other steps are supposed to be general for Vulkan and GLFW on any Windows 11 installation.


@MrVideo
MrVideo / Robotics;Notes.md
Last active April 11, 2024 15:31
Robotics;Notes (Robotics 2024 @ PoliMi)

Notes on Robotics and ROS

The computation graph

The Computation Graph is the P2P network of ROS processes that are processing data together.

The executable units in ROS are called nodes. They are Python scripts or compiled C++ programs that perform some type of computation.

Nodes exchange information through the Computation Graph thanks to the master, which acts similarly to an event dispatcher in a publish-subscribe architecture.

@MrVideo
MrVideo / coinor-cbc-arm64-setup.md
Created January 9, 2024 18:19
A brief guide to set up CBC for ARM-based PCs

How to use Python-MIP on M1 Macs (and other ARM PCs)

If you've been encountering this error when using Python-MIP:

An error occurred while loading the CBC library:	 cannot load library '/opt/homebrew/lib/python3.11/site-packages/mip/libraries/cbc-c-darwin-x86-64.dylib': dlopen(/opt/homebrew/lib/python3.11/site-packages/mip/libraries/cbc-c-darwin-x86-64.dylib, 0x0002): tried: '/opt/homebrew/lib/python3.11/site-packages/mip/libraries/cbc-c-darwin-x86-64.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/lib/python3.11/site-packages/mip/libraries/cbc-c-darwin-x86-64.dylib' (no such file), '/opt/homebrew/lib/python3.11/site-packages/mip/libraries/cbc-c-darwin-x86-64.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')).  Additionally, ctypes.util.find_library() did not manage to locate a library called '/opt/homebrew/lib/python3.11/site-packages/mip/libraries/cbc-c-darwin-x86-64.dylib
@MrVideo
MrVideo / wake_up_neo_it-IT_Mac.txt
Created March 9, 2023 11:29
A small Rubber Ducky script to recreate a Matrix scene
REM Add a custom keyboard ID to avoid assisted keyboard setup
ID VendorID:DeviceID
DEFAULT_DELAY 100
REM Open terminal
GUI SPACE
DELAY 250
STRING terminal
DELAY 500
ENTER
@MrVideo
MrVideo / Esercitazione4.sql
Created November 17, 2022 21:59
Esercitazione 4 SQL AA 22/23 Politecnico di Milano (MySQL)
-- Creazione schema database
CREATE DATABASE E1;
-- Creazione tabelle database
CREATE TABLE Insegnante(
Matricola INT PRIMARY KEY,
Nome VARCHAR(64) NOT NULL,
Cognome VARCHAR(64) NOT NULL,
Citta VARCHAR(64),
Stipendio INT NOT NULL
@MrVideo
MrVideo / packettracer.md
Created November 25, 2021 22:12
Packet Tracer guide from the FCI 2020/2021 course at Politecnico di Milano

Packet Tracer

Privilege Hierarchy

  • User Exec Mode: basic commands and system information
    • show <?>: Obtain information
      • cdp: CDP information
      • clock: Display the system clock
      • controllers: Interface controllers status
  • frame-relay: Frame Relay information