sudo apt-get update sudo apt-get upgrade
/etc/nginx/nginx.conf /etc/nginx/sites-available/*
/var/log/nginx/access.log
#!/usr/bin/env ruby | |
require "json" | |
require 'fileutils' | |
# Requires https://github.com/JamieMason/ImageOptim-CLI | |
Dir.glob("source/*.png") do |path| | |
file = path.split("/").pop | |
filename = file.split(".").shift |
def flatten(arg, results = []) | |
if arg.is_a?(Array) | |
arg.each do |val| | |
flatten(val, results) | |
end | |
else | |
results.push(arg) | |
end | |
return results |
<div class="g kno-result _rk mnr-c g-blk" data-hveid="25" data-ved="0ahUKEwi0jMKl6_XNAhUJaz4KHbgFCV4QjDYIGSgA"> | |
<div class="kp-blk _Z7 _RJe"> | |
<div class="xpdopen"> | |
<div class="_OKe"> | |
<div> | |
<div></div> | |
</div> | |
<div> | |
<div class="_tN _xHd qxsd _IWg _HWg _dXg _eXg _Dzh mod" data-md="32" style="clear:none"> | |
<div style="position:relative" class="kno-mrg-hnm _NEh kno-mrg kno-swp" id="media_result_group" data-hveid="27"> |
<div class="g"> | |
<div class="_uXc hp-xpdbox"> | |
<div class="_x8d" style="float:right"> | |
<div class="_i8d" style="height:110px;width:90px"><a href="https://www.londontoolkit.com/briefing/oystercard.htm?sa=X&ved=0ahUKEwjI2Yi16_XNAhVDeT4KHbibBRkQ9QEIEDAA"><img src="https://encrypted-tbn3.gstatic.com/images?q=tbn:ANd9GcSR6qJABFxstZJrNbG-XkVrgaMvKd31aulUnHuXz6jF4Yc_sdctNhGQ8JQ" style="margin-left:-42px;margin-right:-43px" alt="Image result for oyster card price"></a></div> | |
</div> | |
<div class="_o0d"> | |
<table class="_cmh" border="0" cellpadding="0" cellspacing="0"> | |
<thead> | |
<tr> | |
<th class="_dmh">Oyster & Contactless Payment Card Price Caps 2016 Compared To Travelcard Prices</th> |
const avgDiff = (canvas) => { | |
let context = canvas.getContext('2d'); | |
let imageData = context.getImageData(0, 0, canvas.width, canvas.height); | |
let data = imageData.data; | |
let sum = 0; | |
let count = 0; | |
// TODO: perhaps this can be sped up by not going over every pixel? | |
for (let i = 0; i < data.length; i += 4) { |
var MetrixLab_URLwebsite = encodeURIComponent(window.location.href); | |
var MetrixLab_OverlayImageName; | |
var MetrixLab_is_Btq_Url; | |
//console.log('MetrixLab_URLwebsite'+MetrixLab_URLwebsite); |
/* | |
* tagContainer Generator v5 | |
* Copyright Tag Commander | |
* http://www.tagcommander.com/ | |
* Generated: 2016-08-25 16:55:37 Europe/Paris | |
* --- | |
* Version : 66.02 | |
* IDTC : 1 | |
* IDS : 1376 | |
*/ |
/** | |
* Given an input of a 6-character hex color code, we need to output a "web-safe" | |
* representation of that same code. | |
*/ | |
'use strict'; | |
let assert = (one, two) => { | |
if (one === two) { | |
console.info(`Success! ${one} is equal to ${two}!`); |