Skip to content

Instantly share code, notes, and snippets.

Andy Davies andydavies

Block or report user

Report or block andydavies

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
xdesro / _magic.css
Created Sep 19, 2019
The most useful line of CSS I've ever written.
View _magic.css
*, *:before, *:after { box-sizing: border-box; }
nucliweb /
Last active Sep 21, 2019
Twitter accounts you should follow if you like Image & Video Optimization

👀📎 It looks like you're preparing to MC a conference...

🚨 GIANT DISCLAIMER: This stuff is far from authoritative. But it's what I think works for me, and what I enjoy in an MC when I'm attending a conference.

Biggest tip - enjoy yourself.

rviscomi /
Last active May 7, 2019
"Crash Course in CrUX" for the PerfMatters conference, April 2019
View Pi-hole on UC-CK 0.13.6
# Instructions for installing Pi-hole 4.2 on UniFi CloudKey Gen 1 (UC-CK) running firmware 0.13.6
# Pi-hole will need to be completely re-installed after every FW update or if CloudKey is reset to defaults.
# Verify UC-CK is running firmware v0.13.6 (or later) before installing Pi-hole. If not, do:
ubnt-systool fwupdate
# UC-CK firmware v0.13.6 downgrades UniFi Controller to 5.10.17. Upgrade to 5.10.19 with:
cd /tmp
dpkg -i unifi_sysvinit_all.deb
jedi4ever /
Last active Feb 22, 2019
Impression of 1 week exchange

I had a long overdue holiday planned. For many people this would mean going somewhere and relax. Turns out I'm not the sight-seeing person , I'm more of a people-seeing person: talking to people and exchanging new ideas is what makes me tick. Having been a consultant for several years, you learn the most from new environments. Interns would have that opportunity to apply , but why can't people with more experience?

So I launched on twitter the idea of what company is willing to do an exchange. After receiving several replies I got invited by Ramon Van Alteren from Unomaly and deciced to take a leap of faith.

It felt like the excitement of starting a new job. Scary , because you don't know what to expect.

View minimal-analytics-snippet.js
(function (context, trackingId, options) {
const history = context.history;
const doc = document;
const nav = navigator || {};
const storage = localStorage;
const encode = encodeURIComponent;
const pushState = history.pushState;
const typeException = 'exception';
const generateId = () => Math.random().toString(36);
const getId = () => {
vgw-rhysc / index.js
Created Oct 12, 2018
AWS Lambda to translate Snowplow CloudFront logs to usable JSON - Using S3 create events as the trigger
View index.js
console.log('Loading function');
const aws = require('aws-sdk');
const zlib = require('zlib');
const CloudFrontParser = require('cloudfront-log-parser');
const s3 = new aws.S3({ apiVersion: '2006-03-01' });
let getS3FileContents = async(bucketName, objectKey) => {
const params = {
View gist:db5cd518d4e442168d003567827818dd
You can’t perform that action at this time.