Skip to content

Instantly share code, notes, and snippets.

🍊
👍

Harry Harrison Harry-Harrison

View GitHub Profile
@Harry-Harrison
Harry-Harrison / lazybgimg.html
Created May 18, 2017 — forked from simboonlong/lazybgimg.html
custom lazy load background image for slick.js
View lazybgimg.html
<html>
<head>
<link rel="stylesheet" type="text/css" href="//cdn.jsdelivr.net/jquery.slick/1.6.0/slick.css"/>
<link rel="stylesheet" type="text/css" href="//cdn.jsdelivr.net/jquery.slick/1.6.0/slick-theme.css"/>
<script type="text/javascript" src="https://code.jquery.com/jquery-1.12.0.min.js"></script>
<script type="text/javascript" src="//cdn.jsdelivr.net/jquery.slick/1.6.0/slick.min.js"></script>
<style>
#s {
border: solid 1px red;
width: 640px;
@Harry-Harrison
Harry-Harrison / countries.json
Last active Mar 14, 2019
Freeform Craft select field for countries of Earth.
View countries.json
[{"label":"Afghanistan", "value":"Afghanistan"},{"label":"Aland Islands", "value":"Aland Islands"},{"label":"Albania", "value":"Albania"},{"label":"Algeria", "value":"Algeria"},{"label":"American Samoa", "value":"American Samoa"},{"label":"Andorra", "value":"Andorra"},{"label":"Angola", "value":"Angola"},{"label":"Anguilla", "value":"Anguilla"},{"label":"Antarctica", "value":"Antarctica"},{"label":"Antigua and Barbuda", "value":"Antigua and Barbuda"},{"label":"Argentina", "value":"Argentina"},{"label":"Armenia", "value":"Armenia"},{"label":"Aruba", "value":"Aruba"},{"label":"Australia", "value":"Australia"},{"label":"Austria", "value":"Austria"},{"label":"Azerbaijan", "value":"Azerbaijan"},{"label":"Bahamas", "value":"Bahamas"},{"label":"Bahrain", "value":"Bahrain"},{"label":"Bangladesh", "value":"Bangladesh"},{"label":"Barbados", "value":"Barbados"},{"label":"Belarus", "value":"Belarus"},{"label":"Belgium", "value":"Belgium"},{"label":"Belize", "value":"Belize"},{"label":"Benin", "value":"Benin"},{"label":"B
@Harry-Harrison
Harry-Harrison / readme.md
Created Mar 21, 2017
My experience with Sky Broadband's support.
View readme.md

Day Zero - 15th March, Wednesday

My internet cut off at exactly 6pm on the 15th of March.

Day One - 16th March, Thursday

I contacted Sky on the morning of the 16th regarding the fact my internet connection had died and wasn’t coming back. This happens every few weeks without fail, but often comes back. Sky told me the issue was with the line coming into the house and definitely not with the router and have done on all previous calls also. We arranged for Openreach to come check the issue out Friday.

Day Two - 17th March, Friday

Friday came with no update. I called Sky to find out what was happening, and apparently Sky had been told that Openreach would need to get into the property as well so an appointment needed to be scheduled. Sky didn’t feel the need to let me know, and instead I had to contact them. We made an appointment for Openreach to come over Saturday between 13:00 and 18:00. I confirmed that appointment with Sky by text Friday afternoon at 14:00. That evening a Sky rep called me to ch

@Harry-Harrison
Harry-Harrison / wash-dash.js
Created Oct 4, 2016
Dash Button Node.js Interceptor Washing Timer Extraordinaire Limited Revengence
View wash-dash.js
var dash_button = require('node-dash-button'),
dash = dash_button('MAC ADDRESS', null, null, 'udp'); // Needs the MAC address of the dash button specifically.
var harryIFTTT = require('iftttmaker')('KEY'), // Unique key's for IFTTT Maker Channels.
megIFTTT = require('iftttmaker')('KEY');
var message = {
start: '⏳ Wash has started!\nPut your feet up.',
finish: '⌛️ Wash is finished!\nGet it out.'
};
dash.on("detected", function () {
harryIFTTT.send('washdash_go', message.start);
View chalk-examples.js
console.log(chalk.bold('Hello, World!'));
console.log(chalk.dim('Hello, World!'));
console.log(chalk.italic('Hello, World!'));
console.log(chalk.underline('Hello, World!'));
console.log(chalk.inverse('Hello, World!'));
console.log('-----');
console.log(chalk.red('Hello, World!') + ' ' + chalk.inverse.red('Hello, World!'));
console.log(chalk.green('Hello, World!') + ' ' + chalk.inverse.green('Hello, World!'));
console.log(chalk.yellow('Hello, World!') + ' ' + chalk.inverse.yellow('Hello, World!'));
console.log(chalk.blue('Hello, World!') + ' ' + chalk.inverse.blue('Hello, World!'));
@Harry-Harrison
Harry-Harrison / confi.cson
Created Jan 12, 2016
Atom Config (Without personal IDs)
View confi.cson
"*":
"exception-reporting":
userId: ""
welcome:
showOnStartup: false
core:
disabledPackages: [
"language-clojure"
"language-csharp"
"language-go"
@Harry-Harrison
Harry-Harrison / hover-killer.js
Created Dec 21, 2015
Disable :hover on touch devices - This is a bug fixer. Careful as it modifies the CSS to ignore hover rules.
View hover-killer.js
if ('createTouch' in document) {
try {
var ignore = /:hover/;
for (var i=0; i<document.styleSheets.length; i++) {
var sheet = document.styleSheets[i];
for (var j=sheet.cssRules.length-1; j>=0; j--) {
var rule = sheet.cssRules[j];
if (rule.type === CSSRule.STYLE_RULE && ignore.test(rule.selectorText)) {
sheet.deleteRule(j);
}
@Harry-Harrison
Harry-Harrison / private.xml
Created Dec 21, 2015
Karabiner Media Key Setup
View private.xml
<?xml version="1.0"?>
<root>
<item>
<name>Media Keys Always</name>
<identifier>Media-Keys-Always</identifier>
<!-- Volume Up -->
<autogen>
__KeyToKey__
KeyCode::PAGEUP, ModifierFlag::NONE, ConsumerKeyCode::VOLUME_UP
</autogen>
@Harry-Harrison
Harry-Harrison / automatic-pages.php
Created Nov 27, 2015
Wordpress Plugin that creates pages on theme activation
View automatic-pages.php
if (isset($_GET['activated']) && is_admin()) {
add_action('init', 'cs_create_initial_pages');
}
function cs_create_initial_pages() {
$default_page_settings = array(
'post_type' => 'page',
'post_name' => '',
'post_status' => 'publish',
'post_author' => 1,
@Harry-Harrison
Harry-Harrison / addvh
Last active Aug 29, 2015
Apache VirtualHost Creation Scripts
View addvh
#!/bin/bash
# Config
# Meant for use with Ubuntu 14.x, for 12.x remove and references to `.conf`
email='' # Email address of administrator
vhroot='/var/www' # No trailing slash!
savail='/etc/apache2/sites-available' # No trailing slash!
# Create the new document root folder
if [ "$1" = "" ]
You can’t perform that action at this time.