Skip to content

Instantly share code, notes, and snippets.

View dharFr's full-sized avatar

Olivier Audard dharFr

View GitHub Profile
@dharFr
dharFr / pre-commit
Created March 26, 2017 23:24
Shellcheck pre-commit hook
#!/bin/sh
#
# This pre-commit hook run `shellcheck` against your code when you go to commit.
# See: http://www.shellcheck.net/
#
# To use this script copy it to .git/hooks/pre-commit and make it executable.
# Work out what to diff against, really HEAD will work for any established repository.
if git rev-parse --verify HEAD >/dev/null 2>&1
then
@dharFr
dharFr / delete-likes.js
Created September 2, 2023 00:07
Delete Tweets, RT & Likes from your Twitter/X account, from the browser console
/**
* 1. Go to "Likes" section of your profile (e.g. https://twitter.com/<your_twix_handle>/likes)
* 2. Open browser Console (Cmd + Option + I on Mac, F12 otherwise?)
* 3. Copy/Paste the script and press enter to run it.
*
* At some point, depending on the number of items you need to process, you might see the following error in the console:
* > "the server responded with a status of 429"
* That's TwiX rate limiting. Reload the page, wait a few minutes/hours before trying again, and you should be fine.
* Inspired from https://stackoverflow.com/a/72515907
*/