Skip to content

Instantly share code, notes, and snippets.

View MichaelLawton's full-sized avatar

Michael Lawton MichaelLawton

View GitHub Profile
@danpawlik
danpawlik / disable-dialer-xiaomi-eu.sh
Last active February 1, 2024 13:50
Disable MIUI dialer and other apps in xiaomi.eu rom
#!/bin/sh
# NOTE: Make sure, that you install Google dialer and Google messaging
sudo adb shell pm disable-user --user 0 com.android.contacts
sudo adb shell pm disable-user --user 0 com.android.thememanager
sudo adb shell pm disable-user --user 0 com.android.providers.downloads.ui
sudo adb shell pm disable-user --user 0 com.android.mms
# TO enable back: sudo adb shell pm enable <NAME>
@Rich-Harris
Rich-Harris / service-workers.md
Last active April 21, 2024 16:24
Stuff I wish I'd known sooner about service workers

Stuff I wish I'd known sooner about service workers

I recently had several days of extremely frustrating experiences with service workers. Here are a few things I've since learned which would have made my life much easier but which isn't particularly obvious from most of the blog posts and videos I've seen.

I'll add to this list over time – suggested additions welcome in the comments or via twitter.com/rich_harris.

Use Canary for development instead of Chrome stable

Chrome 51 has some pretty wild behaviour related to console.log in service workers. Canary doesn't, and it has a load of really good service worker related stuff in devtools.

@Luzifer
Luzifer / lpass-ssh.sh
Last active January 14, 2020 15:03
`lpass-ssh` wrapper script #blog
#!/bin/bash
KEY_NAME=$1
if ! ( which lpass > /dev/null ); then
echo "LastPass CLI is required."
exit 2
fi
# Require something to be passed to this command