Skip to content

Instantly share code, notes, and snippets.

View lances101's full-sized avatar

Borys Makogonyuk Vasylev lances101

  • Eindhoven, Netherlands
View GitHub Profile
@lances101
lances101 / hotline_uah_to_eur.js
Created February 4, 2018 20:32
Hotline.ua UAH to EUR
// ==UserScript==
// @name HotlineUA UAH to EUR
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author Boromak
// @match http://hotline.ua/*
// @grant none
// ==/UserScript==
@lances101
lances101 / wox_uninstaller.bat
Last active February 9, 2018 22:59
Wox uninstaller bat tool
@echo off
echo === Wox uninstallation utility ===
echo Now running Squirrel uninstaller
%LOCALAPPDATA%\Wox\Update.exe --uninstall .
echo Deleting Wox application files
rmdir %LOCALAPPDATA%\Wox /S /Q
echo Deleting Wox configuration files
rmdir %APPDATA%\Wox /S /Q
@lances101
lances101 / callbill.js
Created July 19, 2018 20:12
http://call-bill.com washing machine availability notifier
/**
* visits call-bill.com, logs in and
* searches for available washing machines
* execs whatever is in the exec command when machine is found
* by default uses OSX "say" command.
* =====
* requires puppeteer: npm i puppeteer
* =====
*/
@lances101
lances101 / callbill.py
Created July 19, 2018 21:37
Python 3.6 CallBill machine look up
#
# 1. logs in to CallBill via its API.
# 2. pulls location from config or CallBill profile if not defined
# 3. searches for matching machines based on filters in config
# (default: washing machines that are available)
# 4. once the check cycle is finished, calls config.found_func
# (default found_func calls OSX "say" executable)
# 5. waits X seconds before next attemp
# (default 60 seconds)
@lances101
lances101 / querySelector_shadowDOM.js
Created September 3, 2018 19:00
querySelector and querySelectorAll that looks in the ShadowDOM
// quick and ugly implementation to be able to query both dom and shadowdom
function find(elem, selector) {
for(var i = 0; i < elem.children.length; i++){
let child = elem.children[i];
if(child.matches(selector))
return child;
found = find(child, selector);
if(found)
return found;
@lances101
lances101 / config.py
Created December 6, 2019 13:02
Python Config
import json
import os
from pathlib import Path
from typing import Optional
DEFAULT_CONFIG_NAME = "default.json"
SECRETS_FILE_PATH = "secrets.json"
class Config(object):