Skip to content

Instantly share code, notes, and snippets.

View ethanhinson's full-sized avatar

Ethan Hinson ethanhinson

View GitHub Profile
@ethanhinson
ethanhinson / drupal-installation-ec2-ami.sh
Created October 14, 2015 00:35 — forked from Mulkave/drupal-installation-ec2-ami.sh
Script to install drupal on Amazon AWS EC2 instances (AMI)
# update
sudo yum -y update
# install nginx -- the web server to be used with this installation
# for virtual host configuration visit https://gist.github.com/Mulkave/6103129
sudo yum install nginx
# install php and mysql
sudo yum -y install mysql mysql-server php54 php54-cli php54-gd php54-intl php54-mbstring php54-mcrypt php54-mysql php54-pdo php-pear php54-xml php54-xmlrpc
curl --header 'Authorization: token INSERTACCESSTOKENHERE' \
--header 'Accept: application/vnd.github.v3.raw' \
--remote-name \
--location https://api.github.com/repos/owner/repo/contents/path
# Example...
TOKEN="INSERTACCESSTOKENHERE"
OWNER="BBC-News"
REPO="responsive-news"
function countCSSRules() {
var results = '',
log = '';
if (!document.styleSheets) {
return;
}
for (var i = 0; i < document.styleSheets.length; i++) {
countSheet(document.styleSheets[i]);
}
function countSheet(sheet) {
<?php
if ( ! class_exists( 'Autoload_WP' ) ) {
/**
* Generic autoloader for classes named in WordPress coding style.
*/
class Autoload_WP {
public $dir = __DIR__;