Skip to content

Instantly share code, notes, and snippets.

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

Vitor Britto vitorbritto

🏠
Working from home
View GitHub Profile
@vitorbritto
vitorbritto / rm_mysql.md
Last active May 20, 2024 19:44
Remove MySQL completely from Mac OSX

Remove MySQL completely

  1. Open the Terminal

  2. Use mysqldump to backup your databases

  3. Check for MySQL processes with: ps -ax | grep mysql

  4. Stop and kill any MySQL processes

  5. Analyze MySQL on HomeBrew:

    brew remove mysql
    
@vitorbritto
vitorbritto / add_mysql_brew.md
Created January 24, 2015 17:10
Install MySQL with HomeBrew

Install MySQL with HomeBrew

# Installing MySQL

brew install -v mysql

# Setting up MySQL

# Copy the default my-default.cnf file to the MySQL Homebrew Cellar

directory where it will be loaded on application start:

@vitorbritto
vitorbritto / add_apache_brew.md
Last active March 4, 2019 10:30
Install Apache with Homebrew

Install Apache with Homebrew

Installing Apache

# Start by stopping the built-in Apache, if it's running, and prevent it from starting on boot.
# This is one of very few times you'll need to use sudo:
sudo launchctl unload /System/Library/LaunchDaemons/org.apache.httpd.plist 2>/dev/null

# We need to tap homebrew-dupes because "homebrew-apache/httpd22" relies on "homebrew-dupes/zlib"

and install Apache 2.2 with the event MPM, and we'll use Homebrew's OpenSSL library

@vitorbritto
vitorbritto / add_php_brew.md
Last active September 26, 2018 14:19
Install PHP with HomeBrew

Install PHP with HomeBrew

Complete Guide / Isseus / Common Problems: https://github.com/Homebrew/homebrew-php

Installing PHP 5.6

# Install PHP with PHP-FPM and excluding snmp
brew install -v homebrew/php/php56 --with-fpm --without-snmp

Setting up PHP 5.6

@vitorbritto
vitorbritto / add_wp_cli.md
Created January 24, 2015 17:44
Install WordPress CLI

Install WordPress CLI

# Installing WordPress CLI

curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
php wp-cli.phar --info
chmod +x wp-cli.phar
mv wp-cli.phar /usr/local/bin/wp

Installing WordPress Bash Completions

@vitorbritto
vitorbritto / rake_cli.md
Last active August 29, 2015 14:14
Rake CLI

Rake CLI

  • db:create creates the database for the current env
  • db:create:all creates the databases for all envs
  • db:drop drops the database for the current env
  • db:drop:all drops the databases for all envs
  • db:migrate runs migrations for the current env that have not run yet
  • db:migrate:up runs one specific migration
  • db:migrate:down rolls back one specific migration
  • db:migrate:status shows current migration status
@vitorbritto
vitorbritto / scaffolding.sh
Created July 6, 2016 12:30
Scaffolding for a new project using Shell Script
#!/bin/bash
#
 # Programa: scaffolding.sh
 # Autor: Vitor Britto
 #
 # Descrição:
 # Este script será responsável pela criação
 # de uma estrutura para novos projetos.
 #
@vitorbritto
vitorbritto / build.sh
Created July 6, 2016 12:33
Prepare and compile files using Shell Script
#!/bin/bash
#
 # Programa: build.sh
 # Autor: Vitor Britto
 #
 # Descrição:
 # Este script será responsável pelo build do projeto, o qual
 # fará o processo de minificação e concatenação dos arquivos
 # e preparação dos arquivos a serem colocados em produção.
@vitorbritto
vitorbritto / makefile
Created July 6, 2016 12:47
Using makefile to run automated tasks
# MAKEFILE
#
# Autor: Vitor Britto
# Versão: 0.1.0
#
#
# Descrição:
# Arquivo para gerar um estrutura inicial para
# novos projetos e realizar tarefas de automação
#
@vitorbritto
vitorbritto / node-modules.md
Last active July 29, 2016 11:18
Install all node modules on my workflow

Workflow - Install Node modules

$ npm i -g
grunt-cli gulp-cli
jshint jscs clean-css eslint babel-eslint uncss
babel
nodemon pm2 browser-sync