Skip to content

Instantly share code, notes, and snippets.

View wojtekmaj's full-sized avatar
👨‍🍼
Becoming a father

Wojciech Maj wojtekmaj

👨‍🍼
Becoming a father
View GitHub Profile
@neg4n
neg4n / paste-this-into-console.js
Created April 26, 2021 20:39
Unregister all service workers in Safari
// Simple & convinient way to remove all service workers registered for specific web page
// Useful when working with PWA
// Paste code below to the console, it should return Promise
const getRidOfAllServiceWorkers = async () => {
const registry = await navigator.serviceWorker.getRegistrations()
for (const entry of registry) {
entry.unregister()
}
}
@joshschmelzle
joshschmelzle / remove-gamebar-powershell-win10.md
Last active July 1, 2024 11:43
How to Remove the Xbox Game Bar with Powershell on Windows 10

You've probably stumbled upon this researching how to remove the Xbox Game Bar. This gist includes a few different methods you can try. Please note that some of these first options are probably not be available unless you are running an older version of Windows 10.

Uninstalling/Removing the Game Bar (old Windows 10 build GUI options)

(this is no longer an option on any recent Windows 10 build)

  1. Press Windows Key or click on the Start menu.
  2. Start typing Xbox or Game Bar, until you get the Xbox Game Bar app to appear in the results.
  3. Right-click on the app and pick Uninstall. Answer Yes to the prompt, and wait for the process to finish.
@mobilemind
mobilemind / git-tag-delete-local-and-remote.sh
Last active July 2, 2024 00:02
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
@antonio
antonio / delete_rebased_and_merged_branches.sh
Created January 21, 2013 14:58
Delete branches that were rebased (reference never updated) and merged into master
#!/bin/sh
for branch in $(git branch -a | sed 's/^\s*//' | sed 's/^remotes\///' | grep -v 'master$'); do
last_commit_msg="$(git log --oneline --format=%f -1 $branch)"
if [[ "$(git log --oneline --format=%f | grep $last_commit_msg | wc -l)" -eq 1 ]]; then
if [[ "$branch" =~ "origin/" ]]; then
local_branch_name=$(echo "$branch" | sed 's/^origin\///')
if [[ -n "$EXEC" ]]; then
git push origin :$local_branch_name
else