Skip to content

Instantly share code, notes, and snippets.

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

Bernardo Vieira da Silva BernardoSilva

🏠
Working from home
View GitHub Profile
@BernardoSilva
BernardoSilva / mysql_mac_tips.txt
Created March 19, 2016 18:16
Mysql tips on Mac
// How to reset root password for MySQL on mac
mysql.server restart --skip-grant-tables
mysql
UPDATE mysql.user SET Password=PASSWORD('new_root_password') WHERE User='root';
exit
mysql -u root -p
// new_root_password or your password
@BernardoSilva
BernardoSilva / User.php
Created October 3, 2016 22:38 — forked from Ocramius/User.php
Doctrine 2 ManyToMany - the correct way
<?php
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
/**
* @ORM\Entity()
* @ORM\Table(name="user")
*/
class User
@BernardoSilva
BernardoSilva / server-debug-tips.txt
Created December 5, 2016 11:59
server-debug-tips
# Check the disk status of a server
$ df
# Find why the disk if full, list the 10 biggest directories/files from current directory
$ du -hsx * | sort -rh | head -10
https://www.kosinix.com/install-lets-encrypt-certificate-on-shared-hosting/
@BernardoSilva
BernardoSilva / ohmyzsh.md
Created May 21, 2021 11:08 — forked from yovko/ohmyzsh.md
ZSH (using Oh My ZSH) on Manjaro Linux

ZSH (using Oh My ZSH) on Manjaro Linux

0. If ZSH is not already installed on your Manjaro system you can do it with the command:

sudo pacman -Syu zsh

You do not need to install manjaro-zsh-config and all the other related packages like zsh-syntax-highlighting, zsh-history-substring-search, zsh-autosuggestions, etc., as we will use Oh My Zsh.