Skip to content

Instantly share code, notes, and snippets.

View devLopez's full-sized avatar
🎯
Focusing

Matheus Lopes Santos devLopez

🎯
Focusing
View GitHub Profile
@devLopez
devLopez / mac-setup-redis.md
Created March 26, 2021 00:24 — forked from tomysmile/mac-setup-redis.md
Brew install Redis on Mac

type below:

brew update
brew install redis

To have launchd start redis now and restart at login:

brew services start redis
@devLopez
devLopez / 01 - stack.sh
Last active February 22, 2021 23:25
Instalação do stack de desenvolvimento no Ubuntu - Firebird
# ------------------------------------
# Instalação dos bancos de dados
# ------------------------------------
# Inclusão do apt repository contendo o FB 3
# Leitura complementar: https://help.ubuntu.com/community/Firebird3.0
sudo add-apt-repository ppa:mapopa/firebird3.0
sudo apt-get update
# Instalação do FB3
@devLopez
devLopez / install.sh
Created January 20, 2021 13:58
Install SQL Server driver on ubuntu
# See docs
# https://docs.microsoft.com/pt-br/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-ver15#ubuntu17
# https://docs.microsoft.com/pt-br/sql/connect/php/installation-tutorial-linux-mac?view=sql-server-ver15
# Fisrt we need to install odbc drivers on ubuntu
sudo su
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
#Download appropriate package for the OS version
#Choose only ONE of the following, corresponding to your OS version
<!DOCTYPE html>
<html lang="pt-BR" dir="ltr">
<head>
<meta charset="utf-8">
<title>Login</title>
</head>
<body>
<form method="post" action="autentica.php">
<fieldset>
<legend>Usuário</legend>
@devLopez
devLopez / gist:262e07ef00cadae0d536c224e638ec0d
Created March 27, 2020 21:53 — forked from billsinc/gist:1157544
Remove Firebird DB from MacOS
#!/bin/sh
echo "Clean Services"
echo "Clean User"
dscl localhost -delete /Local/Default/Users/firebird
echo "Clean Group"
dscl localhost -delete /Local/Default/Groups/firebird
if [ -f "/Library/StartupItems/Firebird" ]; then
echo "Remove SuperServer StartupItem"
rm -fr /Library/StartupItems/Firebird
fi
@devLopez
devLopez / change_permission_recursivelly.md
Created December 10, 2019 17:05
Altera as permissões re arquivos e pastas de forma recursiva
# Neste caso, alteramos o mod dos diretórios para 755
# Note que o diretório utilizado é o /opt/lampp/htdocs.
# Trocar este diretório conforme a necessidade
find /opt/lampp/htdocs -type d -exec chmod 755 {} \;

# Neste caso, buscamos e alteramos o mod de todos os aquivos
# para 644. O diretório utilizado foi o /opt/lampp/htdocs.
# Trocar este diretório conforme a necessidade
find /opt/lampp/htdocs -type f -exec chmod 644 {} \;
@devLopez
devLopez / osx_uninstall_mysql_install_mariadb_homebrew.md
Created December 7, 2019 15:01 — forked from brandonsimpson/osx_uninstall_mysql_install_mariadb_homebrew.md
OSX How To: Uninstall native MySQL and install MariaDB via Homebrew

OSX How To: Uninstall native MySQL and install MariaDB via Homebrew

This is a short overview on how to completely remove any old mysql server installs in OSX and upgrade to MariaDB without conflicts. Things can get a bit weird when you have various old installs of MySQL server floating around, and utilizing homebrew to install and upgrade MariaDB as a drop in replacement for MySQL has worked well, especially if you're used to managing MySQL installs via yum in linux.

First: Backup Your Data!

Backup all of your current databases with mysqldump

This isn't a tutorial on backups, and there are many ways to do it. You should know how to backup your data anyway. For this example, we'll do a full backup of our InnoDB databases.

@devLopez
devLopez / php_apache_homebrew.md
Created February 25, 2019 23:59 — forked from DragonBe/php_apache_homebrew.md
Installation of Apache 2.4 and PHP 7.1 with Homebrew

I posted several talks about compiling PHP from source, but everyone was trying to convince me that a package manager like Homebrew was a more convenient way to install.

The purpose of Homebrew is simple: a package manager for macOS that will allow you to set up and install common packages easily and allows you to update frequently using simple commands.

I used a clean installation of macOS Sierra to ensure all steps could be recorded and tested. In most cases you already have done work on your Mac, so chances are you can skip a few steps in this tutorial.

Apache and PHP with homebrew

I’ve made this according to the installation instructions given on GetGrav.

Compiling Interbase/Firebird extension for PHP 5.6.10 under MAC OS X

Short tutorial on how to compile Firebird extension for PHP under MAC OS X El Capitan 10.11

Before compiling PHP extension you must have Autoconf, you can install it via Homebrew (brew install autoconf) Because we needs Firebird libs. for compiling interbase, we have to download Firebird Server Package (http://www.firebirdsql.org/en/downloads), download the LIPO package (important!)

Let's compile! (MAMP 3.4.0 ... PHP 5.6.10)

@devLopez
devLopez / Kernel.php
Last active October 12, 2018 20:46
Realiza a Criação da Session do Laravel
<?php
use Illuminate\Foundation\Http\Kernel as HttpKernel;
class Kernel extends HttpKernel
{
protected $middleware = [
/*
* Neste ponto, devemos fazer com que o sistema da cotec realize
* a criação da instância deste middleware, fazendo com que a sessão