Skip to content

Instantly share code, notes, and snippets.

View philsherry's full-sized avatar
:octocat:
Coffee && code && cats.

Phil Sherry philsherry

:octocat:
Coffee && code && cats.
View GitHub Profile
@philsherry
philsherry / SeeWhatTheyHear.js
Created July 6, 2023 15:22
This is a bookmarklet that I found a long time ago, but cannot find the source these days. I’d love to, so I can give credit!
javascript:javascript%3A (function(n)%7Bvar e%3D%7BreExec%3A!1%2Ceval%3A'"(function()%7Bartoo.stylesheets%5B%5C%5C"bookmark.css%5C%5C"%5D%3D%5C%5C"p %7B%5C%5C%5C%5Cn color%3A red%3B%5C%5C%5C%5Cn font-size%3A 14px%3B%5C%5C%5C%5Cn%7D%5C%5C%5C%5Cn%5C%5C"%7D).call(this)%2Cfunction()%7Bartoo.stylesheets%5B%5C%5C"view.css%5C%5C"%5D%3D%5C'%40charset %5C%5C"UTF-8%5C%5C"%3B%5C%5C%5C%5Cnbody %7B%5C%5C%5C%5Cn font%3A 100%25%2F1.4 %5C%5C"Helvetica Neue%5C%5C"%2C Helvetica%2C Arial%3B%5C%5C%5C%5Cn max-width%3A 90ex%3B%5C%5C%5C%5Cn padding%3A 20px%3B%5C%5C%5C%5Cn margin%3A 0 auto%3B%5C%5C%5C%5Cn background%3A %23f8f8f8%3B %7D%5C%5C%5C%5Cn%5C%5C%5C%5Cnimg%2C svg%2C video %7B%5C%5C%5C%5Cn display%3A none !important%3B %7D%5C%5C%5C%5Cn%5C%5C%5C%5Cna %7B%5C%5C%5C%5Cn color%3A %23108AEF%3B%5C%5C%5C%5Cn text-decoration%3A underline%3B %7D%5C%5C%5C%5Cn%5C%5C%5C%5Cninput%2C textarea%2C button%2C select %7B%5C%5C%5C%5Cn font%3A inherit%3B%5C%5C%5C%5Cn background%3A white%3B %7D%5C%5C%5C%5Cn%5C%5C%5C%5Cn.screenreader--im
@philsherry
philsherry / vscode-multi-root-workspace.md
Last active November 17, 2024 16:56
VS Code Workspace file.

Workspace

There is a VS Code Workspace file which ties these repos together when they’re sat in the same directory like this:

 project
 ├── project-wp-docker/
 ├── project-wp-docs/
 ├── project-wp-theme/
 └── project-wp.code-workspace
@philsherry
philsherry / details.html
Created April 23, 2020 09:28
How browsers handle the details element with screen readers.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Details element VoiceOver test</title>
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/gh/kognise/water.css@latest/dist/dark.min.css"
media="(prefers-color-scheme: dark)"
@philsherry
philsherry / block-uk-rags.md
Created June 28, 2019 12:55
Block shitty UK newspapers on your computer
0.0.0.0  thesun.co.uk www.thesun.co.uk
0.0.0.0  express.co.uk www.express.co.uk
0.0.0.0  dailymail.co.uk i.dailymail.co.uk scripts.dailymail.co.uk t.dailymail.co.uk ted.dailymail.co.uk video.dailymail.co.uk www.dailymail.co.uk

^ A follow-up to this:

@philsherry
philsherry / select-madness.html
Created January 31, 2018 15:55
Can't remember where I found this, but it's ridiculous.
<select id="formTitle" name="formTitle" class="form-control" required="" aria-required="true">
<option disabled="disabled" selected="selected" value="">Please choose</option>
<option value="Mr">Mr</option>
<option value="Mrs">Mrs</option>
<option value="Miss">Miss</option>
<option value="Ms">Ms</option>
<option value="Doctor">Doctor</option>
<option value="Rev">Rev</option>
<option value="Lord">Lord</option>
<option value="Sir">Sir</option>
@philsherry
philsherry / seatmap.html
Created September 14, 2014 14:04
Solution for passenger pods on the new BA seatmap.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>BA seatmap</title>
<!-- include main BA VSG styles -->
<link rel="stylesheet" type="text/css" href="https://www.britishairways.com/cms/global/styles/core/core_vsg.css" />
<!--
scenario has-seat has-paid has-infant highlight
1 No No No No
@philsherry
philsherry / id attributes
Created May 11, 2010 07:45
TextMate Command - will strip all class/id attributes
### TextMate Command - will strip all class/id attributes
### e.g. <div id="xkcd-147" class="foo bar lfc_ynwa" role="complimentary">
### you'll be left with this: <div role="complimentary">
sed -E 's/ \s?(class|id)="[-_a-zA-Z0-9 *+]+"//g'