Skip to content

Instantly share code, notes, and snippets.

View noelleleigh's full-sized avatar

Noelle Leigh noelleleigh

View GitHub Profile
@OrionReed
OrionReed / dom3d.js
Last active July 22, 2024 08:58
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; // ¯\\_(ツ)_/¯
from django.conf import settings
def SessionCookieSameSiteWorkaround(get_response):
def middleware(request):
# See:
# https://blog.chromium.org/2019/10/developers-get-ready-for-new.html
# https://github.com/django/django/pull/11894
# https://web.dev/samesite-cookie-recipes/#handling-incompatible-clients
# https://www.chromium.org/updates/same-site/incompatible-clients
@stafot
stafot / reset_virtualbox_dhcp_leases.sh
Last active November 3, 2020 11:15
Resets virtualbox DHCP leases to ensure that minikube will always take a specific IP.
#!/usr/bin/env bash
function minikube_reset_vbox_dhcp_leases() {
# Check OS version
case $OSTYPE in
darwin*)
VBOX_CONFIG_DIR=Library
;;
linux*)
@dreki
dreki / mbmbam.md
Last active October 20, 2023 21:45
MBMBaM Memorable Bits

MBMBaM Episodes

  • 424, “That family always had Gushers, and I made them mine because of my actions,”
  • 418, “Gotta get a vasectomy,”
  • 401, sex on the ISS
  • 395, “So sweet, so crisp, so bitter, so many.”
  • 392, “That’s another hour of Monster Hunter I can play before my body has to go to sleep,” “Let’s put the tiger on the table and yell at it,”
  • 390, Justin kicks a bag at Taekwondo 50 times and then throws up
  • 380, "Jesus please us," "That's a wild way of doing that," "We're getting British up in here!," “Got a penis that can cum and everything,”
  • 379, crossing guard, “it is pretty ‘punk rock’,” crane lifts up a car into the sky
  • 378, someone’s brother rips out the pockets of their jeans while they’re talking to them,

The PATH is an important concept when working on the command line. It's a list of directories that tell your operating system where to look for programs, so that you can just write script instead of /home/me/bin/script or C:\Users\Me\bin\script. But different operating systems have different ways to add a new directory to it:

Windows

  1. The first step depends which version of Windows you're using:
  • If you're using Windows 8 or 10, press the Windows key, then search for and
@djotto
djotto / mp4.sh
Created May 20, 2017 12:33 — forked from anonymous/mp4.sh
Merge multiple mp4 files as chapters
#! /usr/bin/env bash
####################################################
# Required Libraries
#
# library name | commands used | verified version
# ------------------------------------------------
# ffmpeg | ffmpeg/ffprobe | 3.1.4 3.2
# gpac | mp4box | 0.6.1
# mp4v2 | mp4chaps | 2.0.0