Skip to content

Instantly share code, notes, and snippets.

View andybroomfield's full-sized avatar

Andy Broomfield andybroomfield

View GitHub Profile
Hi,
To be compliant with GDPR, I request a copy of all my personal data that is linked to the email address you used here ( mail@mail.com ) (article 15, right of access: https://www.dataprotection.ie/en/individuals/know-your-rights/right-access-information).
Then I would also like you to withdraw, all said data, once you sent it, from all your databases, to not use this data anymore. (article 17 and 19 https://www.dataprotection.ie/en/individuals/know-your-rights/right-erasure-articles-17-19-gdpr)
This includes all the designs I've uploaded on your site, and the reviews I've left.
If you're not the right person to do so, please forward this information to your DPO.
Have a lovely day,
@OrionReed
OrionReed / dom3d.js
Last active July 13, 2026 17:34
3D DOM viewer, copy-paste this into your console to visualise the DOM topographically.
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks.
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/)
(() => {
const SHOW_SIDES = false; // color sides of DOM nodes?
const COLOR_SURFACE = true; // color tops of DOM nodes?
const COLOR_RANDOM = false; // randomise color?
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com)
const MAX_ROTATION = 180; // set to 360 to rotate all the way round
const THICKNESS = 20; // thickness of layers
const DISTANCE = 10000; // ¯\\_(ツ)_/¯
@lucahammer
lucahammer / delete-tweets.js
Last active July 14, 2026 02:01
Delete all your Tweets Javascript
/*
This may get your account banned. It runs in your regular browser with your regular login without needing the API.
The script does the same things that you would do yourself:
Click the three dots, select delete Tweet, confirm, scroll to next Tweet, repeat.
==========================
Usage
1. Open your Twitter profile in a browser
2. Open the console in the developer tools (F12)
3. Paste the script and press enter
4. ???
@jenitehan
jenitehan / MyModuleRouteSubscriber.php
Created February 3, 2022 19:44
Set Drupal group parameter on a views page route with a group ID contextual filter.
<?php
namespace Drupal\my_module\EventSubscriber;
use Drupal\Core\Routing\RouteSubscriberBase;
use Drupal\Core\Routing\RoutingEvents;
use Symfony\Component\Routing\RouteCollection;
/**
* My module route subscriber.
@varjmes
varjmes / calm.js
Created March 25, 2021 22:39
Calm Mode Bookmarklet
javascript:(function () { const page = document.getElementsByTagName('html'); page[0].style.filter = 'saturate(50%)'})();
@nathanhleung
nathanhleung / FIX-MACOS-HANG.md
Last active December 17, 2024 09:03
Fix macOS Hanging Issue

Fix macOS Hanging Issue

Problem

Hey Apple users:

If you're now experiencing hangs launching apps on the Mac, I figured out the problem using Little Snitch.

It's trustd connecting to http://ocsp.apple.com >

Problem:
--------
Trying to get a test to use a custom handler, defaultConfiguration()
in QuizFormHandler references a configuration setting called 'training_program'.
In order for this to work properly during install, Drupal needs to know the schema
of any handlers that have configuration settings
Webform missing schema error
----------------------------
Drupal\Core\Config\Schema\SchemaIncompleteException :
@dpagini
dpagini / clear_varnish.sh
Created September 21, 2017 19:19
Acquia cloud hook function to clear varnish cache.
#!/bin/bash
varnish_purge() {
echo "@INFO: Clear varnish cache starting"
for domain in `$drush_cmd ac-domain-list --format=print_r`; do
echo "@INFO: Clearing varnish cache for $domain"
$drush_cmd ac-domain-purge $domain
done
@arturotena
arturotena / TrimJavaScriptPolyfill.js
Last active January 7, 2021 15:07
JavaScript trim() polyfill
/* trim ployfill: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/Trim */
if (!String.prototype.trim) {
(function() {
// Make sure we trim BOM and NBSP
var rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;
String.prototype.trim = function() {
return this.replace(rtrim, '');
};
})();
}
<?php
//
// delete-old-tweets.php - https://github.com/timdp
//
// -- Instructions --
// 1. Save this script somewhere as delete-old-tweets.php
// 2. Get your Twitter archive and extract it to the same folder
// 3. Clone https://github.com/themattharris/tmhOAuth to the same folder
// 4. Register an app at dev.twitter.com and enter its credentials below