Skip to content

Instantly share code, notes, and snippets.

@brandonsimpson
brandonsimpson / reinstall_git_brew.md
Last active November 21, 2023 09:45
Re-installing Git on Mac OSX with Brew

Re-installing Git on Mac OSX with Brew

This is helpful if you've previously installed git from source on OSX, and other compilers can't find the correct path. You need to remove the current version of git, then re-install with brew.

Uninstall git if installed manually

  1. Check which git you're running:
    which git
    
@brandonsimpson
brandonsimpson / osx_uninstall_mysql_install_mariadb_homebrew.md
Last active August 19, 2023 22:55
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.

@brandonsimpson
brandonsimpson / laravel-5-4-upgrade-laravel-mix-webpack.md
Created April 18, 2017 16:30
Laravel 5.4 - Upgrade from gulp to laravel-mix + webpack
  • Create a webpack.mix.js file in root directory:
const { mix } = require('laravel-mix');

mix.js('resources/assets/js/app.js', 'public/js')
  .sass('resources/assets/sass/app.scss', 'public/css');
  
/* Optional: uncomment for bootstrap fonts */
// mix.copy('node_modules/bootstrap-sass/assets/fonts/bootstrap/','public/fonts/bootstrap');
@brandonsimpson
brandonsimpson / PULL_REQUEST_TEMPLATE
Created July 29, 2020 18:44 — forked from riggaroo/PULL_REQUEST_TEMPLATE
Pull request template format. Add this file to your .github folder
<!--- Provide a general summary of your changes in the Title above -->
<!--- If there is no changelog entry, label this PR as trivial to bypass the Danger warning -->
## Description
<!--- Describe your changes in detail -->
## Motivation and Context
<!--- Why is this change required? What problem does it solve? -->
@brandonsimpson
brandonsimpson / rsync_server_backup.sh
Last active April 24, 2018 03:57
Backup linux server via rsync to remote backup NAS drive
#!/bin/sh
# Backup linux server via rsync to remote backup NAS drive
#
# Run this from a root cronjob at whatever intervals you need
#
# example:
# # backup server at 4am
# 0 4 * * * sh /root/rsync_server_backup.sh > /dev/null;
#
@brandonsimpson
brandonsimpson / sync_mysql.sh
Created June 8, 2014 20:41
Quickly Dump + Backup + Sync MySQL tables between servers via command line
#!/bin/bash
# sync mysql tables from dev server to production server quickly via command line
# specify the list of tables to sync below
dev_host="127.0.0.1"
dev_user="root"
dev_pass="K#oDAk6AF@GumR7"
dev_db_name="local_dev"
@brandonsimpson
brandonsimpson / ubuntu-php5-fpm-phalcon.md
Last active August 14, 2016 10:33
Ubuntu 14.04 (Trusty) php5-fpm PhalconPHP install

Ubuntu 14.04 (Trusty) php5-fpm PhalconPHP install

Optional - add repo for php 5.6.8

sudo apt-get install software-properties-common
sudo add-apt-repository ppa:ondrej/php5-5.6
sudo apt-get update
@brandonsimpson
brandonsimpson / jira_cacert.md
Created June 8, 2014 17:53
Add ssl cacert for a secure mail server to Jira

Add ssl cacert for a secure mail server to Jira

  1. Login as root and create directory for mail server files to be created. Rename "mail.mailserver.com" for your mail server you're trying to connect to.

    mkdir ~/mail.mailserver.com
    cd ~/mail.mailserver.com
    
  2. Get certificate file contents from mail server on port 995:

@brandonsimpson
brandonsimpson / vagrant-ubuntu-trusty64-mariadb-my.cnf
Created May 25, 2015 18:27
vagrant-ubuntu-trusty64-mariadb-my.cnf
[mysql]
# CLIENT #
port = 3306
socket = /var/lib/mysql/mysql.sock
[mysqld]
# GENERAL #
user = mysql
@brandonsimpson
brandonsimpson / vhost1
Last active August 29, 2015 14:21
Nginx php5-fpm Symfony2 app server config
server {
listen 80;
server_name symfony.dev;
root /var/www/vhosts/symfony.dev/web;
rewrite ^/app\.php/?(.*)$ /$1 permanent;
try_files $uri @rewriteapp;
location @rewriteapp {