Skip to content

Instantly share code, notes, and snippets.

@ohmika
ohmika / index.html
Created September 12, 2020 01:13
Real-Time HTML/CSS Editor
<header>
<h1>Real-Time HTML/CSS Editor</h1>
<h2>Put something between the tags or replace them altogether...</h2>
</header>
<div class="container grid">
<form>
<h3>HTML</h3>
<textarea id="html" class="edit"><h1></h1></textarea>
<h3>CSS</h3>
// ==UserScript==
// @name YouTube Fix Thumbnails
// @match *://www.youtube.com/*
// @exclude *://www.youtube.com/embed/*
// @grant GM_addStyle
// @run-at document-start
// ==/UserScript==
GM_addStyle('ytd-rich-item-renderer { width: 150px !important; }');
GM_addStyle('yt-img-shadow#avatar {width: 20px !important; height: 20px !important}');
GM_addStyle('yt-formatted-string {font-size: 1rem !important;}');
// ==UserScript==
// @name Krunker Hack
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Teleport woo hoo
// @author CryoScalpel
// @match https://krunker.io/*
// @grant none
// ==/UserScript==
// ==UserScript==
// @name Loader.to Extension
// @namespace https://loader.to
// @version 0.1
// @description Adds button to download youtube video
// @author Loader.to
// @match *://www.youtube.com/*
// @exclude *://www.youtube.com/embed/*
// @run-at document-start
// @grant none
@ohmika
ohmika / index.html
Created April 30, 2019 15:35
Real-Time HTML/CSS Editor
<header>
<h1>Real-Time HTML/CSS Editor</h1>
<h2>Put something between the tags or replace them altogether...</h2>
</header>
<div class="container grid">
<form>
<h3>HTML</h3>
<textarea id="html" class="edit"><h1></h1></textarea>
<h3>CSS</h3>
@ohmika
ohmika / Google QR Code API.txt
Created February 28, 2019 20:16
Place the link to create a QR code to at the end of this URL
https://chart.apis.google.com/chart?cht=qr&chs=500x500&choe=UTF-8&chld=H|0&chl=
@ohmika
ohmika / URL Shorteners.txt
Last active March 26, 2019 16:05
Some free URL Shortener services
https://is.gd
https://tiny.ph
https://kutt.it
https://bit.ly
https://tinyurl.com
https://v.gd
https://goo.gl
@ohmika
ohmika / iOS Shortcut Download JavaScript.txt
Created February 18, 2019 22:32
Use the bookmarklet or JavaScript in order to download the shortcut file from an icloud.com link
javascript:%22use%20strict%22;%0Alet%20iCloudUrl%20%3D%20location.href;%0Alet%20apiUrl%20%3D%20iCloudUrl.replace(/%5C/shortcuts/g,%20%22/shortcuts/api/records%22);%0Alet%20iCloudApi%20%3D%20new%20XMLHttpRequest();%0AiCloudApi.open(%22GET%22,%20apiUrl);%0AiCloudApi.responseType%20%3D%20%22text%22;%0AiCloudApi.send();%0A%0AiCloudApi.onload%20%3D%20function()%20%7B%0A%20%20let%20apiResult%20%3D%20JSON.parse(iCloudApi.response);%0A%0A%20%20function%20saveData(url)%20%7B%0A%20%20%20%20let%20a%20%3D%20document.createElement(%22a%22);%0A%20%20%20%20document.body.appendChild(a);%0A%20%20%20%20a.style%20%3D%20%22display:%20none%22;%0A%0A%20%20%20%20a.href%20%3D%20url;%0A%20%20%20%20a.download;%0A%20%20%20%20a.click();%0A%20%20%20%20window.URL.revokeObjectURL(url);%0A%20%20%7D%0A%20%20let%20downloadURL%20%3D%20apiResult.fields.shortcut.value.downloadURL;%0A%20%20let%20shortcutName%20%3D%20apiResult.fields.name.value;%0A%20%20let%20finalURL%20%3D%20downloadURL.replace(%22$%7Bf%7D%22,%20shortcutName%20+%20%22.shortcut%22
@ohmika
ohmika / YouTube ID Regex.txt
Created February 18, 2019 21:01
Use this regex to get the video ID of a YouTube URL
(?<=(?:v|i)=)[a-zA-Z0-9-]+(?=&)|(?<=(?:v|i)\/)[^&\n]+|(?<=embed\/)[^"&\n]+|(?<=(?:v|i)=)[^&\n]+|(?<=youtu.be\/)[^&\n]+