Skip to content

Instantly share code, notes, and snippets.

View MaffooBristol's full-sized avatar

Matt Fletcher MaffooBristol

  • Maffcorp Ltd
  • Bristol, England
  • 17:51 (UTC +01:00)
View GitHub Profile
#!/bin/bash
# IMPORTANT!
# On Ubuntu, /bin/sh does not point to Bash, but instead to "Dash", a highly
# stripped down version that doesn't allow certain more complex behaviours
# such as the brace expansion that you will see both in the DEBUG_GREP regex
# and in the -exec subroutine in FUSE_FIND.
# Allow input from the keyboard.
exec < /dev/tty
@MaffooBristol
MaffooBristol / blah.sh
Created November 28, 2019 13:23
Find all files, sorted by number of lines changed in Git
for i in *; do (git diff -w -U0 $i | wc -l | tr -d '[:space:]') && echo -e " $i"; done | sort -n
@MaffooBristol
MaffooBristol / find-styled.bash
Last active March 10, 2020 09:49
Find all files named StyledFoo.js and then find how many times they're referenced in React files
# Find all files named StyledFoo.js and then find how many times they're referenced in React files
for i in $(find . -name "Styled*.js"); do j=$(basename $i | cut -d. -f1); k=$(grep -IiRn "<$j" src/ | wc -l); echo "$k $i"; done | sort -n
@MaffooBristol
MaffooBristol / .eslintrc.yml
Last active December 9, 2021 19:55
Typescript Eslint config files
extends:
- eslint:recommended
- plugin:@typescript-eslint/eslint-recommended
- plugin:@typescript-eslint/recommended
- plugin:@typescript-eslint/recommended-requiring-type-checking
- plugin:jest/recommended
- airbnb-base
- airbnb-base-typescript
plugins:
- '@typescript-eslint'
@MaffooBristol
MaffooBristol / .eslintrc.yml
Last active December 11, 2021 14:11
React + Typescript + Cypress + Eslint config
plugins:
- react
- '@typescript-eslint'
- '@typescript-eslint/eslint-plugin'
- cypress
- jest
extends:
- eslint:recommended
- plugin:@typescript-eslint/eslint-recommended
- plugin:@typescript-eslint/recommended
[{"iata":"AAA","name":"Anaa Airport"},{"iata":"AAB","name":"Arrabury Airport"},{"iata":"AAC","name":"El Arish International Airport"},{"iata":"AAE","name":"Annaba Airport"},{"iata":"AAF","name":"Apalachicola Regional Airport"},{"iata":"AAG","name":"Arapoti Airport"},{"iata":"AAH","name":"Aachen-Merzbruck Airport"},{"iata":"AAI","name":"Arraias Airport"},{"iata":"AAJ","name":"Cayana Airstrip"},{"iata":"AAK","name":"Buariki Airport"},{"iata":"AAL","name":"Aalborg Airport"},{"iata":"AAM","name":"Malamala Airport"},{"iata":"AAN","name":"Al Ain International Airport"},{"iata":"AAO","name":"Anaco Airport"},{"iata":"AAQ","name":"Anapa Airport"},{"iata":"AAR","name":"Aarhus Airport"},{"iata":"AAT","name":"Altay Air Base"},{"iata":"AAU","name":"Asau Airport"},{"iata":"AAV","name":"Allah Valley Airport"},{"iata":"AAW","name":"Abbottabad Airport"},{"iata":"AAX","name":"Araxa Airport"},{"iata":"AAY","name":"Al Ghaidah International Airport"},{"iata":"AAZ","name":"Quezaltenango Airport"},{"iata":"ABA","name":"Abakan Airpo