Skip to content

Instantly share code, notes, and snippets.

@Birdie0
Birdie0 / script.js
Created February 12, 2024 23:35
Unmute everyone at Twitter
// open https://twitter.com/settings/muted/all
// and keep tab opened until it finishes!
(async () => {
const sleep = async (ms) => new Promise((r) => setTimeout(r, ms))
let el = document.querySelector('[aria-label^="Unmute "]')
while (el) {
el.scrollIntoView({ behavior: 'smooth', block: 'end' })
el.click()
@Birdie0
Birdie0 / cron.md
Last active September 15, 2023 12:47
end of month cron

End-of-month cron

Super one-line alternative


If for some reason you want to run cron in last day of month you would likely need 3 separate cron schedule expressions:

run 31st at months with 31 days

@Birdie0
Birdie0 / bash.md
Last active September 15, 2023 13:16
Bash / Zsh / fish config files

bash

# --login/-l for login shell
shopt -q login_shell && echo 'login shell' || echo 'non-login shell'
# -i for interactive shell
[[ $- == *i* ]] && echo 'interactive shell' || echo 'non-interactive shell'
  • login shell
[Unit]
Description=aria2 Daemon
After=network.target
[Service]
Type=simple
ExecStart=/usr/bin/aria2c --conf-path=%h/.config/aria2/aria2-server.conf
Restart=on-failure
[Install]
@Birdie0
Birdie0 / reddit_rss_to_discord.ts
Last active July 27, 2020 15:53
Reddit.rss to Discord filter code + parser
// ==========
// =SETTINGS=
// ==========
// set to false if you want to filter text, link or posts without preview
const textPosts: boolean = true
const linkPosts: boolean = true
const noPicPosts: boolean = true
// DO NOT EDIT CODE BELOW UNLESS SAID OTHERWISE!!!
@Birdie0
Birdie0 / ifttt-webhooks-extended-guide.md
Last active March 6, 2024 13:38
How to use Discord Webhooks

⚠️ This gist is no longer updated! For maintained, improved and even more extended guide click here.


How to use Discord Webhook

It's a JSON

First, learn JSON. It's not programming language, not even close. Just follow syntax rules and you will be fine.