Skip to content

Instantly share code, notes, and snippets.

View cdevroe's full-sized avatar
:octocat:
Probably writing.

Colin Devroe cdevroe

:octocat:
Probably writing.
View GitHub Profile
@cdevroe
cdevroe / tweet-status.php
Created January 25, 2017 19:35
Publish posts, statuses, images, to Twitter from WordPress
<?php
/**
* Plugin Name: Tweet Statuses
* Description: A simple plugin that will tweet a status when published.
* Author: Colin Devroe
* Author URI: http://cdevroe.com/
* Version: 0.1.0
*
* TwitterAPIExchange is here: http://github.com/j7mbo/twitter-api-php
*/
@cdevroe
cdevroe / convert_roman.js
Created January 9, 2017 13:52
INCOMPLETE: Convert number into Roman numeral in JavaScript
(function (win,doc) {
'use strict';
var submit = document.getElementById('submit');
submit.addEventListener( 'click', function(){
var number = document.getElementById('number'),
roman_numeral = document.getElementById('roman');
roman_numeral.innerHTML = convert_to_roman(number.value);
@cdevroe
cdevroe / wp-is_published-is_draft.php
Created January 6, 2016 16:03
WordPress is_published is_draft functions
<?php
/**
* Determine whether a post or page is published or not.
*
* @return bool
*/
function is_published(){
$post = get_post();
if ( $post->post_status == 'publish' ) return true;
@cdevroe
cdevroe / Template_Client-Call.txt
Created November 19, 2015 17:56
Client Call Text Document Template
Template: Client Call % Client Name % - % Date %
# Call information
Dial-in information:
- Number:
- Pin:
- URL:
Parties on call:
@cdevroe
cdevroe / hypertext-member-blogs.opml
Last active December 10, 2015 23:59
Hypertext Member Blogs
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>Hypertext Member Blogs</title>
</head>
<body>
<outline text="Hypertext Member Blogs" title="Hypertext Member Blogs">
<outline type="rss" text="Colin Devroe" title="Colin Devroe" xmlUrl="http://cdevroe.com/feed" htmlUrl="http://cdevroe.com/"/>
<outline type="rss" text="Hypertext" title="Hypertext by Justin Blanton" xmlUrl="http://feeds.feedburner.com/jblanton" htmlUrl="http://hypertext.net"/>
@cdevroe
cdevroe / gist:4fb3ebf7806b39020c33
Created May 28, 2015 14:17
Open Visual Studio Code from Terminal
code () {
if [[ $# = 0 ]]
then
open -a "Visual Studio Code" -n
else
[[ $1 = /* ]] && F="$1" || F="$PWD/${1#./}"
open -a "Visual Studio Code" -n --args "$F"
fi
}
@cdevroe
cdevroe / settings.json
Created December 14, 2014 02:56
settings.json file for GetBarley.com
{
"name": "Streetshark",
"creator": "Plain",
"creator_url": "http://plainmade.com",
"blog": "news",
"content_types": {
"articles": "Article",
"releases": "Release Month"
},
"feed": [
@cdevroe
cdevroe / settings.json
Created December 14, 2014 02:54
settings.json file for The Watercolor Gallery
{
"name": "Cypress - Forked for The Watercolor Gallery",
"creator": "Kyle Ruane and Colin Devroe",
"creator_url": "http://h2ocolor.com",
"blog": "gallery",
"content_types": {
"artspaces": "Art Space",
"interviews": "Artist Interview",
"videos": "Video",
"submit": "Submission Form"
@cdevroe
cdevroe / gist:1b0d52e1c5edc14f4dcc
Last active August 29, 2015 14:10
Feedly Custom Share to Unmark
Hosted Unmark
https://unmark.it/mark/add?url=${url}&title=${title}
Self-hosted Unmark
http://YOUR-URL-HERE/mark/add?url=${url}&title=${title}
@cdevroe
cdevroe / wp-export.html
Created November 19, 2014 15:39
Export Barley CMS to WordPress (WIP)
<?xml version="1.0" encoding="UTF-8"?>
<!-- This is a WordPress eXtended RSS file generated by WordPress as an export of your blog. -->
<!-- It contains information about your blog's posts, comments, and categories. -->
<!-- You may use this file to transfer that content from one site to another. -->
<!-- This file is not intended to serve as a complete backup of your blog. -->
<!-- To import this information into a WordPress blog follow these steps. -->
<!-- 1. Log into that blog as an administrator. -->
<!-- 2. Go to Manage: Import in the blog's admin panels. -->
<!-- 3. Choose "WordPress" from the list. -->