Skip to content

Instantly share code, notes, and snippets.

@iainmcampbell
iainmcampbell / smooth-scrolling-anchor-links.js
Created January 5, 2015 16:59
Smooth Scrolling Anchor Links (jQuery)
@iainmcampbell
iainmcampbell / breakpoint.sass
Last active August 29, 2015 14:12
SASS Snippets
=breakpoint($point)
@if #{$point} == "huge"
@media (min-width: 1200px)
@content
@else if #{$point} == "large"
@media (min-width: 800px)
@content
@else if #{$point} == "medium"
@iainmcampbell
iainmcampbell / normalize.sass
Last active August 29, 2015 14:12
normalize.sass
*
box-sizing: border-box
h1
font-size: 2em
margin: .67em 0
article, aside, details, figcaption, figure, footer, header, hgroup, main, nav, section, summary
display: block
audio, canvas, video
@iainmcampbell
iainmcampbell / settings.py
Last active August 29, 2015 14:11
Django Settings Stem
"""
Django settings for <project> project.
With Grappelli.
https://docs.djangoproject.com/en/1.7/topics/settings/
https://docs.djangoproject.com/en/1.7/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
(function($) {
var o = $({});
$.subscribe = function() {
o.on.apply(o, arguments);
};
$.unsubscribe = function() {
o.off.apply(o, arguments);
@iainmcampbell
iainmcampbell / gist-backup.py
Last active February 7, 2016 18:51 — forked from joneskoo/gist-backup.py
gist backup
#!/usr/bin/env python
# Git clone all my gists
import json
import urllib
from urllib import urlopen
from subprocess import call
import os
@iainmcampbell
iainmcampbell / Gruntfile.js
Last active August 29, 2015 14:11
grunt-sass
// npm install --save-dev grunt grunt-sass grunt-autoprefixer grunt-contrib-watch load-grunt-tasks
module.exports = function(grunt){
require('load-grunt-tasks')(grunt); // npm install --save-dev load-grunt-tasks
grunt.initConfig({
sass: {