Skip to content

Instantly share code, notes, and snippets.

Avatar

Cole Henley cole007

View GitHub Profile
View test.html
<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 Dec 12, 2018
MA Presentations, 12 Dec 2018
View ma_dec_2018.md

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:

View .htaccess
# 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 Oct 27, 2020
Digital Ocean internal migration - moving files between droplets over SSH/SCP
View digitalocean.md

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
An open letter to the Green party regarding Somerton and Frome constituency
View greens-2017.md

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 Jan 24, 2017
The true cost of Brexit?
View brexit cost.md

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 Jan 2, 2021
Why Rogue One is my favourite Star Wars film
View rogueone.md

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

View letter.md

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 Oct 12, 2016
Craft simple pagination macro
View entries.twig
{% 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) }}
@cole007
cole007 / 404.html
Created Mar 16, 2016
Please add pi.search_assistance.php to /deploy/system/expressionengine/third_party/search_assistance/pi.search_assistance.php
View 404.html
{layout="_layouts/_main"}
{layout:set name="extra_metas"}
<meta name="robots" value="noindex,nofollow,noarchve">
{/layout:set}
<div class="wrapper">
<div class="page__main">
<nav class="nav nav--breadcrumbs">
<ul>
<li><a href="/">Home</a></li>