Skip to content

Instantly share code, notes, and snippets.

Avatar

George Liu (eva2000) centminmod

View GitHub Profile
@centminmod
centminmod / ghostsitemap.sh
Created Nov 10, 2013 — forked from vbtechsupport/ghostsitemap.sh
SHELL: ghostsitemap.sh
View 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 Nov 10, 2013 — forked from vbtechsupport/ghost1
SHELL: ghost1 CentOS init.d script
View ghost1
#!/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 Nov 15, 2013
custom index.hbs foreach post loop used on ghost.centminmod.com
View gist:7486490
<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 Dec 28, 2015
RSNAPSHOT: Email rsnapreport sample for Centminmod based server
View rsnapshot_email_sample
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
View ghost.sh
#!/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.
View default.vcl
# 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";
View 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 Jan 7, 2014
wpcli.sh revised installer rewritten with new wp-cli.org installation method
View wpcli.sh
#!/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 Jan 16, 2014
geoip.sh is official Centmin Mod Addon script to install GeoIP database and libraries for Centmin Mod installations on CentOS servers. centminmod.com
View geoip.sh
#!/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 Feb 2, 2014
Testing PHP Int / ICU extension and general PHP extension support in Jailkit chrooted Centmin Mod Nginx vhost user account
View gist:8773625
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