Skip to content

Instantly share code, notes, and snippets.

View mitchkramez's full-sized avatar

Mitch Kramer mitchkramez

View GitHub Profile
@mitchkramez
mitchkramez / homebrew_multiple_mysql_versions.md
Last active January 27, 2021 15:24 — forked from benlinton/multiple_mysql_versions_for_development.md
Multiple MySQL Versions with Homebrew

Multiple MySQL Versions with Homebrew

For homebrew version 1.5.12 - WIP... not quite working yet.

brew -v # => Homebrew 1.5.12

Install the current version of mysql.

# Install current mysql version

brew install mysql

<?php
// ==============================================================================
// = MAGENTO MAGIC EMAIL IMPORTER =
// ==============================================================================
// this will save you so much time... you'll likely cry. instead of going one by
// one through each of the magento transactional email templates, this will go
// through each of the en_US templates in the magento/app/locale and import them
// into the database.
//
// You can use the prefix below to prefix you're entries with the name of your
@mitchkramez
mitchkramez / gist:9144426
Created February 21, 2014 22:01
SublimeLinter - PHPLint Configuration
{
"user": {
"debug": true,
"delay": 1,
"error_color": "D02000",
"gutter_theme": "Packages/SublimeLinter/gutter-themes/Default/Default.gutter-theme",
"gutter_theme_excludes": [],
"lint_mode": "background",
"linters": {
"php": {
@mitchkramez
mitchkramez / PHP 5.4, 5.3 setup via Macports
Last active December 29, 2015 11:49 — forked from raphaelstolt/php54_php53_pear_macports.markdown
Guide to setting up macports LAMP stack with PHP 5.3 and 5.4 available to switch out depending on needs.
##Given
Apache 2 and MySQL are already installed.
#Update MacPorts
sudo port selfupdate;sudo port -u upgrade outdated
#Install PHP 5.4.*
sudo port install php54 php54-apache2handler
##Activate Apache Module
cd /opt/local/apache2/modules
@mitchkramez
mitchkramez / gist:5861304
Created June 25, 2013 18:58
Nice CSS3 Modal Effects
/* General styles for the modal */
/*
Styles for the html/body for special modal where we want 3d effects
Note that we need a container wrapping all content on the page for the
perspective effects (not including the modals and the overlay).
*/
.md-perspective,
.md-perspective body {
height: 100%;
@mitchkramez
mitchkramez / vhost.conf
Last active December 15, 2015 06:19
Ignore HTTP Auth for a Specific IP (vhost.conf)
# Put this in the vhost.conf... otherwise remove the directory wrappers when using as an htaccess... but use it in the vhost.conf, not the htaccess.
# Allow traffic from IP without login
SetEnvIf Remote_Addr ^11\.11\.11\.11$ MOVE_ALONG=true
# Allow traffic from any iPhone user agent without login
SetEnvIfNoCase User-Agent iPhone MOVE_ALONG=true
<Directory "/var/www/vhosts/vhost.com/httpdocs">
Satisfy Any
Order deny,allow
@mitchkramez
mitchkramez / gist:1821183
Created February 13, 2012 22:44
Allow Flash Through HTTP Auth
SetEnvIf User-Agent ^Adobe\sFlash let_me_in
<Directory /var/www/vhosts/dev.welcoa.org>
Satisfy Any
Order allow,deny
Allow from env=let_me_in
Deny from none
</Directory>
@mitchkramez
mitchkramez / array_columns.php
Created January 17, 2012 15:32
sort an array for output in columns
/**
* function: array_columns
* author: Brecht Cloetens
* params: $a = array() // original array
* $c = int() // number of columns
*/
function array_columns(&$a, $c=2)
{
$m = ceil(count($a)/$c);
$j = 0;