Skip to content

Instantly share code, notes, and snippets.

View Integralist's full-sized avatar
🎯
Making an impact

Mark McDonnell Integralist

🎯
Making an impact
View GitHub Profile
@Integralist
Integralist / deferredImplems.md
Created October 25, 2011 19:44 — forked from addyosmani/deferredImplems.md
Deferred implementations
@Integralist
Integralist / gist:1316940
Created October 26, 2011 16:42 — forked from millermedeiros/gist:882682
RequireJS Async Load Plugin
/*!
* RequireJS plugin for async dependency load like JSONP and Google Maps
* @author Miller Medeiros
* @version 0.0.1 (2011/03/23)
* Released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
*/
define(function(){
function injectScript(src){
var s, t;
@Integralist
Integralist / dabblet.css
Created February 29, 2012 13:51 — forked from chriscoyier/dabblet.css
Checkbox Hack
/* Checkbox Hack */
input[type=checkbox] {
position: absolute;
top: -9999px;
left: -9999px;
}
label {
-webkit-appearance: push-button;
-moz-appearance: button;
@Integralist
Integralist / README.md
Created March 27, 2012 08:58 — forked from necolas/README.md
Experimenting with component-based HTML/CSS naming and patterns

Object-Oriented CSS

Below is how I am currently structuring my CSS to be more object-oriented (with a little assistence from Sass):

@Integralist
Integralist / LICENSE.txt
Created August 15, 2012 09:36 — forked from sdepold/LICENSE.txt
140byt.es -- addObserverMethods
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Sascha Depold http://depold.com
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@Integralist
Integralist / input.scss
Created November 22, 2012 07:55 — forked from kaelig/input.scss
Extending placeholder selectors within media queries
%myclass {
color: blue;
@media (min-width: 600px) {
background: red;
}
@media (min-width: 800px) {
font-size: 28px;
}
}
@Integralist
Integralist / cranium.js
Created January 18, 2013 12:03 — forked from addyosmani/cranium.js
Cranium (Backbone API)
/* Cranium MVC
* A minimalist MVC implementation written for
* demonstration purposes at my workshops
* http://addyosmani.com
* Copyright (c) 2012 Addy Osmani; Licensed MIT */
var Cranium = Cranium || {};
// Set DOM selection utility
@Integralist
Integralist / pr.md
Last active December 16, 2015 12:19 — forked from piscisaureus/pr.md
Accessing PR information within your .git folder

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@Integralist
Integralist / addEventListener-polyfill.js
Last active December 17, 2015 04:09 — forked from eirikbacker/addEventListener-polyfill.js
addEventListener polyfill
//addEventListener polyfill 1.0 / Eirik Backer / MIT Licence
(function(win, doc){
if(win.addEventListener)return; //No need to polyfill
function docHijack(p){var old = doc[p];doc[p] = function(v){return addListen(old(v))}}
function addEvent(on, fn, self){
return (self = this).attachEvent('on' + on, function(e){
var e = e || win.event;
e.preventDefault = e.preventDefault || function(){e.returnValue = false}
e.stopPropagation = e.stopPropagation || function(){e.cancelBubble = true}
@Integralist
Integralist / reading_time.rb
Last active December 18, 2015 16:39 — forked from zachleat/reading_time.rb
Ruby: calculate reading time based on length of text
# Outputs the reading time
# Read this in “about 4 minutes”
# Put into your _plugins dir in your Jekyll site
# Usage: Read this in about {{ page.content | reading_time }}
module ReadingTimeFilter
def reading_time( input )
words_per_minute = 180