Skip to content

Instantly share code, notes, and snippets.

Hannah Wolfe ErisDS

Block or report user

Report or block ErisDS

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
@ErisDS
ErisDS / slimer.js
Created Apr 16, 2019
Extending sywac dynamically
View slimer.js
#!/usr/bin/env node
const prettyCLI = require('@tryghost/pretty-cli');
const slimer = require('@tryghost/slimer');
const extensions = require('../extensions');
// Require internal commands
prettyCLI.commandDirectory('../commands');
slimer
.loadCommands()
@ErisDS
ErisDS / README.md
Created Mar 7, 2019
Ruby Example of Ghost JWT Auth
View README.md

Demo of generating a JWT and authenticating with Ghost's Admin API.

Usage:

  • Save ghost-auth.rb locally
  • gem install httparty jwt first
  • With Ghost running on localhost:2368
  • ruby ghost-auth.rb {admin api key} to run

Gotchas:

@ErisDS
ErisDS / README.md
Last active Mar 7, 2019
Bash Example of Ghost JWT Auth
View README.md

Demo of generating a JWT and authenticating with Ghost's Admin API.

Usage:

  • Save ghost-auth.sh locally
  • With Ghost running on localhost:2368
  • sh ghost-auth.sh {admin api key} to run

Gotchas:

@ErisDS
ErisDS / README.md
Last active Jan 26, 2019
Deployment tools for Ghost themes
View README.md

Gulp tools to deploy a Ghost theme

To set it up:

  • copy gulp-config.json.example to gulp-config.json
  • enter the blog admin url, no trailing slash, e.g. https://myblog.ghost.io
  • grab the client secret for the frontend from the source of any page of the blog
  • enter the email address & password you use to login to the blog (must be administrator-level)

To deploy:

@ErisDS
ErisDS / changelog.md
Last active Jul 26, 2017 — forked from kevinansfield/changelog.md
Full 1.0.0 Changelog
View changelog.md

Highlights

  • [New] A brand new editor based on Mobiledoc, using SimpleMDE & Markdown-it to recreate full markdown support
  • [New] Casper 2.0 - an overhaul that makes use of all of Ghost's best theme features
  • [New] Improved default posts, explaning more features and a welcome tour to guide users around
  • [New] Nightshift mode light text on a dark background for editing at night, available in labs
  • [New] Config with nconf, logging with bunyan, and debug output using debug.
  • [Improved] Publish menu which brings scheduling front and centre, instead of it being an after thought
  • [Improved] Simplified content screen with filtering makes it easier to find
  • [Improved] The importer has had a complete overhaul, is now more robust and outputs much, much better error & warning messages when things do go awry
@ErisDS
ErisDS / README.md
Last active Nov 5, 2017
Ansible tips for Ghost-Cli TODO: make this a proper repo
View README.md

This assumes that you have already installed:

  • mariadb/mysql (no example provided)
  • node v6 (see node-install.yml)
  • ghost-cli latest (see ghost-cli-install.yml)
  • nginx (see nginx-install-config.yml)

After that, running install-ghost.yml will:

  • create you a db user (ghost cli may take this over in future)
@ErisDS
ErisDS / event_types.json
Created Jun 7, 2017
All Chargebee v2 Events as a JSON object.
View event_types.json
[
{
"name": "plan_created",
"trigger": "Triggered when a plan is created",
"resources": ["plan"]
},
{
"name": "plan_updated",
"trigger": "Triggered when a plan is changed",
"resources": ["plan"]
@ErisDS
ErisDS / ansible.cfg
Last active May 12, 2017
Provision Ghost using the DO image & login to get the bash script to run
View ansible.cfg
[defaults]
host_key_checking = False
@ErisDS
ErisDS / recurly-xml-to-json.js
Created May 11, 2017
Convert Recurly XML to JSON, with promises.
View recurly-xml-to-json.js
'use strict';
const _ = require('lodash');
const Promise = require('bluebird');
const debug = require('ghost-ignition').debug('xml2json');
const xmlParseOptions = {
explicitArray: false
};
const parser = new require('xml2js').Parser(xmlParseOptions);
const convertableTypes = ['integer', 'datetime', 'array'];
@ErisDS
ErisDS / setup.md
Last active Apr 13, 2019
Setup steps for installing Ghost on a fresh Ubuntu 16.04 server
View setup.md

Variables:

<server_ip> - ip of the server the blog is being installed on - name for the server e.g. "myblog" - domain name e.g. "myblog.mycompany.com" <ghost_mysql_pw> - a password for a ghost user in mysql <ssl_email> - an email address for letsencrypt

Steps to get from Ubuntu 16.04 fresh install to Ghost

Largely based on the following:

You can’t perform that action at this time.