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
Keep losing this snippet and facebook has taken away the buttons to do this so you must craft your own link | |
http://facebook.com/add.php?api_key=YOUR_APP_KEY&pages=1&page=YOUR_PAGE_ID |
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
/* pop me into your functions.php */ | |
wp_deregister_script('jquery'); | |
wp_register_script('jquery', ("http://code.jquery.com/jquery-git.js"), false, '1.8.2'); | |
wp_enqueue_script('jquery'); |
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
var sys = require('sys') | |
var exec = require('child_process').exec; | |
function puts(error, stdout, stderr) { sys.puts(stdout) } | |
exec("git pull", puts); |
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
// put this in your /Packages/User/Preferences.sublime-settings | |
// if this isn't being recognized in all languages, check to see if you have /packages/User/[langauge].sublime-settings is overriding anything as those files take precedence over user settings | |
"tab_size": 4, | |
"translate_tabs_to_spaces": false, |
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
JSON::ParserError - 795: unexpected token at 'WARNING: Missing required dependency to activate optional built-in extension coffeescripttransform.rb | |
cannot load such file -- coffee-script | |
{"/CNAME":"/CNAME","/docs/asciidoc-quick-reference.adoc":"/docs/asciidoc-quick-reference/index.html","/docs/asciidoc-quick-reference.pdf":"/docs/asciidoc-quick-reference.pdf","/docs/asciidoc-recommended-practices.adoc":"/docs/asciidoc-recommended-practices/index.html","/docs/asciidoc-syntax-quick-reference.redirect":"/docs/asciidoc-syntax-quick-reference.html","/docs/asciidoc-writers-guide.adoc":"/docs/asciidoc-writers-guide/index.html","/docs/editing-asciidoc-with-live-preview.adoc":"/docs/editing-asciidoc-with-live-preview/index.html","/docs/hack-asciidoctor-maven-plugin.adoc":"/docs/hack-asciidoctor-maven-plugin/index.html","/docs/index.adoc":"/docs/index.html","/docs/install-and-use-asciidoclet.adoc":"/docs/install-and-use-asciidoclet/index.html","/docs/install-and-use-asciidoctor-gradle-plugin.adoc":"/docs/install-and- |
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
Simple little snippet that I always forget. I use this to quickly find/replace all references to any paths within a wordpress DB when migrating. Much faster than using a GUI | |
You must have gsed installed, used macports to do this. Native osx sed sucks. | |
usage: gsed -i 's/[old-url]/[new-url]/gi' database-name.sql | |
Example: | |
gsed -i 's/localhost\/wordpress-local\/subfolder/production.com/gi' livedb.sql |
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
var page = new WebPage(), | |
address, output, size; | |
address = "http://www.metachunk.com/"; | |
width = 1024; height = 600; | |
output = "./screenshots/wat-"+width+"X"+height+".png"; | |
page.viewportSize = { width: width, height: height }; | |
if (phantom.args.length === 3 && phantom.args[1].substr(-4) === ".pdf") { |
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 | |
/* | |
Plugin Name: Toggle Debug | |
Description: Proof-of-concept for an admin-bar debug mode toggle. Needs some UX love. | |
*/ | |
/* | |
// In wp-config.php, wrap debug constants in a cookie conditional | |
if ( isset( $_COOKIE['wp-debug'] ) && $_COOKIE['wp-debug'] == 'on' ) { | |
define('WP_DEBUG', true); | |
} |
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
# paste this into your console and hit enter | |
for voice in Agnes Kathy Princess Vicki Victoria Alex Bruce Fred Junior Ralph Albert Bad News Bahh Bells Boing Bubbles Cellos Deranged Good News Hysterical Pipe Organ Trinoids Whisper Zarvox; do say "Hi `whoami` my name is ${voice}" -v ${voice}; done |
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
var gulp = require('gulp'), | |
browserSync = require('browser-sync'), | |
reload = browserSync.reload, | |
autoprefixer = require('gulp-autoprefixer'), | |
concat = require('gulp-concat'), | |
imageMin = require('gulp-imagemin'), | |
minifyCSS = require('gulp-minify-css'), | |
notify = require('gulp-notify'), | |
plumber = require('gulp-plumber'), | |
sass = require('gulp-sass'), |