Skip to content

Instantly share code, notes, and snippets.

View berstend's full-sized avatar
🐋
⊂(◉‿◉)つ b̡͉̙̞͙͔͔̺̉͌̽̽͂̿͂͝erstend͔͝

berstend̡̲̫̹̠̖͚͓̔̄̓̐̄͛̀͘ berstend

🐋
⊂(◉‿◉)つ b̡͉̙̞͙͔͔̺̉͌̽̽͂̿͂͝erstend͔͝
  • Berlin, Germany
View GitHub Profile
@berstend
berstend / graphiql_dark_0.11.11.css
Created November 4, 2019 14:47
Dark mode for GraphiQL extracted from Dark Reader
[data-darkreader-inline-bgcolor] {
background-color: var(--darkreader-inline-bgcolor) !important;
}
[data-darkreader-inline-bgimage] {
background-image: var(--darkreader-inline-bgimage) !important;
}
[data-darkreader-inline-border] {
border-color: var(--darkreader-inline-border) !important;
}
[data-darkreader-inline-border-bottom] {
@berstend
berstend / instagram-unfollow-users.md
Last active May 15, 2024 19:31
Mass unfollow users on Instagram (no app needed)
  • Go to your profile on instagram.com (sign in if not already)
  • Click on XXX following for the popup with the users you're following to appear
  • Open Chrome Devtools and Paste the following into the Console and hit return:
(async function(){
  const UNFOLLOW_LIMIT = 800
  const delay = (ms) => new Promise(_ => setTimeout(_, ms))
  const findButton = (txt) => [...document.querySelectorAll("button").entries()].map(([pos, btn]) => btn).filter(btn => btn.innerHTML === txt)[0]
@berstend
berstend / chromiumVersion.js
Last active March 27, 2021 20:21
Parse chrome/chromium version from user agent string and semver compare
const chromiumVersion = (() => {
const compare = (newVer = "", oldVer = "") => {
const oldParts = oldVer.split(".");
const newParts = newVer.split(".");
for (let i = 0; i < newParts.length; i++) {
const a = ~~newParts[i]; // parse int
const b = ~~oldParts[i]; // parse int
if (a > b) return 1;
if (a < b) return -1;
}
@berstend
berstend / hcaptcha.ts
Created April 15, 2021 13:56 — forked from prescience-data/hcaptcha.ts
HCaptcha Solver
import { IncomingMessage, RequestListener, ServerResponse } from "http"
import { createServer, Server } from "https"
import puppeteer, {
Browser,
BrowserLaunchArgumentOptions,
Protocol
} from "puppeteer-core"
import { Page } from "./types"
import Cookie = Protocol.Network.Cookie
@berstend
berstend / es6_delay.md
Last active July 16, 2023 14:26
The best ES6 Promise.delay functions

Hello future self, here's the TypeScript version for your copy/pasting pleasure:

const delay = (ms: number) => new Promise(_ => setTimeout(_, ms))

and your favorite JS version:

const delay = ms =&gt; new Promise(_ =&gt; setTimeout(_, ms))