Skip to content

Instantly share code, notes, and snippets.

View Uvacoder's full-sized avatar

uvacoder Uvacoder

View GitHub Profile
import { z } from "zod";
export const Fn = z.object({
API: z
.string()
.url("Must be a URL")
.endsWith("/", { message: "URL must end with /" }),
Socket: z
.string()
.url("Must be a URL")
<!DOCTYPE html>
<html>
<head>
<style>
canvas {
border: 1px solid black;
}
</style>
</head>
<body>
@Uvacoder
Uvacoder / webcrypto-examples.md
Created July 16, 2024 14:25 — forked from NikolaRHristov/webcrypto-examples.md
Web Cryptography API Examples
@Uvacoder
Uvacoder / gist:0738dc0a6291ac608e51ddd74a9a3fd4
Created June 22, 2024 00:55 — forked from ldakhoa/gist:3a5dde6e000106c89a7304ac12bcc5dc
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@Uvacoder
Uvacoder / followers.js
Created June 21, 2024 18:47 — forked from insin/followers.js
Run this while viewing someone's Twitter /following list to get the handles of everyone they follow
let $follows = document.querySelector('div[data-testid="primaryColumn"] section > h1 + div[aria-label] > div')
let handles = new Set()
let finishTimeout
let observer
function finish() {
if (finishTimeout) {
clearTimeout(finishTimeout)
}
finishTimeout = setTimeout(() => {
@Uvacoder
Uvacoder / userstyle-for-new-tweetdeck.css
Created June 21, 2024 18:46 — forked from insin/userstyle-for-new-tweetdeck.css
Userstyle for New TweetDeck - use with the Stylus extension: https://github.com/openstyles/stylus#stylus
/* Hide... */
/* Views on list tweets */
[data-testid="tweet"][tabindex="0"] div[id^=id__][role=group] > div:nth-child(4):nth-last-child(2),
/* Views on focused tweet */
[data-testid="tweet"][tabindex="-1"] div[dir] + div[aria-hidden="true"]:nth-child(2):nth-last-child(2),
[data-testid="tweet"][tabindex="-1"] div[dir] + div[aria-hidden="true"]:nth-child(2):nth-last-child(2) + div[dir]:last-child,
/* Bookmark button on focused tweet */
[data-testid="tweet"][tabindex="-1"] div[id^=id__][role=group] > div:nth-child(4):nth-last-child(2),
/* Share button on all tweets */
div[id^=id__][role=group] > div:nth-child(5):last-child,
@Uvacoder
Uvacoder / console.js
Created June 21, 2024 18:46 — forked from insin/console.js
Get currently-loaded user entities on twitter.com
entities = $('#react-root')._reactRootContainer._internalRoot?.current?.memoizedState?.element?.props?.children?.props?.store?.getState()?.entities?.users?.entities
users = {}
for (let user of Object.values(entities)) {
users[user.screen_name] = user
}
@Uvacoder
Uvacoder / hide-youtube-shorts.css
Created June 21, 2024 18:45 — forked from insin/hide-youtube-shorts.css
Hide YouTube Shorts - use with the Stylus extension: https://github.com/openstyles/stylus#stylus
/* Nav item */
a[title="Shorts"],
/* Video shelf in Home and Subscriptions */
ytd-rich-shelf-renderer[is-shorts],
/* Video shelf in Search */
ytd-reel-shelf-renderer {
display: none !important;
}
@supports selector(:has(*)) {
let $segments = document.querySelector('.ytd-transcript-search-panel-renderer #segments-container')
let sections = []
let parts = []
for (let $el of $segments.children) {
if ($el.tagName == 'YTD-TRANSCRIPT-SECTION-HEADER-RENDERER') {
if (parts.length > 0) {
sections.push(parts.join(' '))
parts = []
}
@Uvacoder
Uvacoder / updatePasswords.js
Created June 21, 2024 18:43 — forked from insin/updatePasswords.js
Mass update Firefox passwords (run in Tools → Web Developer → Browser Console) - https://developer.mozilla.org/en-US/docs/Tools/Browser_Toolbox#Enabling_the_Browser_Toolbox
function updatePasswords() {
let oldPassword = prompt('Old password:')
if (!oldPassword) return
let loginManager = Components.classes['@mozilla.org/login-manager;1']
.getService(Components.interfaces.nsILoginManager)
let matchingLogins = loginManager.getAllLogins().filter(l => l.password === oldPassword)
let matchCount = matchingLogins.length
if (matchCount === 0) return alert('No matching logins found')