Skip to content

Instantly share code, notes, and snippets.

@vbtechsupport
vbtechsupport / ghostsitemap.sh
Last active January 24, 2023 11:41
Ghost sitemap generator for ghost.centminmod.com
#!/bin/bash
##############################################
# modified version of original http://media-glass.es/ghost-sitemaps/
# for ghost.centminmod.com
# http://ghost.centminmod.com/ghost-sitemap-generator/
##############################################
url="ghost.centminmod.com"
webroot='/home/nginx/domains/ghost.centminmod.com/public'
path="${webroot}/sitemap.xml"
user='nginx' # web server user
@vbtechsupport
vbtechsupport / ghost1
Last active August 16, 2016 08:28
ghost.centminmod.com CentOS 6.4 init.d startup script configured for per Ghost install instance + clearing Nginx proxy_cache on restart. http://ghost.centminmod.com/ghost-blog-node-js-init-startup-script/
#!/bin/bash
###########################################
# chkconfig: 2345 98 02
#
# description: PM2 next gen process manager for Node.js
# processname: ghost1
#
### BEGIN INIT INFO
# Provides: ghost1
# Required-Start:
@vbtechsupport
vbtechsupport / ghost1 output
Created October 23, 2013 12:56
sample ghost1 init startup script output
service ghost1 status
Status for ghost1:
PM2 Process listing
+------------------------------------------------------------------------------------------------------------+
¦ App Name ¦ id ¦ mode ¦ PID ¦ status ¦ Restarted ¦ Uptime ¦ memory ¦ err logs ¦
+----------+----+---------+-------+--------+-----------+--------+-----------+--------------------------------¦
¦ ghost1 ¦ 0 ¦ cluster ¦ 19706 ¦ online ¦ 1 ¦ 3m ¦ 65.621 MB ¦ /root/.pm2/logs/ghost1-err.log ¦
+------------------------------------------------------------------------------------------------------------+
PM2 PM2 log file path : /root/.pm2/pm2.log (type pm2 logs to see log streaming)
@vbtechsupport
vbtechsupport / config.js
Last active December 26, 2015 19:29
current Ghost config.js
// # Ghost Configuration
// Setup your Ghost install for various environments
var path = require('path'),
config;
config = {
// ### Development **(default)**
development: {
// The url to use when providing links to the site, E.g. in RSS and email.
@vbtechsupport
vbtechsupport / correct disqus code
Last active December 26, 2015 22:59
corrected disqus code
<div class=disqusbox>
<div><hr />
<p><strong>View or Post Comments</strong></p>
</div>
<div id="disqus_thread"><form onsubmit="my.loadDisqus();return false;" class=formBlock><input class=cmd type=submit value="Discuss"> <input class=cmd type=submit value="Feedback"> <input class=cmd type=submit value="Comments"></form></div>
<script>
var disqus_shortname = "yourdisqus_shortname";
// provide the following in the template, if necessary
// var disqus_url = "http://yourghostblogdomainname/";
var disqus_identifier = '{{id}}';
#!/bin/bash
DT=`date +"%d%m%y-%H%M%S"`
####################################################
# Copyright (C) 2012
# Program: vbmailqueue.sh
# by George Liu (eva2000) vbtechsupport.com
# Updated: June 3rd, 2012 AEST
SCRIPTNAME='vbmailqueue.sh'
SCRIPTURL='vbtechsupport.com'
SCRIPTAUTHOR='George Liu (eva2000)'