Skip to content

Instantly share code, notes, and snippets.

View derekaug's full-sized avatar
🐢
festina lente

Derek J. Augustine derekaug

🐢
festina lente
View GitHub Profile
@derekaug
derekaug / brew --config
Created April 19, 2013 16:48
brew --config for debugging
HOMEBREW_VERSION: 0.9.4
ORIGIN: https://github.com/mxcl/homebrew.git
HEAD: bbfb6d550ffb59b19aedd4f67721956f7bf83b49
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: quad-core 64-bit sandybridge
OS X: 10.6.8-x86_64
Xcode: 3.2.6
GCC-4.0: build 5494
GCC-4.2: build 5666
bin/create_host
bin/create_sub
bin/create_svn_host
bin/freetype-config
bin/links
bin/php_help
bin/pstorm
include/freetype2/freetype/config/ftconfig.h
include/freetype2/freetype/config/ftheader.h
include/freetype2/freetype/config/ftmodule.h
X11
internal
libAppleWM.7.0.0.dylib
libAppleWM.7.dylib
libAppleWM.dylib
libAppleWM.la
libFS.6.0.0.dylib
libFS.6.dylib
libFS.dylib
libFS.la
@derekaug
derekaug / gist:6391676
Last active December 22, 2015 00:48
Workaround for third party cookies in Safari...
<?php
// Start Session Fix
session_start();
$page_url = "http://www.facebook.com/pages/For-Testing/49209188225?sk=app_166147000244773";
if (isset($_GET["start_session"]))
{
die(header("Location:" . $page_url));
}
$sid = session_id();
if (!isset($_GET["sid"]))
@derekaug
derekaug / session_end.php
Created September 19, 2014 17:03
Ends all active sessions on a site if using default PHP session handler.
<?php
$path = session_save_path();
if ($handle = opendir($path)) {
while (false !== ($entry = readdir($handle))) {
if('sess' == substr($entry, 0, 4)){
$file = $path . '/' . $entry;
unlink($file);
}
}
closedir($handle);
@derekaug
derekaug / no_widow.php
Created December 22, 2015 15:47
takes a string (expecting no html) and adds &nbsp; to it to prevent widows
<?php
/**
* replaces the last space in a block of text with a &nbsp; to help prevent widows
* @param $string
* @return string
*/
function no_widow($string)
{
$string = trim($string);
@derekaug
derekaug / httpd-vhosts.conf
Last active June 27, 2017 16:08
Base template for Apache Virtual Hosts
# Listening ports.
Listen {PORT}
# Set up permissions for VirtualHosts in ~/Sites
<Directory "/Users/{USERNAME}/Sites">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
<IfModule mod_authz_core.c>
Require all granted
</IfModule>
@derekaug
derekaug / httpd.conf
Created June 27, 2017 16:48
My httpd.conf for comparison
#
# This is the main Apache HTTP server configuration file. It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.4/> for detailed information.
# In particular, see
# <URL:http://httpd.apache.org/docs/2.4/mod/directives.html>
# for a discussion of each configuration directive.
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
@derekaug
derekaug / New Machine Setup.md
Last active June 27, 2017 17:23
Setting up a LAMP stack / development environment on OSX

New Machine Setup

Preface

This is a living document, if I sent this your way and there's any changes you'd recommend or anything that's borked, don't hesitate to hit me up and tell me I suck at life.

Initial Setup

Set default to how all files (even hidden files) in Finder because it sucks not seeing hidden files in Finder when you know they are there:

@derekaug
derekaug / cmd line output.txt
Created December 11, 2017 19:10
error when doing git pull from springloops.io repository
ssh_exchange_identification: read: Connection reset by peer
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.