Skip to content

Instantly share code, notes, and snippets.

@rowleyaj
rowleyaj / A Note
Last active September 28, 2022 18:23
PHP OOP Example - Showing namespaces, abstract classes, visibility, and inheritance
PHP OOP Example
===============
Showing the use of classes and how they can be related using inheritance.
$person = new Person();
Abstract classes can not be instantiated
Output:
@rowleyaj
rowleyaj / Apps
Created July 21, 2013 20:11
Apps to Install
Browsers
Chrome
http://www.google.com/intl/en_uk/chrome/browser/
Chrome Canary
https://www.google.co.uk/intl/en/chrome/browser/canary.html
Firefox
http://www.mozilla.org/en-US/firefox/new/
{
"auto_complete": true,
"auto_complete_commit_on_tab": true,
"auto_complete_delay": 50,
"auto_complete_selector": "source - comment",
"auto_complete_size_limit": 4194304,
"auto_complete_triggers":
[
{
"characters": "<",
@rowleyaj
rowleyaj / Info
Created August 17, 2013 17:22
Useful Info for machine setup
To use the brew version of PHP with Apache you need to link libphp5.so to the right version.
See below:
Alex at rowleyaj-mac in /usr/libexec/apache2
$ la libphp5*
lrwxr-xr-x 1 root wheel 57 Jul 23 23:11 libphp5.so -> /usr/local/Cellar/php53/5.3.26/libexec/apache2/libphp5.so
-rwxr-xr-x 1 root wheel 11591056 Jul 22 14:07 libphp5.so.bak
@rowleyaj
rowleyaj / README.md
Created January 8, 2014 17:49
NPM Proxy Cache

Setup an NPM Proxy Cache

See https://npmjs.org/package/npm-proxy-cache for more info

apt-get install node npm
npm install npm-proxy-cache -g
#do in screen/tmux or run as background process/service (ideally):
npm-proxy-cache -h 0.0.0.0 -p 14441 -t 604800 -v
/*
Call start() on console to run program.
May be a little rough around the edges, I'm trying to remember the
jQuery API from memory as my home internet's too slow to Google stuff.
Oh and it requires jQuery, because everything requires jQuery!
*/
function start() {
@rowleyaj
rowleyaj / stylesheet.css
Created August 8, 2014 13:29
Hacked up stylesheet for Jira to make it more like Trello
#ghx-board-name {
color: #F6F6F6;
}
#ghx-header {
background-color: #23719F;
}
#ghx-operations {
background-color: #23719F;
# Description:
# This script receives pages in the formats
# /usr/bin/curl -d host="$HOSTALIAS$" -d output="$SERVICEOUTPUT$" -d description="$SERVICEDESC$" -d type=service -d notificationtype="$NOTIFICATIONTYPE$ -d state="$SERVICESTATE$" $CONTACTADDRESS1$
# /usr/bin/curl -d host="$HOSTNAME$" -d output="$HOSTOUTPUT$" -d type=host -d notificationtype="$NOTIFICATIONTYPE$" -d state="$HOSTSTATE$" $CONTACTADDRESS1$
#
# Based on a gist by oremj (https://gist.github.com/oremj/3702073)
#
# Configuration:
# HUBOT_NAGIOS_URL - https://<user>:<password>@nagios.example.com/cgi-bin/nagios3
#
@rowleyaj
rowleyaj / Services.md
Created October 23, 2014 17:08
AWS Service Names to IAM Actions

A list of AWS service names to IAM names for use in policies.
I created this list from the policy generator as I couldn't find any documentation anywhere that lists these details.

Service Name IAM name
AWS Billing aws-portal
AWS Cloud Formation cloudformation
AWS CloudTrail cloudtrail
AWS Direct Connect directconnect

Keybase proof

I hereby claim:

  • I am rowleyaj on github.
  • I am rowleyaj (https://keybase.io/rowleyaj) on keybase.
  • I have a public key whose fingerprint is 0CD9 9CAB 6B6D 8535 2104 7FEC 01CF F025 0AE0 A256

To claim this, I am signing this object: