Skip to content

Instantly share code, notes, and snippets.


Jon Munson jonmunson

View GitHub Profile

Keybase proof

I hereby claim:

  • I am jonmunson on github.
  • I am jonmunson ( on keybase.
  • I have a public key ASCyXh8bPuIdNQf08yXQY7WH9bC4O-PwzV101feiryxXAgo

To claim this, I am signing this object:

jonmunson / apache2.conf
Created Apr 16, 2017
Apache2 settings for optimum security - /etc/apache2/apache2.conf
View apache2.conf
<Directory /var/www/>
Options FollowSymLinks
AllowOverride None
Require all granted
Header always append X-Frame-Options SAMEORIGIN
Header set X-XSS-Protection "1; mode=block"
Header edit Set-Cookie ^(.*)$ $1;HttpOnly;Secure
FileETag None
RewriteEngine On
RewriteCond %{THE_REQUEST} !HTTP/1\.1$
View ga-not-track-logged-in-users.php
<?php wp_footer(); ?>
<?php if (!$user_ID) : ?>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-9669661-12']);
jonmunson / prefetchbuilder.js
Created Dec 3, 2015 — forked from PaulKinlan/prefetchbuilder.js
Code to return link rel=dnsprefetch
View prefetchbuilder.js
(function() {
var requests = window.performance.getEntries();
var hosts = {};
var output = "";
for(var requestIdx = 0; requestIdx < requests.length; requestIdx++) {
var request = requests[requestIdx];
var origin = new URL(;
hosts[origin] = 1;
View maintain_magento_logs.sql
TRUNCATE dataflow_batch_export;
TRUNCATE dataflow_batch_import;
TRUNCATE log_customer;
TRUNCATE log_quote;
TRUNCATE log_summary;
TRUNCATE log_summary_type;
TRUNCATE log_url;
TRUNCATE log_url_info;
TRUNCATE log_visitor;
TRUNCATE log_visitor_info;
jonmunson / .gitignore
Last active Aug 29, 2015 — forked from carlosasin/.gitignore
Git ignore Magento (ignore .htaccess for NGINX)
View .gitignore
# Ignore PHPStorm
#Ignore vagrant
# Ignore code coverage reports
jonmunson /
Last active Aug 29, 2015 — forked from carlosasin/
Magento - Repair permissions
sudo find . -type f -exec chmod 644 {} \;
sudo find . -type d -exec chmod 755 {} \;
sudo chmod o+w var app/etc
sudo chmod 550 mage
sudo chmod -R o+w media
jonmunson / vertical-align.scss
Created Jun 23, 2015
Vertical align anything with just 3 lines of CSS
View vertical-align.scss
// Source:
/* Mixin */
@mixin vertical-align {
position: relative;
top: 50%;
-webkit-transform: translateY(-50%);
-ms-transform: translateY(-50%);
transform: translateY(-50%);
jonmunson /
Created Mar 9, 2015
mysqldump all databases from remote host
mysqldump -h -u username -p --all-databases > database_backup.sql
jonmunson /
Last active Aug 29, 2015
wget command to download directory via ftp
wget -m --user=yourusername --password=yourpassword