Skip to content

Instantly share code, notes, and snippets.

View masterix21's full-sized avatar
❤️
Ready to help

Luca Longo masterix21

❤️
Ready to help
View GitHub Profile
@masterix21
masterix21 / init-github-on-existing-laravel-project.md
Last active April 16, 2021 20:09
Initialize GitHub (or any git remote repository) within an already existent (Laravel?) project

1. Create a new fresh and empty GitHub repository

https://github.com/new

2. Create a new Laravel project (if not exists yet)

laravel new project-name --jet
cd ./project-name

3. Initialize a git repository

@masterix21
masterix21 / forge-deploy.yml
Last active April 29, 2021 13:15
Deploy on forge when a release is published on GitHub
name: Deploy Release
on:
release:
types: [published]
jobs:
deploy:
runs-on: ubuntu-latest
steps:

Dumping and importing from/to MySQL in an UTF-8 safe way

In a nutshell: to avoid your shell character set from messing with imports, use -r to export and SOURCE when importing. Dumping safely

# Do not do this, since it might screw up encoding
mysqldump -uroot -p database > utf8.dump # this is bad