Skip to content

Instantly share code, notes, and snippets.

Avatar

Jon Munson jonmunson

View GitHub Profile
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']);
_gaq.push(['_trackPageview']);
@jonmunson
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(request.name).origin;
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
jonmunson / .gitignore
Last active Aug 29, 2015 — forked from carlosasin/.gitignore
Git ignore Magento (ignore .htaccess for NGINX)
View .gitignore
# Ignore PHPStorm
/.idea/
/.phpstorm.meta.php
#Ignore vagrant
/.vagrant/
# Ignore code coverage reports
/build/
@jonmunson
jonmunson / permission.sh
Last active Aug 29, 2015 — forked from carlosasin/permission.sh
Magento - Repair permissions
View permission.sh
#!/bin/sh
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
jonmunson / 0_reuse_code.js
Last active Aug 29, 2015
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@jonmunson
jonmunson / 1. Example.scss
Last active Aug 29, 2015 — forked from Integralist/1. Example.scss
Example of CSS Animation with keyframes
View 1. Example.scss
@include keyframe(fadeout) {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}
View Three Wise Monkeys.md

Date: [date]

Between us [company name] and you [customer name].

Summary:

In short; neither of us will share any confidential information about each-other, by any means, with anyone else.

What’s confidential information?

View Contract Killer 3.md

Contract Killer

The popular open-source contract for web designers and developers by Stuff & Nonsense

  • Originally published: 23/12/2008
  • Revised date: 15/12/2013
  • Original post

View hide-select-arrow-firefox.md

How to remove hide the <select> arrow in Firefox using -moz-appearance:none;

Background

I was experimenting on custom styling the <select> elements of a form I was building. One of the things I tried implementing was truncating the text with an ellipsis in case it extended beyond the <select>'s width. It didn't look consistent through browsers, but I've accidentally discovered something really nice.

The bug

You can’t perform that action at this time.