Skip to content

Instantly share code, notes, and snippets.

View lewiscowper's full-sized avatar
💻
Doing my best

Lewis Cowper lewiscowper

💻
Doing my best
View GitHub Profile
@lewiscowper
lewiscowper / README
Created December 5, 2022 23:03 — forked from jmatsushita/README
Setup nix, nix-darwin and home-manager from scratch on an M1 Macbook Pro
# I found some good resources but they seem to do a bit too much (maybe from a time when there were more bugs).
# So here's a minimal Gist which worked for me as an install on a new M1 Pro.
# Inspired by https://github.com/malob/nixpkgs I highly recommend looking at malob's repo for a more thorough configuration
#
# Some people are coming directly to this Gist from search results and not the original post[1]. If that sounds like you, you should also know there is a video[2] that accompanies this.
#
# [1] https://discourse.nixos.org/t/simple-workable-config-for-m1-macbook-pro-monterey-12-0-1-with-nix-flakes-nix-darwin-and-home-manager/16834
# [2] https://www.youtube.com/watch?v=KJgN0lnA5mk
#
<?xml version="1.0" encoding="utf-8"?>
<ArrayOfLineStatus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org
/2001/XMLSchema" xmlns="http://webservices.lul.co.uk/">
<LineStatus ID="0" StatusDetails="No service between Paddington and Queen's Park while we fix a faulty
train at Warwick Avenue. SEVERE DELAYS on the rest of the line. London Underground tickets will be accepted
on London Overground and local buses.">
<BranchDisruptions>
<BranchDisruption>
<StationTo ID="183" Name="Queen's Park" />
<StationFrom ID="173" Name="Paddington" />

#How I went from forklift driver to developer in 9 months.

##Description

Moving up the ladder from forklift driver and general labourer, to front end developer, with a stint in manual testing, was a big challenge. However it’s exactly what I did, and I couldn’t have done it without following a few core principles.

Getting up the nerve to go to local usergroups, and conferences, and discovering a new found love of public speaking, was a huge leap from labouring. Similarly, I discovered contributing to open source wasn’t that big a deal, and some things certain projects did made it really easy! Also, learning about things like source control was super integral to being where I am today.

The most important part was trying to learn something from everyone I met. It didn’t matter where I met you, if I saw an opportunity to learn more, or try a new thing, I was there.

// HELPERS
// Sometimes it's easier to work with edges instead of point + size
// {x, y, height, width} => {top, bottom, left right}
function frameToRect(frame) {
return {
left: frame.x,
right: frame.x + frame.width,
top: frame.y,
bottom: frame.y + frame.height