This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/php -q | |
<?php | |
/* Really nasty, really fast hack to extract all wordpress articles to .html files. | |
* Please test before using. It worked for a particular site to save time copy and pasting. | |
* There is no garantee it will work for you. | |
* | |
* Note this a php CLI script don't run from browser. | |
* | |
* I then used this to convert them to markdown files. | |
* find ./ -iname "*.html" -type f -exec sh -c 'pandoc "${0}" -o "./markdown/$(basename ${0%.html}.md)"' {} \; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
yum -y update | |
yum -y install vim wget curl | |
yum -y install http://www.percona.com/downloads/percona-release/redhat/0.1-3/percona-release-0.1-3.noarch.rpm | |
yum -y install Percona-Server-server-56 | |
yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm | |
yum -y install https://mirror.webtatic.com/yum/el6/latest.rpm | |
yum -y install php56w php56w-opcache php56w-fpm php56w-mysql mlocate vim redis php56w-pecl-redis memcached | |
yum -y install http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm | |
yum -y install monit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[yum.gray.me.uk] | |
name=Gray Repos | |
baseurl=http://yum.gray.me.uk/ | |
gpgcheck=1 | |
#repo_gpgcheck=1 | |
gpgkey=http://yum.gray.me.uk/RPM-GPG-KEY-karl-rpm.txt | |
enabled=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
yum -y install https://rhel6.iuscommunity.org/ius-release.rpm | |
yum --enablerepo=ius install git python27 python27-devel python27-pip python27-setuptools python27-virtualenv -y | |
yum install git | |
cd /root/ | |
git clone https://github.com/letsencrypt/letsencrypt | |
cd letsencrypt/ | |
./letsencrypt-auto certonly -d secure.domain.co.uk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
/** | |
* My Model | |
* | |
* Used as a base class for all admin or app related model functions. | |
* | |
* @author Alex Garcia | |
* @since 0.1 | |
* @version 1 | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DROP TABLE IF EXISTS time_dimension; | |
CREATE TABLE time_dimension ( | |
id INTEGER PRIMARY KEY, -- year*10000+month*100+day | |
db_date DATE NOT NULL, | |
year INTEGER NOT NULL, | |
month INTEGER NOT NULL, -- 1 to 12 | |
day INTEGER NOT NULL, -- 1 to 31 | |
quarter INTEGER NOT NULL, -- 1 to 4 | |
week INTEGER NOT NULL, -- 1 to 52/53 | |
day_name VARCHAR(9) NOT NULL, -- 'Monday', 'Tuesday'... |