Skip to content

Instantly share code, notes, and snippets.

View ijmccallum's full-sized avatar
💫

Iain J McCallum ijmccallum

💫
View GitHub Profile
/*!
* jQuery.scrollTo
* Copyright (c) 2007-2015 Ariel Flesler - aflesler ○ gmail • com | http://flesler.blogspot.com
* Licensed under MIT
* http://flesler.blogspot.com/2007/10/jqueryscrollto.html
* @projectDescription Lightweight, cross-browser and highly customizable animated scrolling with jQuery
* @author Ariel Flesler
* @version 2.1.2
*/
;(function(factory) {
@ijmccallum
ijmccallum / Sass columns
Created June 3, 2016 18:10
How simple can I make this?
//took this: https://css-tricks.com/dont-overthink-it-grids/ and tweaked it
$pad: 40px;
.grid {
&:after {
content: "";
display: table;
clear: both;
}
@ijmccallum
ijmccallum / 0_reuse_code.js
Created December 3, 2015 22:11
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
@ijmccallum
ijmccallum / Sass Breakpoints
Created August 6, 2015 15:40
Sass mixin for applying breakpoints throughout our styles
/* BREAK POINTS
* ===============================================================
* Thanks to ...
* This can be added outside a selector, or within!
*
* eg:
* @include breakpoint(medium) {
* //all the stuff for medium and up in here
* }
* and for old ie stylesheet:
@ijmccallum
ijmccallum / Sass Font Icons
Last active August 29, 2015 14:26
A Sass mixin for adding Icon Fonts onto a :before or :after
/* FONT ICONS!
* ===============================================================
* Requires a font called 'Icons' - usually imported from fontello
*
* eg:
* @extend %icon-before-<icon-name>;
* or
* @extend %icon-after-<icon-name>;
*/
@ijmccallum
ijmccallum / gist:1b1612b84ce436bc5af4
Last active August 29, 2015 14:24
Figuring out Mongoose's populate function
Document.prototype.populate = function populate () {
//if no args are passed, don't bother doing anything
if (0 === arguments.length) return this;
var pop = this.$__.populate || (this.$__.populate = {});
var args = utils.args(arguments);
var fn;
if ('function' == typeof args[args.length-1]) {
/* SITE UNIVERSALS
*
* Panels
* Text
* Buttons
*
*/
/* COLOURS */
@ijmccallum
ijmccallum / PHP breadcrumbs
Created April 21, 2014 15:54
PHP breadcrumb fun! Just a really simple way of doing it, if you've got a better way let me know - I'm keen to learn!
<ol class="breadcrumb">
<?php
/*
* This requires a couple of things ot be set:
* $homePath = relative path of the site
* $crumbCut = number of links to ignore in the trail
* See the working version here: http://iainjmccallum.com/guides.php
*/
/*