Skip to content

Instantly share code, notes, and snippets.

Jolie McCullough joliesky

Block or report user

Report or block joliesky

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@joliesky
joliesky / d3map.js
Created Aug 11, 2015
Container width test on d3 map
View d3map.js
/* global pym, d3, topojson */
(function() {
'use strict';
var pymChild;
function render(containerWidth) {
d3.selectAll('svg').remove();
@joliesky
joliesky / BarChartCSS.css
Last active Aug 29, 2015
Bar chart w/ CSS only
View BarChartCSS.css
.bar-chart {
margin-right: 1.5em;
.city {
position: relative;
margin-top: 0.5em;
.bar-label {
text-align: right;
width: 135px;
margin: 0.15em 0;
float: left;
@joliesky
joliesky / CategoryOrSub
Last active Dec 21, 2015
Wordpress - Ability to get category and all sub-categories
View CategoryOrSub
/*
Snippet Name: Category or Subcategory
Description: Gets the category and all subcategories of a cat_ID
Usage: Ideal if you are trying to put code only on the categories of a cat and it's children, in lieu of doing an array of all the children. Put the following code in functions.php or a plugin.
*/
<?php if (!function_exists('is_category_or_sub')) {
function is_category_or_sub($cat_id = 0) {
foreach (get_the_category() as $cat) {
if ($cat_id == $cat->cat_ID || cat_is_ancestor_of($cat_id, $cat))
return true;
You can’t perform that action at this time.