Skip to content

Instantly share code, notes, and snippets.

View CarloCattano's full-sized avatar
🏠
Working from home

Carlo CarloCattano

🏠
Working from home
View GitHub Profile
@CarloCattano
CarloCattano / 42chad.md
Last active July 4, 2023 09:43
Install NvChad on School Computers

ACHTUNG! WORK IN PROGRESS, USE AT YOUR OWN RISK AND DON'T RUN THE SCRIPT IN COMMENTS

Install rust on school computer

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Download neovim binaries and add it to your PATH

wget https://github.com/neovim/neovim/releases/download/v0.9.1/nvim-linux64.tar.gz
@CarloCattano
CarloCattano / Generate_DoxyGen_Graph.md
Last active January 21, 2024 15:59
Easy way to generate documentation and call graphs that you can click to go to the definitions real quick. Useful for big projects to have a visual help

A script to generate a Doxyfile with call graphs , it needs to have installed doxygen and graphviz

Installation

Ensure you have the required dependencies installed:

# Example installation on Debian-based systems
@CarloCattano
CarloCattano / Who_is_at_school.md
Last active October 2, 2023 11:27
42 intra API example using python - check who is on campus and how much eval points they got
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* bin.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: carlo <ccattano@student.42Berlin.de> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/01/28 14:47:40 by carlo #+# #+# */
/* Updated: 2023/01/28 14:47:42 by carlo ### ########.fr */
/* */
@CarloCattano
CarloCattano / Dockerfile
Last active February 21, 2024 11:48
42 pool Ubuntu docker development enviroment image
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
ENV NORM_VER 3.3.53
WORKDIR /home/root
VOLUME /home/root
RUN apt-get update -y && \
apt-get install -y lsb-release valgrind clang wget nano python3 \
@CarloCattano
CarloCattano / oh_my_zsh_ignores.md
Last active November 30, 2022 12:23
Ignore duplicates and wrong commands on zsh-autosuggestions and dont add it to .zsh_history

add this lines somewhere on your ~/.zshrc

setopt EXTENDED_HISTORY
setopt HIST_EXPIRE_DUPS_FIRST
setopt HIST_IGNORE_DUPS
setopt HIST_IGNORE_ALL_DUPS
setopt HIST_IGNORE_SPACE
setopt HIST_FIND_NO_DUPS
setopt HIST_SAVE_NO_DUPS
@CarloCattano
CarloCattano / Hvcc Puredata to Web Assembly.md
Last active January 2, 2023 19:44
get heavy compiler Web Assembly export to work on linux

Install emscripten

from emscripten official docs

# Get the emsdk repo
git clone https://github.com/emscripten-core/emsdk.git

# Enter that directory
cd emsdk
# Download and install the latest SDK tools.
./emsdk install latest
@CarloCattano
CarloCattano / shifty.c
Last active November 12, 2022 16:48
Playing with bit shifting and some other bitwise operators
/* Carlo Cattano - bitshifting experiments */
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#define T_INTERVAL 30000 // 30 milliseconds
void ft_putchar(char c)
{
write(1, &c, 1);
@CarloCattano
CarloCattano / 42_header_vscode_berlin.md
Last active November 30, 2022 10:39
Add your 42 header from Vscode

Install 42 header 0.42.9

open extensions browser on Vscode and look for 42 header


1. Open Vscode and go to view -> Command Palette -> Type User settings JSON and clik on it to open the settings

2. Add this to your JSON preferences file

"42header.username": "yourintraname",
@CarloCattano
CarloCattano / Psyco_vscode.md
Last active April 15, 2023 07:51
Vscode settings to swim with style and honor for a 42 friendly eperience

Vscode persistent settings

for seeing the whitespace ( tabs ➜ and spaces • ) and always have a 4 spaces sized tab

Steps:

1. Open vscode and go to view -> Command Palette -> Type User settings JSON

2. Add this to your JSON preferences file

3. Save the file and enjoy