Tiny Cross-browser DOM ready function in 111 bytes of JavaScript.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find `pwd` -type d -maxdepth 3 -name 'node_modules' | xargs -n 1 tmutil addexclusion |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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=' + |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Action compile-sass /git/phpsass/compile-apache.php | |
AddHandler compile-sass .sass .scss |
NewerOlder