Skip to content

Instantly share code, notes, and snippets.

View zoetrope69's full-sized avatar
🦫
beavering away

z zoetrope69

🦫
beavering away
View GitHub Profile
@zoetrope69
zoetrope69 / betterdiscord-remove-superreaction.css
Last active June 4, 2023 23:46
Remove Super Reaction from Discord (BetterDiscord Custom CSS)
/**
* Remove super reaction guff
*/
/*
target reactions with custom background
+ remove background
+ change cursor to ?
*/
@zoetrope69
zoetrope69 / zactopus-twitch-tweaks.user.js
Last active September 7, 2021 12:19
zactopus' Twitch Tweaks
// ==UserScript==
// @name zactopus' Twitch Tweaks
// @version 1.1.1
// @grant none
// @match https://www.twitch.tv/*
// @require https://cdn.jsdelivr.net/npm/@violentmonkey/dom@1
// ==/UserScript==
const logger = (...args) => {
return console.log("[zactopus' Twitch Tweaks]", ...args);
@zoetrope69
zoetrope69 / circle-ci-release-bookmarklet.js
Last active July 30, 2020 11:09
CircleCI Release Bookmarklet
# minified
javascript:!function(){let e=0;const r={philmitchell:["blue"],grant:["blue"],ernie:["grey"],wolfgang:["green"],babyChick:["yellow"],bobRoss:["blue","white","grey","green","brown","blue"],rainbow:["red","orange","yellow","green","blue","purple","pink"],pocPrideFlag:["black","brown","red","orange","yellow","green","blue","purple","pink"],agenderFlag:["black","grey","white","green","white","grey","black"],aromanticFlag:["green","green","white","grey","black"],asexualFlag:["black","grey","white","purple"],bisexualFlag:["pink","purple","blue"],genderfluidFlag:["pink","white","purple","black","blue"],genderQueerFlag:["purple","white","green"],intersexFlag:["yellow","purple","yellow"],lesbianFlag:["red","orange","white","pink","purple"],nonBinaryFlag:["yellow","white","purple","black"],pansexualFlag:["pink","yellow","blue"],polysexualFlag:["pink","green","blue"],transFlag:["blue","pink","white","pink","blue"]},l=[...r.rainbow,...Object.keys(r)],n=l[Math.floor(Math.random()*l.length)],a={philmitchell:"phil
@zoetrope69
zoetrope69 / loadMoatYield.js
Created February 10, 2020 16:01
Handling loading Moat Yield Intelligence with a promise and timeout
export const MOAT_TIMEOUT = 1000;
const handleMoatYieldReady = resolve => {
// being extra careful that this API is available because
// we shouldn't trust Moat works as expected...
if (!window.moatPrebidApi) {
return resolve({ moatYieldUnavailable: true });
}
const { setMoatTargetingForAllSlots } = window.moatPrebidApi;
@zoetrope69
zoetrope69 / ExampleYouTubeiFrame.jsx
Last active January 30, 2020 13:26
Simplified YouTube React iFrame with Embed Config
import React from 'react';
import PropTypes from 'prop-types';
import querystring from 'qs';
const isYouTubeEmbedURL = url =>
!!url.match(/^(https|http):\/\/(?:www\.)?youtube.com\/embed\/[A-z0-9]+/g);
const getYouTubeVideoId = url => {
const match = url.match(/\/embed\/([^?]+)/);
return match[1];
@zoetrope69
zoetrope69 / YouTubeEmbedConfigIframeExample.html
Last active January 28, 2020 14:41
YouTube Embed Config iFrame Example
<iframe
width="560"
height="315"
src='https://www.youtube.com/embed/Yb7jFafo3x4?embed_config={"primaryThemeColor":"#FF0000","relatedChannels":["UCCpY-hecoW6hn3Gx7wpVyRw","UCWJ2lWNubArHWmf3FIHbfcQ"],"relatedVideos":["FXLk2rCG1yg","Yb7jFafo3x4"],"autonav":true,"disableRelatedVideos":true}'
frameborder="0"
allow="autoplay; encrypted-media"
allowfullscreen
>
</iframe>
@zoetrope69
zoetrope69 / YouTubeAdWrapperExample.jsx
Created January 28, 2020 14:17
Example of using YouTubeAdWrapperExample.jsx
import React from 'react';
const YouTubeAdWrapperExample = props => (
<YouTubeAdWrapper url={props.url}>
{urlWithEmbedConfig => (
<ExampleComponent {...props} url={urlWithEmbedConfig} />
)}
</YouTubeAdWrapper>
);
@zoetrope69
zoetrope69 / YouTubeAdWrapper.jsx
Created January 28, 2020 14:13
YouTube Ad Wrapper React component
import React from 'react';
import PropTypes from 'prop-types';
import querystring from 'qs';
import { AdSlotConsumer } from './AdSlotConsumer';
export const isYouTubeEmbedURL = url =>
!!url.match(/^(https|http):\/\/(?:www\.)?youtube.com\/embed\/[A-z0-9]+/g);
const getYouTubeVideoId = embedUrl => {
const match = embedUrl.match(/\/embed\/([^?]+)/);