Skip to content

Instantly share code, notes, and snippets.

View centminmod's full-sized avatar

George Liu (eva2000) centminmod

View GitHub Profile
@centminmod
centminmod / ghostsitemap.sh
Created November 10, 2013 02:28 — forked from vbtechsupport/ghostsitemap.sh
SHELL: ghostsitemap.sh
#!/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
@centminmod
centminmod / ghost1
Created November 10, 2013 02:28 — forked from vbtechsupport/ghost1
SHELL: ghost1 CentOS init.d 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:
@centminmod
centminmod / gist:7486490
Created November 15, 2013 15:48
custom index.hbs foreach post loop used on ghost.centminmod.com
<main class="content" role="main">
{{! Each post will be output using this markup }}
{{#foreach posts}}
{{#if @first}}
<article class="{{post_class}}" itemscope itemtype="http://schema.org/BlogPosting">
<header class="post-header">
<span class="post-meta"><time datetime="{{date format='YYYY-MM-DD'}}" itemprop="datePublished">{{date format="DD MMM YY"}}</time> {{#if tags}}| {{tags}}{{/if}} | <a href="{{url absolute="true"}}#disqus_thread" data-disqus-identifier="{{id}}">Comments</a></span>
<h2 class="post-title"><a href="{{url}}" itemprop="url"><span itemprop="name headline">{{{title}}}</span></a></h2>
</header>
<section class="post-excerpt" itemprop="articleBody">
@centminmod
centminmod / rsnapshot_email_sample
Last active December 28, 2015 17:29
RSNAPSHOT: Email rsnapreport sample for Centminmod based server
SOURCE TOTAL FILES FILES TRANS TOTAL MB MB TRANS LIST GEN TIME FILE XFER TIME
--------------------------------------------------------------------------------------------------------------------
/etc 1553 3 23.14 0.01 0.001 seconds 0.000 seconds
/home/nginx 22 0 0.02 0.00 0.001 seconds 0.000 seconds
/root/centminlogs 4 0 2.48 0.00 0.001 seconds 0.000 seconds
/root/centminmod 8 0 0.00 0.00 0.001 seconds 0.000 seconds
/root/tools 2 0 0.00 0.00 0.001 seconds 0.000 seconds
/usr/local/etc 9 0 0.04 0.00 0.001 seconds 0.000 seconds
/usr/local/nginx/conf 41 0 0.06 0.00 0
#!/bin/sh
#
# ghost - this script starts the ghost blogging package
#
# chkconfig: - 95 20
# description: ghost is a blogging platform built using javascript \
# and running on nodejs
#
# Source function library.
# Varnish VCL file for Ghost blogging platform.
# http://ghost.org/
#
# Written for Ghost v0.3.0.
backend default {
.host = "blog-jniedbalski.rhcloud.com";
.port = "80";
@centminmod
centminmod / renamedb
Created December 24, 2013 19:23
renamedb
#!/bin/bash
# Copyright 2013 Percona LLC and/or its affiliates
set -e
if [ -z "$3" ]; then
echo "rename_db <server> <database> <new_database>"
exit 1
fi
db_exists=`mysql -h $1 -e "show databases like '$3'" -sss`
if [ -n "$db_exists" ]; then
echo "ERROR: New database already exists $3"
@centminmod
centminmod / wpcli.sh
Created January 7, 2014 04:47
wpcli.sh revised installer rewritten with new wp-cli.org installation method
#!/bin/bash
###############################################
# Official centminmod.com addon: wpcli.sh installer
# written by George Liu (eva2000) vbtechsupport.com
###############################################
# http://wp-cli.org/
# WP-CLI is a set of command-line tools for managing WordPress
# installations. You can update plugins, set up multisite installs,
# create posts etc
###############################################
@centminmod
centminmod / geoip.sh
Created January 16, 2014 16:53
geoip.sh is official Centmin Mod Addon script to install GeoIP database and libraries for Centmin Mod installations on CentOS servers. centminmod.com
#!/bin/bash
######################################################
# written by George Liu (eva2000) vbtechsupport.com
######################################################
# variables
#############
DT=`date +"%d%m%y-%H%M%S"`
CENTMINLOGDIR='/root/centminlogs'
DIR='/svr-setup'
######################################################
@centminmod
centminmod / gist:8773625
Created February 2, 2014 19:40
Testing PHP Int / ICU extension and general PHP extension support in Jailkit chrooted Centmin Mod Nginx vhost user account
jk_cp -j /home/chroot_shell/ /etc/centminmod/php.d
/home
Copying /etc/centminmod/php.d/memcache.ini to /home/chroot_shell/etc/centminmod/php.d/memcache.ini
Copying /etc/centminmod/php.d/imagick.ini to /home/chroot_shell/etc/centminmod/php.d/imagick.ini
Copying /etc/centminmod/php.d/apc.ini to /home/chroot_shell/etc/centminmod/php.d/apc.ini
Copying /etc/centminmod/php.d/memcached.ini to /home/chroot_shell/etc/centminmod/php.d/memcached.ini
Copying /etc/centminmod/php.d/igbinary.ini to /home/chroot_shell/etc/centminmod/php.d/igbinary.ini
jk_cp -j /home/chroot_shell/ /usr/local/lib/php/extensions
/home