Skip to content

Instantly share code, notes, and snippets.

View lanceguyatt's full-sized avatar

Lance Guyatt lanceguyatt

View GitHub Profile
@peterdemartini
peterdemartini / command.sh
Last active March 28, 2024 17:49
Exclude node_modules in timemachine
find `pwd` -type d -maxdepth 3 -name 'node_modules' | xargs -n 1 tmutil addexclusion
@demisx
demisx / gulpfile.js
Last active July 14, 2022 16:06
Gulp 4 gulpfile.js
// Gulp 4
var gulp = require('gulp');
var using = require('gulp-using');
var grep = require('gulp-grep');
var changed = require('gulp-changed');
var del = require('del');
var coffee = require('gulp-coffee');
var less = require('gulp-less');
var coffeelint = require('gulp-coffeelint');
var sourcemaps = require('gulp-sourcemaps');
@adyz
adyz / retina-simple-sprite-compass
Last active September 12, 2018 08:02
Retina Sprite CSS with Compass
// 1: To export the PNGs in different sizes I used Slicy - http://macrabbit.com/slicy/ - a mac app that looks into your PSD and if it finds any layer with .png extention will export that layer to PNG. You can also add a tag to the main group layer to export retina version too. A bit pricy, but it's fine if you value your time.
// 2: I added the icons in two folders (retina and normal) You just have to make sure that both folders contain the same number of files and they both have the same file name inside.
// 3: I added this code after long time of searchin, testing, and mashing my head into the wall.
$naviconsNormal: sprite-map("navicons/normal/*.png", $spacing: 10px);
@shaneriley
shaneriley / mixins.jade
Created February 10, 2014 20:10
Jade mixins example
// Writing JS for everything is great and all, but I don't want to see JS
// inline in my Jade templates. Thankfully, there are ways of abstrating it
// into mixins!
// Want some Rails-like helpers?
mixin link_to(name, href)
- href = href || "#"
a(href="#{href}")= name
// How about a single editing point for a class name?
CSS OFF
Volume 3—September 2013
Positioning Relatives
In 1958, English pictorial photographer Henry Peach Robinson created the world's first photomontage by combining five different negatives to make one complete print of a young girl on her deathbed. “Fading Away”—Robinson's first and most famous composite photo—depicts a young girl dying of consumption and was controversial when it was exhibited, with many believing it was not a suitable subject for photography.
Box Model
The Barbie doll was invented in 1959 by Ruth Handler (co-founder of Mattel), whose own daughter was called Barbara. Barbie was introduced to the world at the American Toy Fair in New York City. Barbie's job was teenage fashion doll. The full name of the first doll was Barbie Millicent Roberts, from Willows, Wisconsin.
Staying afloat
@jhurliman
jhurliman / fbdump.py
Created June 3, 2013 03:54
Dump recent Facebook profile info, likes, photos, and posts to JSON text files
import urllib2
import json
FB_TOKEN = '...'
MAX_PAGES = 10
def scrape_page(page):
all_data = []
url = ('https://graph.facebook.com' + page + '?limit=50&access_token=' +
@blockloop
blockloop / Gruntfile.js
Created May 26, 2013 03:27
hexo gruntfile generate example
module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-shell');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.initConfig({
watch: {
sourceFiles: {
files: ['themes/**','scaffolds/**','scripts/**','source/**','app.js'],
tasks: 'shell:hexoGen'
},
@brianfeister
brianfeister / attach_heads.js
Created December 15, 2012 13:04
Sub-theming engine for Grunt.js + Roots Theme + Twitter Bootstrap
/**
* Task: attach_heads
* Description: Set the heads for all themes declared in themes.json
*/
module.exports = function(grunt) {
'use strict';
var fs = require('fs');
var path = require('path');
@dciccale
dciccale / README.md
Last active October 22, 2021 21:52
Tiny Cross-browser DOM ready function in 111 bytes of JavaScript

DOM Ready

Tiny Cross-browser DOM ready function in 111 bytes of JavaScript.

@richthegeek
richthegeek / .htaccess
Created August 13, 2012 15:34
Automatic SASS/SCSS compilation with PHPSass and Apache2
Action compile-sass /git/phpsass/compile-apache.php
AddHandler compile-sass .sass .scss