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

shell & eval

Check for files

all files on folder and subfolders, useful before submitting or during eval.

  ls -l */*

The norm

check that all files follow the norm. On the project root:

norminette -R CheckForbiddenSourceHeader
@CarloCattano
CarloCattano / main.c
Last active October 22, 2022 16:33
Example of main argc and argv - 42 Berlin practice
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ccattano <ccattano@student.42Berlin.de> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/10/22 09:36:07 by ccattano #+# #+# */
/* Updated: 2022/10/22 09:36:09 by ccattano ### ########.fr */
/* */

Compile plugins for 64-bit OS aarch64 raspberry pi 4

this plugins are included on the mod-plugin-builder repo

on a debian/ubuntu system or VM (I use a debian lite image on Oracle VirtualBox). Approx time 3 hours or more

sudo apt install acl bc curl cvs git mercurial rsync subversion wget \
bison bzip2 flex gawk gperf gzip help2man nano perl patch tar texinfo unzip \
automake binutils build-essential cpio libtool libncurses-dev pkg-config python-is-python3 libtool-bin

Find largest 10 files

gci -r|sort -descending -property length | select -first 10 name, @{Name="Gigabytes";Expression={[Math]::round($_.length / 1GB, 2)}}

search for files

Get-Childitem -Path D:\ -Include *name.wav* -File -Recurse -ErrorAction SilentlyContinue

Reset commit history

git add -A
git commit -am "Initial commit"
git branch -D main
git branch -m main
git push -f origin main

Push to new fork

find folder recursively

find YOUR_STARTING_DIRECTORY -type d -name "*nameOfFolder*" -print 

locate pip package location

pip show package-name 
@CarloCattano
CarloCattano / GIADA_compile_from_sources_raspberry.md
Last active October 1, 2021 11:44
Giada compilation arm / ubuntu

get giada from github

  git clone https://github.com/monocasual/giada.git
  cd giada
  git submodule update --init --recursive

install neccesary stuff for ubuntu :

@CarloCattano
CarloCattano / pi_MIDI_Brain.md
Last active May 9, 2024 01:48
Raspberry pi UART MIDI Serial

rp3.+ raspberry OS lite (or better PatchboxOS as a starting point)

https://blokas.io/patchbox-os/

testing notes
Disable bluetooth or send bt to another serial port
    sudo nano /boot/config.txt

    enable_uart=1    
   
 dtoverlay=midi-uart0
<pre><code>
----------begin_max5_patcher----------
2895.3oc6bkziiaiE9rCP9OHnKYF.GCwEskaI4PRNLXNLGlCEBJHawxk5VVx
PRt5pSv7ee3h1H0FksjqJcZevKjTRO9836wO93i9O+1uYi49zWI4lF+fwCFa
17mzR1vKiUxlpB1XdJ30CwA47FZlP9T59OXtsrtBxqE7xOajSxhBheLiDDVW
8SoIEIAmH7l7ir5qqJ4xozKEwjB98ETUbTHuszmw2i8qa74fhCOGkbjd2OTH
DXLBrydqAxydm0VCw6P3NKieu5hxK9br3IWeeDOwhOelHtIllMMmJPQIcjGV
OHO5O3sGPu8RRDIqDppvJZ6ihIuPxxiRSZee1XFb9bqx2z9hXP7GR42K2sMk
EkHJC0TVF4knpaAto3fLJ5TPglKYhN7qNXyV2ozPRVxkHt.UV5+6a+lZQqAT
gNMfI.56w9zA51BUoCPNFmd3iDtdxptzzyjjnjyYjbRRQPQoL1TeH4ofKwEO