Skip to content

Instantly share code, notes, and snippets.

View diegopacheco's full-sized avatar

Diego Pacheco diegopacheco

View GitHub Profile
sudo apt update
sudo apt -y install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt update
sudo apt install php8.2 php8.2-cli php8.2-common php8.2-mbstring php8.2-xml php8.2-mysql php8.2-pgsql php8.2-sqlite3 php8.2-curl php8.2-bcmath php8.2-zip
sudo update-alternatives --set php /usr/bin/php8.2
php -v
@diegopacheco
diegopacheco / php-composer.md
Created July 5, 2024 07:08
Install PHP Composer
curl -s https://getcomposer.org/installer | php
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('sha384', 'composer-setup.php') === 'dac665fdc30fdd8ec78b38b9800061b4150413ff2e3b6f88543c636f7cd84f6db9189d43a81e5503cda447da73c7e5b6') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
sudo mv composer.phar /usr/local/bin/composer
composer
@diegopacheco
diegopacheco / clean-up.sh
Created June 29, 2024 19:49
Clean Up: Save lots of space in Ubuntu
#!/bin/bash
echo "Clean up APT..."
sudo apt-get autoremove --purge -y
echo "Clean up APT Cache..."
sudo du -sh /var/cache/apt
echo "Clean up systemd journal logs..."
sudo journalctl --vacuum-time=3d
@diegopacheco
diegopacheco / clean-up.md
Created June 29, 2024 19:18
Clean Up and Free Space - Ubuntu
brew cleanup

@diegopacheco
diegopacheco / sbt-scala-3-linux.md
Created June 24, 2024 16:51
Install sbt scala 3.0 - linux - ubuntu - cs setup script
curl -fL https://github.com/coursier/coursier/releases/latest/download/cs-x86_64-pc-linux.gz | gzip -d > cs && chmod +x cs && ./cs setup
@diegopacheco
diegopacheco / Supabase-podman.md
Created June 9, 2024 07:56
Run Supabase with Podman

1. Install Supabase

brew install supabase/tap/supabase

2. Setup to use Podman

after installing podman. Do:

systemctl --user enable podman.socket
systemctl --user start podman.socket
systemctl --user status podman.socket
@diegopacheco
diegopacheco / cuda-ubuntu-22.md
Created April 20, 2024 23:14
install cuda ubuntu 22
sudo apt install cuda-11-8 -y
@diegopacheco
diegopacheco / cudnn-ubuntu-22.04.md
Last active April 6, 2024 08:28
Install Nvidia: cudnn on ubuntu 22.04
wget https://developer.download.nvidia.com/compute/cudnn/9.0.0/local_installers/cudnn-local-repo-ubuntu2204-9.0.0_1.0-1_amd64.deb
sudo dpkg -i cudnn-local-repo-ubuntu2204-9.0.0_1.0-1_amd64.deb
sudo cp /var/cudnn-local-repo-ubuntu2204-9.0.0/cudnn-*-keyring.gpg /usr/share/keyrings/
sudo apt-get update
sudo apt-get -y install cudnn

sudo apt-get -y install cudnn-cuda-11
sudo apt-get -y install cudnn-cuda-12

@diegopacheco
diegopacheco / having-fun-with-typescript.md
Last active March 4, 2024 17:11
Having fun with Typescript

Tiny Typescript Essay

created: 20.FEB.2024

I love to learn new programing languages, it help to open the mind to new possibilities and compare different approaches. For instance, I learned Ruby and Scala in 2010, Clojure and Haskell in 2011, Go in 2015, Kotlin 2016, Rust in 2018 and Idris, TypeScript in 2019, 2020 Pandemic strike did a bunch of pocs but not with new langs(crazy year), Zig in 2021, 2022(coding in lots of langs but nothing new) - in 2023 I'm learning Nim and V. Learn at least one lang per year. This post is not complain, it's just to share some toughts, notes and impressions.

Why Typescript

  • Created in 2012 by Microsoft
  • Type System