The following example migrates archies.amasan.co.uk into the amasan.co.uk network.
Backup the original site:
set("log.file",false) | |
set("log.stdout",true) | |
source_url = "http://localhost:8000/traktor.ogg" | |
output_host = "example.com" | |
output_port = 8124 | |
output_pass = "mypassword" | |
s = input.http(buffer=4.0,source_url) |
<?php | |
try { | |
// Decode JSON data from Github | |
$payload = json_decode($_REQUEST['payload']); | |
} | |
catch(Exception $e) { | |
exit(0); | |
} | |
// Deploy live if push was on master branch |
#!/bin/sh | |
sudo su | |
# fix hostname | |
nano /etc/hostname | |
hostname -F /etc/hostname | |
echo "#12.34.56.78 plato.example.com plato | |
#127.0.0.1 localhost.localdomain localhost" | cat - /etc/hosts > /tmp/hosts && mv /tmp/hosts /etc/hosts | |
nano /etc/hosts |
#!/bin/bash | |
# version 1.0.0 - 21 march 2012 | |
echo "Enter Hostname:" | |
read AVS_HOSTNAME | |
echo | |
echo "Enter webmaster email for '${AVS_HOSTNAME}':" | |
read AVS_WEBMASTER | |
echo | |
echo "Generating directories in ${HOME}/projects/${AVS_HOSTNAME}..." |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>404 Page Not Found</title> | |
<style type="text/css"> | |
::selection { background-color: #E13300; color: white; } | |
::-moz-selection { background-color: #E13300; color: white; } |
<?php | |
class MyDataObject extends DataObject | |
{ | |
public function getCMSFields() | |
{ | |
$fields = parent::getCMSFields(); | |
// Place a unique value constraint MyDataObjects table, MyCode column | |
$myAjax = new MyAjaxUniqueTextField('MyCode', 'My Code', 'MyCode', 'MyDataObject', "", null, null, null, $this->ID); |
# binit - new backup repository | |
# bcom <filename> - backup file to git repo keeping path | |
# bex <command> - execute command and log the command to history | |
# | |
# Add this to .bashrc then use the above commands. Still does not work as well as ansible I presume. | |
backup_commit() { | |
# backup file if argument is provided | |
if [ "$#" -gt 0 ] | |
then |
// Bindings | |
bind x "weapnext" | |
bind z "+movedown" | |
bind ENTER "ui_selectgear" | |
// Funstuff | |
funfree patch,pimpbk,pbeard | |
funred patch,pimpbk,pbeard | |
funblue patch,pimpbk,pbeard |
#!/bin/bash | |
# exit if not 1 argument | |
if [[ $# -ne 1 ]] ; then | |
echo 'This script accepts 1 argument.' | |
exit 1 | |
fi | |
rm /etc/nginx/sites-enabled/$1 | |
sudo nginx -t && sudo service nginx reload |
The following example migrates archies.amasan.co.uk into the amasan.co.uk network.
Backup the original site: