Skip to content

Instantly share code, notes, and snippets.

View bugsysailor's full-sized avatar
🌅
Collecting sunrise data.

Bugsy bugsysailor

🌅
Collecting sunrise data.
View GitHub Profile
@bugsysailor
bugsysailor / debugprint.css
Created March 22, 2018 16:13 — forked from kaushalmodi/debugprint.html
Pretty printing Hugo variables for debug
.debugprint td {
padding-left: 4px;
padding-right: 4px;
}
.debugprint .key {
font-weight: bold;
}
.debugprint .type {
/* Hide Type columns in debugprint */
/* display: none; */
@bugsysailor
bugsysailor / imgix_purge.php
Last active April 26, 2016 00:02 — forked from jacktasia/imgix_purge.php
imgix PHP purge example
<?php
// pass the url you want to purge
function imgix_purge($url, $apikey = '') {
$headers = array(
'Content-Type:application/json',
'Authorization: Basic '. base64_encode($apikey.':')
);
$payload = json_encode(array("url" => $url));
$curl = curl_init('https://api.imgix.com/v2/image/purger');
@bugsysailor
bugsysailor / wordpress-nested-nav.php
Created December 17, 2015 22:11 — forked from bmcalister/wordpress-nested-nav.php
One dimensional wordpress nav object to nested array
<?php
class Nested_nav {
public $wp_nav;
public $nested_nav;
function __construct($menu, $args = null) {
$this->wp_nav = wp_get_nav_menu_items($menu, $args);
$this->nested_nav = $this->buildTree( $this->wp_nav );