Skip to content

Instantly share code, notes, and snippets.

View wohfab's full-sized avatar
🐢
Hire me for accessibility consulting!

fabian wohlgemuth wohfab

🐢
Hire me for accessibility consulting!
View GitHub Profile
@LeZuse
LeZuse / detect.py
Created May 2, 2012 18:28
Flask browser detection
browser = request.user_agent.browser
version = request.user_agent.version and int(request.user_agent.version.split('.')[0])
platform = request.user_agent.platform
uas = request.user_agent.string
if browser and version:
if (browser == 'msie' and version < 9) \
or (browser == 'firefox' and version < 4) \
or (platform == 'android' and browser == 'safari' and version < 534) \
or (platform == 'iphone' and browser == 'safari' and version < 7000) \
@bitjockey42
bitjockey42 / mopidy.md
Created April 20, 2014 16:39
An installation and setup guide for mopidy on Arch Linux.

Mopidy on Arch Linux

mopidy

Installation

Install from the AUR.

@tatianamac
tatianamac / tatiana-mac-speaker-rider.md
Last active November 6, 2024 15:21
Tatiana Mac's Speaker Rider

Speaker Rider

by Tatiana Mac

Last updated 14 April 2021

What is a speaker rider?

As speaking comes with immense privilege, I have crafted a speaker rider to set expectations and boundaries around my engagement. I am grateful to all the conference organisers who have brilliantly hosted me. I would love to continue to exercise this privilege to speak at conferences, and use this privilege to make the landscape more accessible and beneficial to tech's most historically excluded and marginalised communities.

Considerations

😫 I provide a lot of explanations for those of you who never had to consider these things. Most thoughtful conferences I've attended check most of these boxes intrinsically, particularly when conference runners are experienced speakers. They get it.

@mayneyao
mayneyao / notion2blog.js
Last active September 14, 2024 01:22
Notion.so > Personal Blog | custom domain + disqus comment
const MY_DOMAIN = "agodrich.com"
const START_PAGE = "https://www.notion.so/gatsby-starter-notion-2c5e3d685aa341088d4cd8daca52fcc2"
const DISQUS_SHORTNAME = "agodrich"
addEventListener('fetch', event => {
event.respondWith(fetchAndApply(event.request))
})
const corsHeaders = {
"Access-Control-Allow-Origin": "*",
@benmccallum
benmccallum / _Instructions.md
Last active August 26, 2023 14:36
git pre-commit hook preventing large files

Usage

You can use in two ways.

  1. Directly as the pre-commit hook in your .git/hooks folder.

  2. With Husky by updating your package.json with:

"husky": {
@nyanhp
nyanhp / UpdateEverything.ps1
Last active July 2, 2020 08:57
Update local clone and default branch on GitHub
function Update-GitDefaultBranch
{
[CmdletBinding()]
param
(
# Base path where you store all your repos...
[Parameter(Mandatory)]
[string]
$Path,
const apiUrl = "https://pass.telekom.de/api/service/generic/v1/status"
let widget = await createWidget()
widget.backgroundColor = new Color("#777777")
if (!config.runsInWidget) {
await widget.presentSmall()
}
Script.setWidget(widget)
Script.complete()

Telekom Widget

This is an iOS scriptable widget which shows the mobile data usage.

image

Features

  • show percentage and actual usage
  • show a status bar with an extrapolated bar to see how much you could use to have the remaining days in month each day the same data available
@acarril
acarril / bootable-win-on-mac.md
Created November 18, 2022 17:49
Create a bootable Windows USB using macOS

For some reason, it is surprisingly hard to create a bootable Windows USB using macOS. These are my steps for doing so, which have worked for me in macOS Monterey (12.6.1) for Windows 10 and 11. After following these steps, you should have a bootable Windows USB drive.

1. Download a Windows disc image (i.e. ISO file)

You can download Windows 10 or Windows 11 directly from Microsoft.

2. Identify your USB drive

After plugging the drive to your machine, identify the name of the USB device using diskutil list, which should return an output like the one below. In my case, the correct disk name is disk2.

@linuslundahl
linuslundahl / raycast-emoji-snippets.json
Created March 3, 2023 14:12
Raycast Emoji Snippets
[
{ "text": "0️⃣", "name": "0", "keyword": ":0:" },
{ "text": "1️⃣", "name": "1", "keyword": ":1:" },
{ "text": "🔟", "name": "10", "keyword": ":10:" },
{ "text": "💯", "name": "100", "keyword": ":100:" },
{ "text": "🥇", "name": "1st Place Medal", "keyword": ":1st-place-medal:" },
{ "text": "2️⃣", "name": "2", "keyword": ":2:" },
{ "text": "🥈", "name": "2nd Place Medal", "keyword": "2nd-place-medal:" },
{ "text": "3️⃣", "name": "3", "keyword": ":3:" },
{ "text": "🥉", "name": "3rd Place Medal", "keyword": ":3rd-place-medal:" },