Skip to content

Instantly share code, notes, and snippets.

View MikeKovarik's full-sized avatar

Mike MikeKovarik

View GitHub Profile
@MikeKovarik
MikeKovarik / pointerevents.ts
Last active April 8, 2022 07:45
prototype of react dnd using raw pointerevents / use-gesture
/* eslint-disable react-hooks/exhaustive-deps */
/* eslint-disable @typescript-eslint/no-empty-function */
import { useCallback, useEffect, useRef, useState } from 'react'
const touchDragTimeout = 500
const touchDragScrollThreshold = 20
const isOutsideThreshold = (a: number, b: number) => Math.abs(a - b) > touchDragScrollThreshold
import { createContext, useContext } from 'react'
@MikeKovarik
MikeKovarik / sniffer.js
Last active August 13, 2016 00:27
Sombra sniffer: Quick & dirty blizzard websites sniffer. It loads given url, finds all image links on it and tries to look at those locations for possible files we're guessing are out there somewhere
// quick & dirty blizzard websites sniffer.
// It loads given url, finds all image links on it and tries to
// look at those locations for list of possible filenames we're guessing
// are out there somewhere
var https = require('https')
// helper functions and constants
function uniq(array) {
return Array.from(new Set(array))