Skip to content

Instantly share code, notes, and snippets.

View mvolfik's full-sized avatar
🐧
*penguin noises*

Matěj Volf mvolfik

🐧
*penguin noises*
View GitHub Profile
@mvolfik
mvolfik / updates.vbs
Created December 7, 2018 11:17
Make computer look updating
Dim objShell, strPath1, strAttr1
Set objShell = CreateObject ("WScript.Shell")
strPath1 = """C:\Program Files (x86)\Mozilla Firefox\firefox.exe"""
strAttr1 = "-P default geekprank.com/win10-update/"
objShell.Run strPath1 & strAttr1
WScript.sleep 1500
objshell.sendkeys "{F11}"
// ==UserScript==
// @name Kahoot hotkeys
// @namespace mvolfik.github.io
// @version 0.2
// @description take over the world!
// @author mvolfik
// @match https://kahoot.it/v2/*
// ==/UserScript==
(function() {
// ==UserScript==
// @name Canvas tweaks
// @namespace https://mvolfik.github.io/
// @version 0.4
// @description Try to take over the world!
// @author matjey
// @match http://i.protab.cz/mazec/live/
// @downloadURL https://gist.githubusercontent.com/mvolfik/bc928b6334edcca9f3049eb9941ea324/raw/canvas_upgrade.user.js
// @grant GM_addStyle
// @grant unsafeWindow
@mvolfik
mvolfik / pdf_brochure.py
Last active January 24, 2021 18:33
Reorder pages of a PDF to allow printing as a brochure
import sys, subprocess, tempfile, os.path, warnings
A4 = (595, 842)
source = sys.argv[1]
target = sys.argv[2]
pages = None
page_size = None
@mvolfik
mvolfik / keybase.md
Created March 17, 2021 10:00
Keybase identity proof

Keybase proof

I hereby claim:

  • I am mvolfik on github.
  • I am mvolfik (https://keybase.io/mvolfik) on keybase.
  • I have a public key ASDDaXK1Eg2w4eURSQ3GtP_eu8u4TFM637ckRfvRJg5GZgo

To claim this, I am signing this object:

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mvolfik
mvolfik / AoCleaderboard.py
Created December 12, 2019 15:19
View timestamps when people solved specific task of Advent of Code
import json
from datetime import datetime as dt
import requests
import re
y = input("YEAR: ")
cookie = {'session': "YOUR SESSION COOKIE HERE (it's valid for 30 days)"}
homepage = requests.get('https://adventofcode.com/'+y+'/leaderboard/private', cookies=cookie)
for id in re.compile(r"(?<=\/"+y+r"\/leaderboard\/private\/view\/)(\d+)").findall(homepage.content.decode()):
print("\n"*5)
data = json.loads(requests.get('https://adventofcode.com/'+y+'/leaderboard/private/view/'+id+'.json', cookies=cookie).content)
@mvolfik
mvolfik / troll.vbs
Last active February 9, 2022 19:48
Windows trolling script
Set WshShell = WScript.CreateObject("WScript.Shell")
strName = wshShell.ExpandEnvironmentStrings( "%USERNAME%" )
'If you find a Windows PC with user logged in, place this file in folder
' C:\Users\username\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\ (may vary with PC language)
' and run for first time to disable security check and Firefox default browser check
WScript.sleep 5000
msgbox "Critical: Your system is severely affected by multiple threats.. All processes are being aborted..."
msgbox "Sytem failure in %WINDIR%"
@mvolfik
mvolfik / shopify-compare-sitemap-api.js
Created June 20, 2022 11:37
For a given shopify store, crawl a list of products from the API, and from sitemaps, and compare if both contain the same products
import { gotScraping } from 'got-scraping';
const fetcher = gotScraping.extend({
proxyUrl: process.env.PROXY_URL,
retry: { limit: 3 },
});
async function main() {
let baseUrl;
try {