Let's say you want to host domains first.com
and second.com
.
Create folders for their files:
upstream php-fpm { | |
server unix:/var/run/php5-fpm.sock; | |
} | |
server { | |
listen 80; | |
server_name www.example.com; | |
rewrite ^ http://example.com$request_uri?; | |
} |
// Basic XMPP bot example for HipChat using node.js | |
// To use: | |
// 1. Set config variables | |
// 2. Run `node hipchat_bot.js` | |
// 3. Send a message like "!weather 94085" in the room with the bot | |
var request = require('request'); // github.com/mikeal/request | |
var sys = require('sys'); | |
var util = require('util'); |
#! /bin/sh | |
# ================================================================== | |
# ______ __ _____ | |
# /_ __/___ ____ ___ _________ _/ /_ /__ / | |
# / / / __ \/ __ `__ \/ ___/ __ `/ __/ / / | |
# / / / /_/ / / / / / / /__/ /_/ / /_ / / | |
#/_/ \____/_/ /_/ /_/\___/\__,_/\__/ /_/ | |
# Multi-instance Apache Tomcat installation with a focus | |
# on best-practices as defined by Apache, SpringSource, and MuleSoft |
#!/bin/sh | |
# | |
# /etc/init.d/tomcat -- startup script for the Tomcat 7 servlet engine | |
# | |
# Modified init-Script from Ubuntu Tomcat init-script | |
# | |
# 2010 - Sebastian Mogilowski - http://www.mogilowski.net/2010/12/11/install-tomcat-7-on-debian-lenny-with-virtual-hosts-and-apache2-integration/ | |
# 2012 - Collin Peters - Added debug option | |
# | |
### BEGIN INIT INFO |
# Ignore configuration files that may contain sensitive information. | |
sites/*/*settings*.php | |
# Ignore paths that contain generated content. | |
cache/ | |
files/ | |
sites/*/files | |
sites/*/private | |
# Ignore default text files |
#!/bin/bash | |
# Following the guide found at this page | |
# http://programmingarehard.com/2014/03/17/behat-and-selenium-in-vagrant.html | |
echo "\r\nUpdating system ...\r\n" | |
sudo apt-get update | |
# Create folder to place selenium in |
#!/bin/bash | |
# Interval of calculation in seconds | |
INTERVAL="1" | |
if [ -z "$1" ]; then | |
echo | |
echo usage: $0 [network-interface] | |
echo | |
echo e.g. $0 eth0 |
#!/usr/bin/env bash | |
########################################################################## | |
# Shellscript: Backup and update WordPress using wp-cli | |
# Author : Paco Orozco <paco@pacoorozco.info> | |
# Requires : wp-cli | |
########################################################################## | |
# Changelog | |
# 20170125: 1.0 | |
# Adds a default option to upgrade only when it's needed. | |
# 20161220: 0.1 |
<?php | |
// Check if the input file exists | |
$inputFile = "_input_file_name.txt"; | |
// Function to break a line into two parts, aiming for equal number of characters, without breaking words | |
function breakLineEqually($line) { | |
$length = strlen($line); | |
$mid = intdiv($length, 2); |