Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@kigiri
kigiri / queue-wsg.hs
Created November 3, 2023 16:19
queue wsg
/console scriptErrors 0
/click PVPReadyDialogEnterBattleButton
/run TogglePVPFrame()
/click PVPParentFrameTab2
/click [group]BattlefieldFrameGroupJoinButton;BattlefieldFrameJoinButton
@kigiri
kigiri / clear-netflix-mylist.js
Created August 26, 2018 08:17
clear your playlist on netflix
// pop the inspector and findyour authURL
// past this in the console
[...$$('a')]
.map(h => h.href)
.filter(a => a.startsWith('https://www.netflix.com/watch/'))
.map(a => a.split('/')[4].split('?')[0])
.map(n => fetch("https://www.netflix.com/api/shakti/v5bb18c11/playlistop", {
credentials: "include",
headers: {},
referrer: "https://www.netflix.com/browse/my-list",
@kigiri
kigiri / random-seed.js
Created September 22, 2022 17:43
seeded random in 385bytes of js
const randomSeed = ((r,a,n)=>(d,o,m,i,z,e,x)=>(o=n(3941471299,d),m=a(0.8633289230056107-(o>>>0)*r),i=a(0.15019597788341343-(o=n(o,d)>>>0)*r),z=a(0.9176952994894236-(o=n(o,d)>>>0)*r),e=1,()=>(x=2091639*m+e*r,m=i,i=z,z=x-(e=x|0))))(23283064365386963e-26,e=>e+(e<0),(e,r)=>{for(let t of r){let r=.02519603282416938*(e+=t.charCodeAt());r-=e=r>>>0,r*=e,r-=e=r>>>0,e+=4294967296*r}return e})
// usage:
const rand = randomSeed('hello') // must be a string
rand() // use like Math.random()
// the end.
@kigiri
kigiri / aligning-images.md
Created September 18, 2018 09:11 — forked from DavidWells/aligning-images.md
Guide to aligning images in github readme.md files

Aligning images

left alignment

This is the code you need to align images to the left:

<script type="text/javascript">
// On creer le player
const player = document.createElement('audio')
// Un peu de style pour indiquer d'afficher le player en bas a droite
player.style.display = 'none'
player.style.position = 'fixed'
player.style.bottom = '6px'
player.style.right = '6px'
const allLimited = (actions, { delay = 0, concurrency = 1 }) =>
new Promise((s, f) => {
let i = -1
const end = actions.length
const result = Array(end)
const delayed = delay && (fn => setTimeout(fn, delay))
async function next(x) {
if (x >= end) return x - end >= concurrency && s(result)
try {
const pause = delay && new Promise(delayed)
@kigiri
kigiri / emoji.html
Created May 11, 2021 23:17
favicon emoji
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>👕</text></svg>">
const ws = new WebSocket(`wss://gateway.discord.gg/?v=8&encoding=json`)
const ONCE = {}
const ON = {}
let s = null
let heartbeatAc
const heartbeat = () => {
console.log('heartbeat')
heartbeatAc = setTimeout(() => {
console.log('the client was ZOMBIFED')
@kigiri
kigiri / izidom.js
Last active August 25, 2020 23:41
frameworkless workflow spa pwa serverless JSON blockchain
const append = (p, ...n) => (p.append(...n.flat()), p)
const create = new Proxy((t,...c)=>append(Object.assign(document.createElement(t),c[0]&&c[0]==Object?c.shift():void 0),...c),{get:(f,t)=>(...c)=>f(t,...c)})
// copy paste this in the console from youtube
const ctx = new AudioContext()
const L = ctx.createGain()
const R = ctx.createGain()
const splitter = ctx.createChannelSplitter(2)
ctx.createMediaElementSource($('video')).connect(splitter, 0, 0)
splitter.connect(L, 0)
splitter.connect(R, 1)
L.connect(ctx.destination, 0)