Skip to content

Instantly share code, notes, and snippets.

View johnciacia's full-sized avatar
👋

John Ciacia johnciacia

👋
View GitHub Profile

Keybase proof

I hereby claim:

  • I am johnciacia on github.
  • I am johnciacia (https://keybase.io/johnciacia) on keybase.
  • I have a public key ASBHGLHsUm7qHXHldZ7NalitYXixriTsfoAN7uuIIO30Lwo

To claim this, I am signing this object:

@johnciacia
johnciacia / rest-cap.php
Last active November 15, 2016 05:51
Untested: convert author_name query to a tax query for co-authors-plus
<?php
add_action( 'rest_api_init', function() {
global $coauthors_plus;
if ( ! method_exists( $coauthors_plus, 'get_coauthor_by' ) ) {
return;
}
// When using co-authors-plus, convert author queries to tax queries
add_action( 'rest_post_query', function( $args ) use ( $coauthors_plus ) {
@johnciacia
johnciacia / time-jira-link.js
Last active August 29, 2015 14:15 — forked from davidosomething/time-jira-link.js
Spit out the JIRA link to a ticket given a number
@johnciacia
johnciacia / fortune-wpvip-committed.js
Last active August 29, 2015 14:15 — forked from davidosomething/time2014-wpvip-committed.js
WordPress.com VIP Commit Hook
/**
* Hook.io - fortune theme committed to WordPress VIP
*
* Hosted:
*
*
* @see https://github.com/TimeInc/fortune/blob/master/wpcom-meta.php
* @see http://lobby.vip.wordpress.com/2014/03/05/commit-webhook/
*
* WordPress posts to wpcom-meta on SVN commit
@johnciacia
johnciacia / README.md
Last active December 21, 2015 20:29
Twitter Sentiment Analysis

Install dependencies

pip install twitter
pip install -U textblob
curl https://raw.github.com/sloria/TextBlob/master/download_corpora.py | python
@johnciacia
johnciacia / gist:6119106
Created July 31, 2013 03:42
Download and extract a tarball and gunzipped file with node
var request = require('request'),
zlib = require('zlib'),
tar = require('tar');
request('http://wordpress.org/latest.tar.gz')
.pipe(zlib.Unzip())
.pipe(tar.Extract({ path: __dirname }))
.on('error', function (er) {
console.error("error here" + er)
@johnciacia
johnciacia / timer.js
Created May 22, 2013 04:00
Countdown Timer
setInterval(function() {
var s = new Date(),
e = new Date(2013, 9, 10, 0, 0, 0),
t = e.getTime() - s.getTime(),
x = t / 1000,
s = '0'+Math.floor(x % 60),
x = x / 60,
m = '0'+Math.floor(x % 60),
x = x / 60,
h = '0'+Math.floor(x % 24),
$args = array_merge(
array_fill_keys(
array(
'per_page',
'offset',
'paged',
'orderby',
'order',
'include',
'include_found',
@johnciacia
johnciacia / cia.zsh-theme
Created February 13, 2013 15:35
ZSH Theme
MODE_INDICATOR="%{$fg_bold[red]%}❮%{$reset_color%}%{$fg[red]%}❮❮%{$reset_color%}"
local return_status="%{$fg[red]%}%(?..⏎)%{$reset_color%}"
PROMPT='%{$reset_color%}%{$fg[cyan]%}%~%{$reset_color%}$(git_branch)
%{$fg[red]%}%!%{$reset_color%} $(prompt_char) '
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[green]%}git%{$reset_color%}@%{$bg[white]%}%{$fg[black]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%})"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}!%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_CLEAN=""
@johnciacia
johnciacia / penis.html
Last active December 14, 2017 15:36
Animated ASCII Penis
<!DOCTYPE html>
<html>
<head>
<title>Animated ASCII Penis</title>
</head>
<body>
<span id="pen">8====================D</span>
<span id="is"> </span>