Skip to content

Instantly share code, notes, and snippets.

View dannypoit's full-sized avatar
💭
I am the third revelation!

Danny Poit dannypoit

💭
I am the third revelation!
View GitHub Profile
@dannypoit
dannypoit / bringVideoToFrontWhenPlayed.js
Created October 7, 2025 13:53
This is just an example of a simple script to increase the z-index of an embedded video when played, to ensure it is not obscured by other elements.
const iframe = document.querySelector('.video-header .video-header__right>.content>div>iframe');
const player = new Vimeo.Player(iframe);
const videoHalf = document.querySelector('.video-header .video-header__right');
const startButton = document.getElementById('start-video');
player.on('play', function() {
videoHalf.style.zIndex = 2;
});
startButton.addEventListener('click', function(e) {
@dannypoit
dannypoit / gist:c0403b0c84dcd451261d87f17ac98a9f
Created September 19, 2024 00:05
redditShittyDelete.js
// a shitty little function I wrote to delete old comments on old.reddit.com/user/username/comments
function delComment(num) {
var things = document.querySelectorAll('.thing');
var thing = things[num];
var delBtn = thing.querySelector('.del-button .togglebutton');
delBtn.click();
var yesBtn = thing.querySelector('.yes');
yesBtn.click();
var yesBtn = thing.querySelector('.yes');
#!/bin/bash
## #ddev-generated
## Description: Start ddev for this project but first run the Docker vmnetd fix
## Usage: start-fix
## Example: ddev start-fix
sudo cp /Applications/Docker.app/Contents/Library/LaunchServices/com.docker.vmnetd /Library/PrivilegedHelperTools/com.docker.vmnetd
sudo tee -a /Library/LaunchDaemons/com.docker.vmnetd.plist > /dev/null <<EOT
<?xml version="1.0" encoding="UTF-8"?>