Skip to content

Instantly share code, notes, and snippets.

View robhawkes's full-sized avatar

Robin Hawkes robhawkes

View GitHub Profile
@robhawkes
robhawkes / Ghost content update.md
Created July 18, 2021 17:04 — forked from eexit/Ghost content update.md
Upload Ghost local storage images to Cloudinary

Ghost content update

  1. Export your Ghost content (aka backup)
  2. Open in an editor that support Regex find/replace
  3. Search for:
/content/images/\d{4}/(\w{3}|\d{2})/
//MIT License
//Copyright (c) 2021 Felix Westin
//Source: https://github.com/Fewes/MinimalAtmosphere
//Ported to GLSL by Marcin Ignac
#ifndef ATMOSPHERE_INCLUDED
#define ATMOSPHERE_INCLUDED
// -------------------------------------
@robhawkes
robhawkes / img_url.js
Created July 3, 2020 16:38
Responsive Cloudinary images in Ghost
// Usage:
// `{{img_url feature_image}}`
// `{{img_url profile_image absolute="true"}}`
// Note:
// `{{img_url}}` - does not work, argument is required
//
// Returns the URL for the current object scope i.e. If inside a post scope will return image permalink
// `absolute` flag outputs absolute URL, else URL is relative.
const url = require('url');
var csvConfig = {
input: {
type: "BlueprintInputCSV",
options: {
path: "./data/some.csv"
}
},
output: {
type: "BlueprintOutputDebugPoints",
options: {}
/* globals window, _, VIZI, d3, THREE */
(function() {
"use strict";
/**
* Blueprint OBJ output
* @author Robin Hawkes - vizicities.com
*/
// output: {
{
"properties": {
"name": "Performance",
"project": "vizicities",
"id": "vizicities/Performance",
"environment": {
"type": "noflo-browser"
},
"changed": true
},
@robhawkes
robhawkes / Package Controls.sublime-settings
Last active August 29, 2015 13:56
Sublime Text preferences
{
"installed_packages":
[
"Alignment",
"Base16 Color Schemes",
"ColorPicker",
"GitGutter",
"Gutter Color",
"HTML-CSS-JS Prettify",
"InactivePanes",
@robhawkes
robhawkes / gist:2558821
Created April 30, 2012 14:32
BrowserQuest image license
Images from <a href="https://github.com/mozilla/BrowserQuest">BrowserQuest</a> used under <a href="http://creativecommons.org/licenses/by-sa/3.0/">CC-BY-SA 3.0</a>.
@robhawkes
robhawkes / gist:1966511
Created March 3, 2012 14:51
Gamepad API (Firefox)
var controller;
// Run When a gamepad is connected
function onGamepadConnected(e) {
controller = e.gamepad;
console.log("Gamepad connected", controller.id);
}
// Run on button change
function onGamepadButtonDown(e) {