Skip to content

Instantly share code, notes, and snippets.

View americkson's full-sized avatar
😎

Adam Erickson americkson

😎
View GitHub Profile
@americkson
americkson / Permission
Created October 22, 2012 23:52
Permissions
find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;
@americkson
americkson / Git Ignore Changed File
Created October 8, 2012 18:47
Git Ignore Changed File
git update-index --assume-unchanged <file>
Start tracking changes again run the following command:
git update-index --no-assume-unchanged <file>
@americkson
americkson / PHP Error ReportingDebugging
Created October 4, 2012 16:05
PHP Error Reporting/Debugging
error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);
@americkson
americkson / gist:1373556
Last active April 26, 2016 19:18
Magento MAGE installer

A guide for installing modules with the MAGE installer

Magento Mage installer

Adjust permissions

Make the mage package executable

LOCAL ONLY

chmod 777 ./mage

@americkson
americkson / gist:1173714
Last active July 8, 2019 15:49
Drupal Goodies

A collection of Drupal snippets.

Home / Front Page Tricks

Remove the Default message on home page with our creating a post

<?php if(drupal_is_front_page()) {unset($page['content']['system_main']['default_message']);} ?>
@americkson
americkson / gist:1165419
Created August 23, 2011 15:24 — forked from petemcw/gist:1165317
Command-line Magic

Regular Expressions

Not only useful in programming, regular expressions can make complex tasks easy in many different scenarios. Here is a great site for testing your regex:

http://rubular.com

General Shell

Run the previous command again

@americkson
americkson / .gitignore
Created August 23, 2011 15:24 — forked from petemcw/.gitignore
What to ignore from Magento in Git
# Magento Connect 2 cache directories and files
downloader/pearlib/cache/
downloader/*.cfg
# Magento runtime media files
media/catalog/product/cache/
media/tmp/
media/js/
media/css/
media/.thumbs/