Skip to content

Instantly share code, notes, and snippets.

View tvararu's full-sized avatar

Theodor Vararu tvararu

View GitHub Profile
#!/bin/bash -eu
if [ "$#" -ne 3 ]; then
echo "Usage: ./flac2mp3.sh <source_dir> <destination_dir> <bitrate>"
exit 1
fi
SRC_DIR="$1"
DEST_DIR="$2"
BITRATE="$3"
@tvararu
tvararu / internal-a11y-audit.md
Last active July 4, 2024 10:38
Internal accessibility audit template

This is a template for a Trello card consisting of a quick, internal accessibility audit. It's intended to be carried out as a prerequisite before a formal audit from a recognised accessibility testing company (like DAC).

The intention is to capture low-hanging fruit / show-stopping bugs and fix them, to allow the auditors to focus on more nuanced or interesting usability problems.


Context

We want to do an internal accessibility audit of the <SERVICE_NAME> application to surface potential accessibility issues ahead of future audits.

@tvararu
tvararu / expenses.sh
Created August 21, 2022 09:24
Ledger scripts
#!/bin/sh
figlet "expenses"
ledger --price-db prices.db -X £ --pedantic -f current.ledger --no-pager \
reg ^Exp -M --period-sort "(amount)" --effective
@tvararu
tvararu / heresy.c
Created September 10, 2019 13:08
//
// Compile with:
// gcc -std=c99 heresy.c
//
// Run with:
// ./a.out
//
// It outputs:
// 0
//
@tvararu
tvararu / bat.yml
Created August 13, 2019 08:45
Tmuxinator config for Becoming a Teacher
name: bat
# Project hooks
# Runs on project start, always
# on_project_start: command
# Run on project start, the first time
# on_project_first_start: command
# Run on project start, after the first time
# on_project_restart: command
# Run on project exit ( detaching from tmux session )

Notes about tools for measuring and learning about performance.

Tools that can be used

Name + Link Usecase
Google Pagespeed Insights (PSI) Measuring load and render performance, highlighting basic responsive design issues
What does my site cost Measuring how much the payload of a website costs in different countries
Webpagetest Measuring load and render performance, with comprehensive video and waterfall charts, on a choice of devices and connection speeds
Google Lighthouse ("Audits" tab in Chrome Devtools) Measuring load and render performance, and some basic best practice, PWA, and accessibility criteria
@tvararu
tvararu / .eslintrc
Last active March 26, 2018 15:08
eslint-semistandard-test
{ "extends": "eslint-config-semistandard" }
@tvararu
tvararu / w140.md
Created January 3, 2018 16:43
W140 part prices
file 'ghost-1.mp4'
file 'ghost-2.mp4'
// How to run:
// 1. Change PATH_TO_GRAPH
// 2. Run `node graph2tsv.js`
const fs = require('fs')
const PATH_TO_GRAPH = './location-etd.json'
const PATH_TO_TSV = PATH_TO_GRAPH.replace('.json', '.tsv')
const graph = require(PATH_TO_GRAPH)