Skip to content

Instantly share code, notes, and snippets.

Ken Prince kjprince

Block or report user

Report or block kjprince

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
View NGiNX-Site.txt
# ------------------------------------------------------------------------
# REMOVE WWW PREFIX ------------------------------------------------------
# ------------------------------------------------------------------------
server {
server_name *.[sitename];
# remove all sub domains and www
rewrite ^/(.*)$ http://[sitename]/$1 permanent;
}
View NGiNX-Site.txt
# ------------------------------------------------------------------------
# REMOVE WWW PREFIX ------------------------------------------------------
# ------------------------------------------------------------------------
server {
server_name *.[sitename];
# remove all sub domains and www
rewrite ^/(.*)$ http://[sitename]/$1 permanent;
}
@kjprince
kjprince / puppet_bootstrap.sh
Last active Aug 29, 2015
Bootstrap your puppet installation on a fresh box
View puppet_bootstrap.sh
#!/usr/bin/env bash
# Pre install script to install the a specific version of puppet
# If no parameter is supplied, the lastest version will be installed
# Thanks to: https://gist.github.com/dol/5776169
# Corresponds to Vagrantfile line
VERSION=""
if [ -n "$1" ]
then
VERSION="$1"
fi
@kjprince
kjprince / Vagrantfile
Last active Aug 29, 2015
Vagrantfile for bootstrapping wordpress multi-site network
View Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "jeter"
config.vm.box_url = "~/Downloads/debian-wheezy64.box"
@kjprince
kjprince / Wordpress Nginx Config
Last active Nov 3, 2018
/etc/nginx/wordpress.conf
View Wordpress Nginx Config
##################################
# WORDPRESS NGINX CONFIGURATIONS
##################################
# /etc/nginx/wordpress.conf
#
# Contains a common configuration for use by nginx on a WordPress
# installation. This file should be included in any WordPress site
# nginx virtual host config located in sites-available with the following line:
#
# include /etc/nginx/wordpress.config;
@kjprince
kjprince / alternative nginx.conf
Last active Jul 27, 2018
/etc/nginx/nginx.conf
View alternative nginx.conf
# See this setup: http://polihronov.wordpress.com/
#
#
user www-data;
worker_processes 1;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
# multi_accept on;
@kjprince
kjprince / local-config.php
Created Mar 14, 2014
local-config.php for wordpress
View local-config.php
<?php
/*
This is a sample local-config.php file
In it, you *must* include the four main database defines
You may include other settings here that you only want enabled on your local development checkouts
This file should be ignored in your .gitignore file
*/
@kjprince
kjprince / NGINX Virtual Host
Created Mar 15, 2014
/etc/nginx/sites-available/mysite.com
View NGINX Virtual Host
# Virtual Host File
# Common wordpress configurations included in /etc/nginx/wordpress.conf
# All virtual hosts including this one are symlinked to /etc/nginx/sites-enabled
# Make sure you replace "mysite" with your domain name
server {
listen 80 default_server;
listen 443 ssl;
server_name mysite.com www.mysite.com *.mysite.com;
View test.md

Header 1

Overview {#overview}

Philosophy {#philosophy}

Markdown is intended to be as easy-to-read and easy-to-write as is feasible.

@kjprince
kjprince / backup-cron
Created Feb 17, 2015
Server Cron Job and Backup
View backup-cron
# ------------------------------------------------------------------------------
# SETUP CRON JOBS 4 Backup + Server Love ---------------------------------------
# ------------------------------------------------------------------------------
# Start by opening the default logger
nano /etc/rsyslog.d/50-default.conf
# Start tracking cron jobs
Uncomment: cron.* [remove the "#" around line 10]
Uncomment: daemon.* [remove the "#" around line 11]
You can’t perform that action at this time.