Skip to content

Instantly share code, notes, and snippets.

{
"type": "discount",
"data": {
"name": "Luna and Gryff - £5 Off",
"description": "£5 Off",
"code": "LUNAGRYFF",
"start-date": null,
"end-date": null,
"per-item-discount": 0,
"per-item-percentage-off": "-0",
<html>
<head><title>Test Page</title></head>
<body>
<h1>Test Page</h1>
<div id="block-one">
<h2>Block One</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Elementum eu facilisis sed odio. Vel orci porta non pulvinar neque. Sed libero enim sed faucibus turpis. Sed turpis tincidunt id aliquet risus feugiat in. Erat nam at lectus urna duis. Tellus cras adipiscing enim eu turpis. Malesuada fames ac turpis egestas integer eget aliquet nibh praesent. Consectetur a erat nam at. Porttitor lacus luctus accumsan tortor posuere ac. Sit amet aliquam id diam maecenas. Lectus quam id leo in vitae turpis massa. Ullamcorper a lacus vestibulum sed arcu non odio euismod lacinia. Massa eget egestas purus viverra. Ultrices vitae auctor eu augue. Lectus proin nibh nisl condimentum id venenatis a condimentum vitae. Faucibus nisl tincidunt eget nullam non nisi est sit. Vitae justo eget magna fermentum iaculis eu non.</p>
@cole007
cole007 / ma_dec_2018.md
Created December 12, 2018 15:39
MA Presentations, 12 Dec 2018

MA Presentations, 12 Dec 2018

Crit #1 - Business/Cultural Context

Sasha (Oleksandra): Portal for Teenagers on Mental Health in Ukraine.

Current situation:

  • highest % in Europe (WHO)
  • low access to treatment and support

Solution:

@cole007
cole007 / .htaccess
Created November 8, 2017 14:34
SR conf
# Apache Server Configs v2.14.0 | MIT License
# https://github.com/h5bp/server-configs-apache
# (!) Using `.htaccess` files slows down Apache, therefore, if you have
# access to the main server configuration file (which is usually called
# `httpd.conf`), you should add this logic there.
#
# https://httpd.apache.org/docs/current/howto/htaccess.html.
# ######################################################################
@cole007
cole007 / digitalocean.md
Last active November 22, 2023 16:54
Digital Ocean internal migration - moving files between droplets over SSH/SCP

If you need to move a lot of files between DO server you can move these through SCP over the internal private Digital Ocean network.

NB both droplets need to be within the same region

To do this you need:

  1. enable private network for each droplet (if not done at creation, note the droplet needs to be off for this to be enabled once live)
  2. ensure that eth1 is enabled for both droplets if not already - see https://www.digitalocean.com/community/tutorials/how-to-enable-digitalocean-private-networking-on-existing-droplets
  3. scp files from the source server to the destination server are sent like:
@cole007
cole007 / greens-2017.md
Last active May 12, 2017 08:50
An open letter to the Green party regarding Somerton and Frome constituency

Dear Green Party executives, supporters and members,

I appreciate this is an extremely busy time to be in politics but I beg for a moment of your time as a frustrated member of the Green Party.

My whole adult life I have voted Liberal Democrats and fiercely challenged anyone who said that mine was a wasted vote. I was disheartened then in 2010 with their decision to go into alliance with the Conservative party, a party who's policies and values I fiercely oppose. I wrote to every Liberal Democrat MP saying I would never vote for them again and that my trust for them had been destroyed. In the run up to the 2015 General Election I joined the Green Party in my constituency of Somerton and Frome and was delighted that they were the third best represented at the ballot.

When Theresa May announced a snap election earlier this month I attended a meeting in Frome from disconcerted members of the constituency that were concerned about a divided left come June 8th and the potential impotence against a Tory incumben

@cole007
cole007 / brexit cost.md
Created January 24, 2017 10:41
The true cost of Brexit?

Cost of EU Referendum: £142.4m

This cost pales compared to the impact EU Refendum has had on the UK Foreign Exchange reserves. These are reserves stored in gold and foreign currencies that are used to support the British Economy, comprising of foreign assets held or controlled by the Bank of England.

These are conventionally stored and calculated in US Dollars. So without consideration of any sales of these reserves since last June we can use this as a broad/crude metric to show the impact of the Brexit decision on UK economic reserves.

An immediate and significant impact of the referendum was the fall in the value of the pound. Whilst this has an immediate impact to the cost of goods arriving into the UK, as well as the money in our pockets when we travel it has a massive impact on the collateral available to the UK at times of economic insecurity or instability.

Since the June referendum, the value of the pound to the dollar has fallen from 1.4 > 1.2. We can see that in June 2016

@cole007
cole007 / rogueone.md
Last active January 2, 2021 21:26
Why Rogue One is my favourite Star Wars film

Star Wars, socialism and twentieth century models of historiography [^1]

Warning: this brain dump contains spoilers for Rogue One

Earlier this week I took my son to see Rogue One when he was off school sick. I was hoping for a good film - I'm a big fan of Gareth Edwards' previous offerings Monsters and Godzilla, and of course a massive fan of the original Star Wars films - but I didn't have any particular expectations; especially as this was the first Star Wars film to sit outside the main canon (perhaps excluding Caravan of Courage).

What I wasn't expecting was to love it. It was a different take on a universe I had grown up loving, replete in the visual and auditory iconography of the original trilogy. But it had license to do things differently, from the score to the opening crawl. There were nods throughout to the original films that this preceded, and of course the plot

@cole007
cole007 / letter.md
Last active November 18, 2016 22:06

An open letter to the leaders of the Opposition parties:

Jeremy Corbyn, leader of the Labour Party
Nicola Sturgeon, leader of the SNP
Tim Farron, leader of the Liberal Democrats
Leanne Wood, leader of Plaid Cymru
Caroine Lucas, leader of the Green Party

I was born in 1975, amongst the first of Briton's born into the decision by referendum to remain within the EEC. I have thus always been European, something I grew up proud of, particularly as the grandson of a refugee who came to England after her family fled political persecution from the National Socialists in Germany. As a child I enjoyed trips to France, Spain and Germany, experiencing new cultures and reinforcing my upbringing that we are but one part of a larger whole within Europe. And now, in the wake of Brexit I am seeing this sentiment crumble with a rise of nationalism, xenophobia and racism.

@cole007
cole007 / entries.twig
Last active October 12, 2016 13:23
Craft simple pagination macro
{% set q = craft.request.getParam('q') %}
{% set limit = 20 %}
{% for item in filtered|slice((q * limit),limit) %}
<p>{{ item.title }}</p>
{% endfor %}
{{ _self.paginate(filtered, q, limit) }}