Skip to content

Instantly share code, notes, and snippets.

View vaaas's full-sized avatar
🤔
TFW no js

vas vaaas

🤔
TFW no js
View GitHub Profile
@vaaas
vaaas / rg-download-button.js
Last active March 8, 2024 02:54
rg download button
// ==UserScript==
// @name RG Download Button
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Add download button
// @author Vasileios Pasialiokis
// @match https://www.redgifs.com/*
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant none
// ==/UserScript==
@vaaas
vaaas / disable-context-menu-highjacking.js
Last active October 29, 2023 22:04
Disable context menu highjacking
// ==UserScript==
// @name Disable context menu highjacking
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Disables context menu event highjacking
// @author Vasileios Pasialiokis
// @match https://www.redgifs.com/*
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant none
// @run-at document-start

Hi there, I'm here about a BM16a PCB order that I'm having trouble working with. I ordered it on June 12, 2023 through AliExpress, order ID 8169717183389187.

Symptoms:

  • LEDs don't light up when plugged in
  • Keystrokes are not issued when pins are shorted
  • Device is not recognised as a USB device at all
  • Unable to flash through QMK as it is not recognised through dfu-utils. Plugging in with the bootmagic button shorted does not work. Using the RST button does not work.
  • Device is not listed through lsusb -t
  • On Windows, a sound is made when the device is connected, but the device is not recognised
@vaaas
vaaas / pixiv-users-of-favs.js
Created February 19, 2023 17:13
Fetch the authors of favourited works in pixiv
const max_page = 0
const version = ''
const user = ''
const make_url = (x) => `https://www.pixiv.net/ajax/user/${user}/illusts/bookmarks?tag=&offset=${x*48}&limit=48&rest=show&lang=en&version=${version}`
function* seq(start, end) {
for (let i = start; i <= end; i++)
@vaaas
vaaas / bespoke_devops.md
Last active April 19, 2022 15:42
Bespoke devops with simple UNIX tools

Assumptions :

  • You have a web service, which may be a monolith or a microservice mesh, but either way it has more than one moving part.
  • You desire to containerise the moving parts.
  • You use systemd.
  • You know your way around UNIX utilities and shell script.

What we will achieve :

  • A build server that creates packages for your distribution. These packages may be your application, or container images.
@vaaas
vaaas / simple-auth-http-server
Last active April 12, 2022 07:04 — forked from fxsjy/SimpleAuthServer.py
simple-auth-http-server: simple http server with basic authentication (works with python3!)
#!/usr/bin/env python3
import http.server
from http.server import SimpleHTTPRequestHandler
import sys
import base64
key = ''
class AuthHandler(SimpleHTTPRequestHandler):
kwik.cx##.plyr::after
old.reddit.com##.cookie-infobar
www.reddit.com##.cookie-infobar
@vaaas
vaaas / trigram_search.js
Last active September 18, 2019 09:07
trigram search
let trigrams = null
const $$ = q => [...document.querySelectorAll(q)]
const lower_case = x => x.toLowerCase()
const alnum_only = x => x.replace(/[^A-Za-z0-9]/g, "")
function trigram(string)
{ const t = new Set()
@vaaas
vaaas / search.js
Last active March 30, 2020 00:39
list search
const $ = x => document.querySelector(x)
const $$ = x => [...document.querySelectorAll(x)]
const nonempty = x => x.length > 0
const lower_case = x => x.toLowerCase()
const includes = y => x => x.includes(y)
const multiple_included = xs => x => xs.some(includes(x))
const show = x => x.style.display = ""
const hide = x => x.style.display = "none"
const head = x => x[0]
const last = x => x[x.length - 1]