Skip to content

Instantly share code, notes, and snippets.

@vlaurin
vlaurin / snippets.cson
Created June 14, 2016 10:00
Snippet for Atom - Immediately invoked function expression
'.source.js':
'IIFE':
'prefix': '()()'
'body': """
(function () {
'use strict';
$1
})();
"""
@vlaurin
vlaurin / color-tabs-regex.cson
Last active June 20, 2016 13:40
Atom - color-tabs-regex config
"\\.js$": "#F1E05A",
"\\.php$": "#4F5D95",
"\\.html": "#E44B23",
"\\.css$": "#563D7C",
"\\.scss$": "#563D7C",
"\\.sass$": "#563D7C",
"\\.module\\.js$": "#1976D2",
"\\.controller\\.js$": "#1976D2",
"\\.service\\.js$": "#1976D2",
"\\.directive\\.js$": "#1976D2",
@vlaurin
vlaurin / README.md
Last active April 22, 2018 06:49
Dazzle widget - TflStopPointArrivals

Dazzle widget - TflStopPointArrivals

A Dazzle widget showing predictions for next arrivals at a TfL stop point, powered by Transport for London's Unified API.

alt text

Use

  1. Copy TflStopPointArrivals.js to your dashboard project.
  2. Add to your widgets and configure. For example:
@vlaurin
vlaurin / README.md
Created February 1, 2020 22:48
Financial-Times/github-label-sync
@vlaurin
vlaurin / day3.js
Created December 3, 2023 22:14
Advent of code 2023 - Day 3
import {readFileLines} from '../utils/file.mjs';
const NUMBER_REGEX = /\d+/g;
const extractNumbers = (line, lineIndex) => {
const numbers = [];
let match;
while ((match = NUMBER_REGEX.exec(line)) != null) {
numbers.push({
number: match[0],