Skip to content

Instantly share code, notes, and snippets.

View deanpcmad's full-sized avatar
👨‍💻

Dean Perry deanpcmad

👨‍💻
View GitHub Profile
@ECHO OFF
REM This program is free software: you can redistribute it and/or modify
REM it under the terms of the GNU General Public License as published by
REM the Free Software Foundation, either version 3 of the License, or
REM (at your option) any later version.
REM
REM This program is distributed in the hope that it will be useful,
REM but WITHOUT ANY WARRANTY; without even the implied warranty of
REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#!/bin/sh
#
# graylog2-server: graylog2 message collector
#
# chkconfig: - 98 02
# description: This daemon listens for syslog and GELF messages and stores them in mongodb
#
CMD=$1
NOHUP=`which nohup`
JAVA_CMD=/usr/bin/java
<VirtualHost *:80>
ServerName graylog2.example.com
ServerAlias graylog2.example.com
DocumentRoot /opt/graylog2-web-interface/public
<Directory /opt/graylog2-web-interface/public>
Allow from all
Options -MultiViews
</Directory>
#!/bin/bash
apt-get update
apt-get -y upgrade
apt-get -y install build-essential libssl-dev openssl zlib1g zlib1g-dev psmisc libsasl2-dev libncurses5-dev libreadline-gplv2-dev screen libxml2-dev zip libxml2 libxslt1-dev libyaml-dev vlan ifenslave bridge-utils
apt-get -y install python python-setuptools
apt-get -y install git-core
@deanpcmad
deanpcmad / open_helper.rb
Created July 20, 2013 21:46
Ruby method for showing if you are open or closed
module OpenHelper
# Bank holiday dates from https://www.gov.uk/bank-holidays
if Time.now.year == 2013
DAYS = [
# "20 July 2013",
"26 August 2013",
"25 December 2013",
"26 December 2013"
]

Website Contract [month] [year]

Description of this Contract

This contract is not meant to trick or deceive you; the intention is purely to protect both parties. I have tried to keep the wording as plain as possible, but if anything is unclear, please let me know and I will be more than happy to clarify it with you. Also, until you sign it, please feel free to request to change bits of it to suit your requirements.

In short, [client name] is contracting me, [my name], to [description of my role] between [start date and finish date].

By signing this, you are confirming that you have the power and ability to enter into this contract on behalf of [client's company].

"Display all the categories"
https://api.freeagent.com/v2/categories
"Sales"
{"bank_transaction_explanation": { "bank_transaction": "34573457", "dated_on": "01-09-2013", "description": "Invoice #27 - Something", "entry_type": "Sales", "gross_value": "15.00" }}
"Bank/Finance Charge"
{"bank_transaction_explanation": { "bank_transaction": "34573456", "dated_on": "01-09-2013", "description": "Invoice #27 - Stripe Fee", "entry_type": "Bank/Finance Charges", "gross_value": "0.69" }}
BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
METHOD:PUBLISH
PRODID:iCalendar-Ruby
BEGIN:VEVENT
DESCRIPTION:something
DTEND:20131001T150000Z
DTSTAMP:20130930T223241
DTSTART:20131001T140000Z
<?php
require 'vendor/autoload.php';
/**
* Configuration
*/
$CONFIG = [
'timezone' => 'Europe/London',
'stripe' => [
#!/bin/bash
#
# Author: Dean Perry
#
#
shopt -s extglob
set -e
# Check if the user has sudo privileges.