Skip to content

Instantly share code, notes, and snippets.

View magarrent's full-sized avatar
🎯
Focusing

Marc Garcia Torrent magarrent

🎯
Focusing
View GitHub Profile
@magarrent
magarrent / postal-codes-girona.csv
Last active December 1, 2020 10:12
Codis postals provincia girona CSV
id name zip_code
1 Agullana 17707
2 Aiguaviva 17181
3 Albanyà 17733
4 Albanyà 17734
5 Albons 17136
6 Alp 17537
7 Alp 17538
8 Amer 17170
9 Anglès 17160
@magarrent
magarrent / pull.sh
Created June 1, 2022 07:59
Pull Laravel project from git
#!/bin/bash
git pull
php artisan optimize:clear
composer install
npm run dev
@magarrent
magarrent / php.sh
Last active January 22, 2024 13:53
Install PHP 8.2 with Extensions for LEMP in Ubuntu 22. (Used for Laravel, but you may need for almost all other php frameworks)
add-apt-repository ppa:ondrej/php
sudo apt-get install php8.2 php8.2-fpm php8.2-mysql php8.2-cli php8.2-common php8.2-imap php8.2-redis php8.2-snmp php8.2-xml php8.2-zip php8.2-mbstring php8.2-curl php8.2-gd php8.2-soap php8.2-bcmath php8.2-intl redis
curl -sS https://getcomposer.org/installer -o composer-setup.php
sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer
@magarrent
magarrent / install.sh
Last active October 25, 2024 14:29
LEMP Laravel - Ubuntu 22.04 - PHP 8.3 fpm - Nginx
sudo apt update
sudo apt install nginx mysql-server redis certbot acl git zip unzip -y
# PHP 8.3
sudo apt-get install ca-certificates apt-transport-https software-properties-common -y
add-apt-repository ppa:ondrej/php
sudo apt-get install php8.3 php8.3-fpm php8.3-mysql php8.3-cli php8.3-common php8.3-imap php8.3-redis php8.3-snmp php8.3-xml php8.3-zip php8.3-mbstring php8.3-curl php8.3-gd php8.3-soap php8.3-bcmath php8.3-intl php8.3-sqlite3
# Composer
@magarrent
magarrent / bash.sh
Last active October 31, 2024 09:57
Puppetter Chromedriver on Ubuntu ARM (Hetzner)
mkdir '/home/www-data'
mkdir '/home/www-data/.cache'
mkdir '/home/www-data/.cache/puppeteer'
chown -R www-data:www-data /home/www-data/
sudo add-apt-repository ppa:xtradeb/apps -y
sudo apt install chromium
export PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium