Skip to content

Instantly share code, notes, and snippets.

@loren138
loren138 / .rocketeerconfig.php
Last active January 17, 2021 08:26
MySQL Master Slave and EC2 Laravel Notes with Rocketeer
<?php
use Rocketeer\Services\Connections\ConnectionsHandler;
return [
// The name of the application to deploy
// This will create a folder of the same name in the root directory
// configured above, so be careful about the characters used
'application_name' => 'resources',
@loren138
loren138 / GoogleDirectoryAPI.php
Created October 12, 2015 18:06
Google Apps Password Change PHP Example/Sample Code
<?php
namespace App\Models\User;
/**
* Class GoogleDirectoryApi
*
* Stores all the password reset information
*/
class GoogleDirectoryApi
@loren138
loren138 / post-merge
Last active August 27, 2015 11:56 — forked from sindresorhus/post-merge
git hook to run a command after `git pull` if a specified file was changed.In this example it's used to run `composer install` if `composer.lock` changed.Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
#/usr/bin/env bash
# MIT © Sindre Sorhus - sindresorhus.com
# git hook to run a command after `git pull` if a specified file was changed
# Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
check_run() {
echo "$changed_files" | grep --quiet "$1" && eval "$2"
@loren138
loren138 / curl-fix.sh
Last active September 11, 2015 14:16
Fix Curl SSL Connection Errors in Ubuntu 14.04 14.10 15.04
#!/bin/bash
# Fix curl/gnutls SSLv3 on Ubuntu 14.04
#
# The curl version on Ubuntu 14.04 Trusty Tahr has a bug (through gnutls) in
# its SSLv3 support. This also affects git.
#
# This script will rollback curl, libcurl3, and libcurl3-gnutls to the version in Ubuntu 12.04.
# Unfortionately, it does not seem to be possible to automatically update for security patches
# so you must manually check for curl updates at the url below.
#
@loren138
loren138 / pf.md
Last active August 29, 2015 14:07 — forked from ryanzhou/pf.md

Getting Apache Port Forwarding to work in OS X Yosemite

Former code: http://echo.co/blog/os-x-109-local-development-environment-apache-php-and-mysql-homebrew

Some parts taken from: https://gist.github.com/kujohn/7209628

ipfw is officially deprecated and removed in OS X Yosemite. Pow requires another program pf to handle the port forwarding.

Note: While this does forward port 80, I haven't figured out how to get apache to see the incoming domain to make things like project.dev work correctly. If anyone gets that to work, please let me know how. (So visiting http://localhost/ or http://localhost/~username/ works as expected. Visiting http://project.dev does not.) I ended up starting apache as root and running it as _www for now.