Skip to content

Instantly share code, notes, and snippets.

View twitchy's full-sized avatar

Reeve Jolliffe twitchy

View GitHub Profile
@twitchy
twitchy / for-loop-optimized.js
Created June 11, 2014 21:27
Optimized for loop
var len = thing.length;
for( var i = len; i--; ) {
// stuff
}
@twitchy
twitchy / gulpfile.js
Last active August 29, 2015 14:02
gulpfile-wordpress-themedev
var gulp = require('gulp');
// Include Our Plugins
var jshint = require('gulp-jshint');
var compass = require('gulp-compass');
var minifyCSS = require('gulp-minify-css');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var rename = require('gulp-rename');
var rev = require('gulp-rev');
@twitchy
twitchy / wordpress-tags.php
Created June 24, 2014 16:17
wordpress-tags
<h3>Random remix tag cloud:</h3>
<?php wp_tag_cloud('number=50&format=list&order=RAND'); ?>
<h3>Most common tags:</h3>
<?php wp_tag_cloud('number=50&format=list&orderby=count'); ?>
<h3>All <?php if (function_exists('tagstats')) { tagstats(); } ?> tags in alphabetical order:</h3>
<?php wp_tag_cloud('smallest=10&largest=10&number=0&format=list'); ?>
@twitchy
twitchy / mac-dnsflush
Created November 22, 2014 02:36
Flush Yosemite DNS caches
sudo discoveryutil mdnsflushcache;sudo discoveryutil udnsflushcaches;say flushed