Skip to content

Instantly share code, notes, and snippets.

@cole007
cole007 / script.js
Created March 13, 2015 14:14
Google revised PPC code
window.onload = function() {
// document.getElementById('gclid_field').value = 'working';
var fields = document.querySelectorAll('.gclid_field');
for ( var i = 0; i < fields.length; i++ ) {
fields[i].value = readCookie('gclid');
}
}
@cole007
cole007 / freelance-2014.csv
Last active October 4, 2017 22:04
Freelance Rates 2014 (@asclearasmud)
Where are you based in the UK? How would you describe what you do? Is your primary skill set(s) How old are you? How many years have you been a web professional? How many years have you been freelance? What is your DAY (not hourly) rate? DAY RATE (clean) What is your HOUR (not daily) rate? HOUR RATE (clean) How do you primarily charge clients? Do you normally request a deposit before starting work on a project? Do you normally use a contract? Do you mostly work … What is the average value of projects you work on? What is your gender? Do you primarily charge a fixed rate or does your rate vary between clients? What is the average amount of time spent working on a project? How many projects do you tend to work on at any on time? What is your normal invoicing terms? Where do you primarily work? On average, how many hours a day do you normally work? On average, how many days a week do you normally work? Do you have an accountant? What accounting software do you use, if any? Accounting software (clean) Is fr

Repost from other day in case anybody missed it - tentatively thinking of parting with our beloved Fiat Multipla. Silver, 2005, Diesel. Perfect family/child-minder car (three seats up front, three in back). Runs fine, just passed MOT and perfect for running about town although a few cosmetic bumps and scratches. Serviced but in some need of minor repairs. 123,000 miles. Looking to replace with something better for commuting as wife works out at Stourhead. Anyone potentially interested before we look to sell online? Please message for more details

Yet the Tories have spent the last five years rolling out extreme measure without a mandate polling around 25% of the electorate at the polls. No quick fix but my god they have tried their hardest to make as big an impact as fast as possible with minimal accountability except to say that 'we inherited this mess.'

That is on the back of Labour pushing a Thatcherite centre left (banks too big to fail) and debt having gone up considerably in the last five years. Just because socialism doesn't work in one country doesn't mean it will fail in all countries. The one thing that excites me about SNP is their look to the socialist left leanings of the Scandinavian countries which consistently have much higher employment, happiness index, better education outcomes, better quality healthcare (including childcare and care for the elderly) and a far more equal distribution of wealth.

But no, let's look to the failed American economic model predicated on big businesses that have failed, a property bubble that has burst

@cole007
cole007 / index.html
Last active October 27, 2021 16:10
Shopify API filter for product prices
<!DOCTYPE html>
<html class="no-js">
<head>
<meta charset="utf-8">
<title>Shopify filtering Boilerplate</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="_assets/css/style.css">
</head>
<body>
@cole007
cole007 / app.js
Last active June 6, 2017 05:38
Shopify code samples
$(function($){
function doProducts(collection, limit) {
collection = typeof collection !== 'undefined' ? collection : 'books';
limit = typeof limit !== 'undefined' ? limit : 250;
var url = 'http://XXXX.myshopify.com/collections/' + collection + '/products.json?limit=' + limit;
return url;
}
var doFilter = function(data,min,max) {
@cole007
cole007 / collection.liquid
Created June 2, 2015 13:59
Shopify sub-categories hack
{% comment %}
For our Collection page liquid template, we'd then use the following to create our navigation:
{% endcomment %}
{% assign current = collection.handle %}
{% if collection.title contains '/' %}
{% assign words = collection.title | split: '/' %}
{% assign section = words[0] | handleize %}
{% for collection in collections %}
@cole007
cole007 / constituency-data.csv
Created June 14, 2015 21:48
Constituency boundary sizes
PCON_name ha km mi
Ross, Skye and Lochaber 1277950 12779.5 4934.18
Caithness, Sutherland and Easter Ross 875170 8751.7 3379.05
Argyll and Bute 716378 7163.78 2765.95
Inverness, Nairn, Badenoch and Strathspey 495320 4953.2 1912.44
Dumfriesshire, Clydesdale and Tweeddale 437637 4376.37 1689.73
Dumfries and Galloway 415030 4150.3 1602.44
Perth and North Perthshire 386107 3861.07 1490.77
Berwick-upon-Tweed 384261 3842.61 1483.64
West Aberdeenshire and Kincardine 327150 3271.5 1263.13
Schindler is a handsome, broad-shouldered man with a well-educated, regelmäßigten, großflachigen face and forehead open. He is now in his forties. One believes in his eyes at times a shadow of resignation and to his mouth to perceive a train of bitterness. That makes it hard, entsagungsreiche life - he leads it, at least since 1914
===
Schindler ist ein stattlicher, breitschultriger Mann mit einem wohlgebildeten, regelmäßigten, großflachigen gesicht und offener Stirn. Er ist nun Mitte vierzig. Man vermeint in seinen Augen bisweilen einen Schatten der Resignation und um seinen Mund einen Zug der Bitterkeit wahrzunehmen. Das macht das harte, entsagungsreiche Leben - er fuhrt es zumindest seit 1914.