Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View alexwilson's full-sized avatar
🎧
i only speak techno.

Alex Wilson alexwilson

🎧
i only speak techno.
View GitHub Profile
const GOOGLE_DRIVE_FOLDER_ID = '';
const GOOGLE_DOC_TEMPLATE_ID = '';
const SLACK_WEBHOOK_URL = '';
function isMonday (d) {
return d.getDay() === 1
}
function nextMonday() {
@alexwilson
alexwilson / resume.json
Last active May 23, 2023 15:25
resume.json
{"basics":{"name":"Alex Wilson","label":"Financial Times","image":"https://avatars.githubusercontent.com/u/440052?v=4","email":"","phone":"","url":"https://alexwilson.tech/","summary":"","profiles":[{"network":"gitconnected","username":"alexwilson","url":"https://gitconnected.com/alexwilson"},{"network":"GitHub","username":"alexwilson","url":"https://github.com/alexwilson"}],"headline":"Principal Engineer at FT • Building digital products & the future of news","blog":null,"yearsOfExperience":null,"username":"alexwilson","locationAsString":"London","region":"London","karma":10,"id":"f31652cc-0a5a-488a-9040-ed96428fd68b","followers":94,"following":90,"picture":"https://avatars.githubusercontent.com/u/440052?v=4","website":"https://alexwilson.tech/"},"skills":[],"projects":[],"work":[{"name":"Financial Times","location":"London","description":"","position":"Principal Engineer, Customer Products","url":"https://ft.com","startDate":"2022-01-01","endDate":"","summary":"","highlights":[],"isCurrentRole":true,"start"
@alexwilson
alexwilson / main.php
Created November 26, 2022 20:40
Continuously retry something in PHP
<?php
set_error_handler(
function ($errno, $errstr, $errfile, $errline ) {
throw new ErrorException($errstr, 0, $errno, $errfile, $errline);
}
);
function executeCode(){
echo "Hello world!";
@alexwilson
alexwilson / google-reader-api.md
Last active March 7, 2022 00:59
Google Reader API

Google Reader API

Note : This document is totally unofficial. You should not rely on anything on this document is you need an exact information.
Google Reader API has not officially been released. This document has been made mainly by reverse-engineering the protocol.

Requirements

Google Reader API requires:

@alexwilson
alexwilson / index.js
Created April 1, 2021 11:05
Origami package.json managed build-service URLs.
const package = require('./package.json');
const origamiDependenciesFromPackageJson = Object.keys(package.dependencies)
// Find installed Origami modules.
.filter(key => key.startsWith('@financial-times/o-'))
// Reformat them
.map(key => ({
component: key.replace('@financial-times/', ''),
@alexwilson
alexwilson / EmptyTrashCommand.php
Created October 8, 2020 09:22
eZ - empty trash
<?php
declare(strict_types=1);
namespace AppBundle\Command;
use AppKernel;
use DateTime;
use Exception;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
/**
@alexwilson
alexwilson / README.md
Last active September 24, 2020 07:24
Alex's Bakery - A Cooke Clicker autoclicker, using its official API

Alex's Bakery

What is this?**

In short, an auto-clicker for cookie-clicker.

How do I use this?**

This is bookmarklet friendly! You can drag & drop the following link into your bookmarks, or alternatively, directly into the game: Bookmarklet

Alternatively copy the below code, and save it as a bookmark.

<?php declare(strict_types=1);
namespace AppBundle\EventListener;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpKernel\Event\{GetResponseEvent, FilterResponseEvent};
use Symfony\Component\HttpKernel\KernelEvents;
use Symfony\Component\HttpFoundation\HeaderBag;
class SpecialistPreflightLegacyHandler implements EventSubscriberInterface
@alexwilson
alexwilson / specialist-tech-test.md
Last active July 1, 2022 09:09
Specialist Tech Test

Gopher translator service

Gophers are friendly creatures but it’s not that easy to communicate with them. They have their own language and they don’t understand English.

Create a program that starts a http server. This server should be able to translate English words into words in the gophers' language. Don't worry, the gophers' language is pretty easy.

The language that the gophers speak is a modified version of English and has a few simple rules.

  1. If a word starts with a vowel letter, add prefix “g” to the word (ex. apple => gapple)
  2. If a word starts with the consonant letters “xr”, add the prefix “ge” to the begging of the word. Such words as “xray” actually sound in the beginning with vowel sound as you pronounce them so a true gopher would say “gexray”.
  3. If a word starts with a consonant sound, move it to the end of the word and then add “ogo” suffix to the word. Consonant sounds can be made up of multiple consonants, a.k.a. a consonant cluster (e.g. "chair" -> "airchogo”).
@alexwilson
alexwilson / ez-reset-admin-password.sql
Created August 21, 2018 14:31
eZ Platform - Reset Admin Password
SET @key = 'test123456789';
SET @username = 'admin';
SET @del = '\n';
SET @hash = MD5(CONCAT(@username,@del,@key));
UPDATE ezuser SET password_hash=@hash WHERE login=@username;