Skip to content

Instantly share code, notes, and snippets.

View michaelvickersuk's full-sized avatar

Michael Vickers michaelvickersuk

View GitHub Profile
@michaelvickersuk
michaelvickersuk / generate_ctags
Last active November 17, 2022 11:05
Post process Universal Ctags for Laravel projects
#!/usr/bin/env bash
ctags
# Convert magic methods first character to lower case, as Universal Ctags regex doesn't support \l
perl -i -p -e 's/_FIRST_CHAR_TO_LOWER_(.)([a-z|A-Z|0-9]+)\t/\l\1\2\t/g;' tags
# Add all blade templates to the tags, amending their tag to represent the strings used with the view helper
# (remove path prefix, remove extension suffix, replace forward slash with dots).
# This requires the editor to not treat dots as word seperators, an alternative is to add "--extras=f" in ctags config
@michaelvickersuk
michaelvickersuk / topcashback-expand-all-earnings.js
Created September 20, 2020 09:51
Expand all items shown in the earnings table in your TopCashback account
/*
1. Log into your TopCashback account
2. Go to www.topcashback.co.uk/account/earnings
3. Open the console (F12)
4. Copy the below and paste into the console
5. Press enter and the earnings will be shown expanded (does take a while if there's a lot of items!)
*/
document.querySelector('#datatable-show-all').click();
document.querySelectorAll('#datatable-earnings-table tbody td').forEach(
@michaelvickersuk
michaelvickersuk / remove-all-linkedin-connections.js
Last active March 27, 2023 11:27
Delete all the network connections from your LinkedIn account
/*
1. Log into your LinkedIn account
2. Select My Network > Connections (https://www.linkedin.com/mynetwork/invite-connect/connections/)
3. Open the console (F12)
4. Copy the below and paste into the console
5. Press enter and your connections will be removed one by one
*/
setInterval(function () {
document.querySelectorAll('[data-control-name="ellipsis"]')[0].click();