Skip to content

Instantly share code, notes, and snippets.

👋
Coding

Zander Martineau mrmartineau

👋
Coding
Block or report user

Report or block mrmartineau

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@mrmartineau
mrmartineau / app.min.js
Last active Dec 15, 2015
Sublime Closure Compile Build Script. Use a batchfile or shell script to determine which files should be concatinated and minified, then reference that in your Sublime build script
View app.min.js
/** //@ sourceMappingURL=app.min.js.map
*/
console.log('foo');console.log('bar');
@mrmartineau
mrmartineau / grunt-watch-livereload-subtask.js
Last active Dec 18, 2015
Grunt watch task for compiling scss, js and trigerring a livereload
View grunt-watch-livereload-subtask.js
livereload: {
options: { livereload: true },
files: [
// When these files are changed, livereload is triggered
// Make sure this directory is the same as the one your site points to
'resources/css/styles.css'
]
}
@mrmartineau
mrmartineau / inc-dec.json
Last active Dec 18, 2015
Out of date Sublime Text 2 settings
View inc-dec.json
[
{ "keys": ["alt+up"], "command": "inc_dec_value", "args": { "action": "inc_min" } },
{ "keys": ["alt+down"], "command": "inc_dec_value", "args": { "action": "dec_min" } },
{ "keys": ["super+up"], "command": "inc_dec_value", "args": { "action": "inc_max" } },
{ "keys": ["super+down"], "command": "inc_dec_value", "args": { "action": "dec_max" } },
{ "keys": ["super+alt+up"], "command": "inc_dec_value", "args": { "action": "inc_all" } },
{ "keys": ["super+alt+down"], "command": "inc_dec_value", "args": { "action": "dec_all" } }
]
@mrmartineau
mrmartineau / jquery-fallback.html
Created Jun 9, 2013
Provide two versions of jQuery, one for old browsers and one for new. See more details at http://martineau.tv/blog/2013/06/two-versions-of-jquery/
View jquery-fallback.html
<!--[if lte IE 8]>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="/js/libs/jquery.min.js"><\/script>')</script>
<![endif]-->
<!--[if gt IE 8]><!-->
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.2jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="/js/libs/jquery.2.min.js"><\/script>')</script>
<!--<![endif]-->
@mrmartineau
mrmartineau / jquery.data.code.block.js
Created Jul 13, 2013
Dave Rupert's data code block jQuery plugin
View jquery.data.code.block.js
/* jshint jquery:true */
/* Author: Dave Rupert
* License: WTFPL
----------------------*/
(function($){
'use strict';
$.fn.dataCodeBlock = function(){
@mrmartineau
mrmartineau / prompt.js
Last active Dec 20, 2015
Simple script to prompt user if they have not interacted with your page for a given amount of time. The check interval is 6 seconds and currently listens for the `mousemove` event but `scroll` or others can be used equally well.
View prompt.js
var PROMPT = {
prompt : false,
interval : 6000,
now : new Date(),
init : function() {
// Do initial check
this.listener();
// console.log(this);
You can’t perform that action at this time.