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
alias plbuild="php core/builder.php -gc" # Pattern Lab: Build/Clean | |
alias plwatch="php core/builder.php -rw" # Pattern Lab: Watch/Sync |
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
/** | |
* Chrome 32/33 webfont issue fix. | |
* Requires jQuery. | |
* More info: http://blog.cloudfour.com/chrome-webfont-issues/ | |
*/ | |
(function($, window){ | |
// only proceed if this is Chrome | |
if (window.navigator.userAgent.indexOf('Chrome') === -1) return; | |
// only proceed if the version is 32 or greater |
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
/** | |
* This project's actual gulpfile contains much more than this, | |
* but these are the relevant bits. | |
*/ | |
// Node libraries | |
var fs = require('fs'); | |
var path = require('path'); | |
// Gulp + plugins |
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
// include gulp + template plugin | |
var gulp = require('gulp'); | |
var template = require('gulp-template'); | |
// include the koTemplates module locally | |
var koTemplates = require('./koTemplates'); | |
// create the 'templates' task | |
gulp.task('templates', function () { | |
// single-page app, so just pipe through index | |
gulp.src('./src/templates/index.html') |
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
/* | |
* Format a date using Moment. | |
* Usage: {{moment date format="MMMM YYYY"}} | |
*/ | |
var Handlebars = require('handlebars'), | |
_ = require('lodash'), | |
moment = require('moment'); | |
Handlebars.registerHelper('moment', function (context, block) { |
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
/** | |
* Iterate over a block a given number of times. | |
* | |
* Usage: | |
* <ul> | |
* {{#times 5}}<li>Item {{@index}}</li>{{/times}} | |
* </ul> | |
*/ | |
var Handlebars = require('handlebars'); |
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
<?php | |
function tsticka14_comment( $comment, $args, $depth ) { | |
$GLOBALS['comment'] = $comment; | |
// I kind of cheat here by not doing anything for pingbacks | |
// and trackbacks, which means the amount of stuff that | |
// displays may differ from the comment count unless | |
// pingbacks and trackbacks are disabled in the admin. | |
switch ( $comment->comment_type ) : | |
case 'pingback' : |
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
/* | |
* Variation of fitvids.js I wrote to behave the way I want to. | |
*/ | |
(function($){ | |
$.fitStuff = function (el, options) { | |
var base = this; | |
base.$el = $(el); | |
base.selectors = [ | |
"iframe[src^='http://player.vimeo.com']", |
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
/* | |
* Plugin for creating new windows in JS | |
*/ | |
(function($){ | |
$.newWindow = function (el, w, h) { | |
var base = this; | |
base.$el = $(el); | |
base.init = function () { | |
base.features = 'width=' + w + ',height=' + h + ',left=' + ((screen.width-w)/2) + ',top=' + ((screen.height-h)/2 - 110); |
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
// This... stores the current href. Pretty amazing. | |
var lastHREF = location.href; | |
// This is the dirtiest way to build the HTML of the share drop-down ever | |
function getShareHTML(url,title) { | |
var niceURL = escape(url); | |
var niceTitle = escape(title); | |
return '<li id="global-nav-share-facebook"><iframe src="http://www.facebook.com/plugins/like.php?href=' + niceURL + '&layout=button_count&show_faces=true&width=90&action=like&colorscheme=light&height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:21px;" allowTransparency="true"></iframe></li>' + | |
'<li><a href="http://twitter.com/home?status=' + niceTitle + '+' + niceURL + '" target="_blank" id="global-nav-share-twitter">Twitter</a></li>' + | |
'<li><a href="mailto:?subject=' + niceTitle + '&body=' + niceURL + '" id="global-nav-share-email">E-mail</a></li>' + |
OlderNewer