Skip to content

Instantly share code, notes, and snippets.

View moeinalmasi's full-sized avatar
:octocat:
Life is so much easier with a good sense of humor!

Moein Almasi moeinalmasi

:octocat:
Life is so much easier with a good sense of humor!
View GitHub Profile
@moeinalmasi
moeinalmasi / clear-github-workflows.sh
Last active November 10, 2021 14:22
Clear disabled GitHub workflows
# Bash script to delete the manually disabled GitHub workflows
# Step 0: install gh, jq and xargs (brew is going to help alot with this...)
# Step 1: manually disable the workflow: Actions -> select the workflow you wanna disable -> from ... click "Disable workflow"
# Step 2: update the org and repo name parameters below
# Step 3: execute the script and pray hard! (first you would need to authenticate "gh auth login", once authenticated run "bash clear-github-workflows.sh")
# Pro tip: comment out line number 23 first and run the script once and using line 15 validate you are deleting the right workflows
org=<org_name
repo=<repo_name>
# Get workflow IDs with status "disabled_manually"
@moeinalmasi
moeinalmasi / fb_unlike_all.js
Last active October 3, 2022 08:22
Unlike All Facebook Pages
// Run it at your own risk!!
// If you have been on Facebook since 2004 and happened to like ton of pages and wanna get rid of them all at once...
// Navigate to https://www.facebook.com/pages/?category=liked and run the the following snippet in the developer console...
var fb_unlike_all = () => {
[].slice
.call(document.querySelectorAll("button"))
.filter((x) => x.innerText.indexOf("Liked") != -1)
.map((x) => {
x.click();
});