Skip to content

Instantly share code, notes, and snippets.

@marcus-at-localhost
marcus-at-localhost / listAllEventListeners.js
Created June 4, 2020 06:24 — forked from tkafka/listAllEventListeners.js
List all event listeners in a document
console.table((function listAllEventListeners() {
const allElements = Array.prototype.slice.call(document.querySelectorAll('*'));
allElements.push(document); // we also want document events
const types = [];
for (let ev in window) {
if (/^on/.test(ev)) types[types.length] = ev;
}
let elements = [];
for (let i = 0; i < allElements.length; i++) {
@vicgonvt
vicgonvt / deployment_guide.md
Last active March 17, 2024 06:51
Deployment Guide for Ubuntu Server from Scratch with Laravel
@vladdu
vladdu / main.js
Last active January 25, 2022 18:54 — forked from kdzwinel/main.js
List all undefined CSS classes
/*
This script attempts to identify all CSS classes mentioned in HTML but not defined in the stylesheets.
In order to use it, just run it in the DevTools console (or add it to DevTools Snippets and run it from there).
Note that this script requires browser to support `fetch` and some ES6 features (fat arrow, Promises, Array.from, Set). You can transpile it to ES5 here: https://babeljs.io/repl/ .
Known limitations:
- it won't be able to take into account some external stylesheets (if CORS isn't set up)
- it will produce false negatives for classes that are mentioned in the comments.
@avataru
avataru / EloquentCheatSheet.md
Last active May 31, 2024 08:01
Eloquent relationships cheat sheet
@Burrer
Burrer / Form.css
Last active May 25, 2023 05:28
Contact Form: Using SendGrid WebAPI and cURL PHP
/* Form.html CSS, just copy and paste any where in your style.css file, or customize to fit with your domain */
form.contact p {
font-size: 15px;
padding: 0 0 15px 0;
margin: 0;
}
form.contact input, form.contact textarea {
font-family: Arial;
font-size: 15px;
@christopher-hopper
christopher-hopper / vm-resize-hard-disk.md
Last active April 5, 2022 10:30
Resize a Hard Disk for a Virtual Machine provisioned using Vagrant from a Linux base box to run using VirutalBox.

Resize a Hard Disk for a Virtual Machine

Our Virtual Machines are provisioned using Vagrant from a Linux base box to run using VirutalBox. If the Hard Disk space runs out and you cannot remove files to free-up space, you can resize the Hard Disk using some VirtualBox and Linux commands.

Some assumptions

The following steps assume you've got a set-up like mine, where: