Skip to content

Instantly share code, notes, and snippets.

@tkadlec
tkadlec / perf-diagnostics.css
Last active March 20, 2025 08:41
CSS used to highlight potential performance issues
:root {
--violation-color: red; /* used for clear issues */
--warning-color: orange; /* used for potential issues we should look into */
}
/* IMAGES */
/*
* Lazy-Loaded Images Check
* ====
@aymericbeaumet
aymericbeaumet / delete-likes-from-twitter.md
Last active May 3, 2025 05:36
[Recipe] Delete all your likes/favorites from Twitter

Ever wanted to delete all your likes/favorites from Twitter but only found broken/expensive tools? You are in the right place.

  1. Go to: https://twitter.com/{username}/likes
  2. Open the console and run the following JavaScript code:
setInterval(() => {
  for (const d of document.querySelectorAll('div[data-testid="unlike"]')) {
    d.click()
 }
@CurtisL
CurtisL / .htaccess
Last active February 16, 2025 10:05
Better Maintenance Mode .htaccess rules
# BEGIN MAINTENANCE MODE
# ADD your IP address to gain access. Local IPS for local testing
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REMOTE_ADDR} !^192\.168\.0\.0
RewriteCond %{REMOTE_ADDR} !^127\.0\.0\.1
RewriteCond %{DOCUMENT_ROOT}/maintenance.html -f
RewriteCond %{DOCUMENT_ROOT}/maintenance.enable -f
RewriteCond %{SCRIPT_FILENAME} !maintenance.html
RewriteRule ^.*$ /maintenance.html [R=503,L]
@jonoalderson
jonoalderson / userAgentSEO.php
Last active November 29, 2018 09:13
Looks up the user agent against a known list, and outputs a HTML comment
<?php
// Quick script to check and output the user agent in a HTML comment
// Jono Alderson [https://www.jonoalderson.com]
// =================================
// Google user agent strings are sourced from
// [https://support.google.com/webmasters/answer/1061943?hl=en]
// Feel free to add/edit definitions
// =================================
// Last updated: 20/03/2018