Skip to content

Instantly share code, notes, and snippets.

View jonmunson's full-sized avatar

Jon Munson jonmunson

View GitHub Profile
<?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 December 3, 2015 22:23 — forked from PaulKinlan/prefetchbuilder.js
Code to return link rel=dnsprefetch
(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;
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 August 29, 2015 14:27 — forked from carlosasin/.gitignore
Git ignore Magento (ignore .htaccess for NGINX)
# Ignore PHPStorm
/.idea/
/.phpstorm.meta.php
#Ignore vagrant
/.vagrant/
# Ignore code coverage reports
/build/
@jonmunson
jonmunson / permission.sh
Last active August 29, 2015 14:27 — forked from carlosasin/permission.sh
Magento - Repair permissions
#!/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 August 29, 2015 14:15
Here are some things you can do with Gists in GistBox.
// 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 August 29, 2015 14:00 — forked from Integralist/1. Example.scss
Example of CSS Animation with keyframes
@include keyframe(fadeout) {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}

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?

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

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