This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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 | |
* ===== | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# 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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:system="clr-namespace:System;assembly=mscorlib"> | |
<ResourceDictionary.MergedDictionaries> | |
<ResourceDictionary Source="Base.xaml"></ResourceDictionary> | |
</ResourceDictionary.MergedDictionaries> | |
<Style x:Key="QueryBoxStyle" BasedOn="{StaticResource BaseQueryBoxStyle}" TargetType="{x:Type TextBox}"> | |
<Setter Property="Background" Value="#1f1d1f"/> | |
<Setter Property="Foreground" Value="#cc1081" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
:: BatchGotAdmin | |
:------------------------------------- | |
REM --> Check for permissions | |
IF "%PROCESSOR_ARCHITECTURE%" EQU "amd64" ( | |
>nul 2>&1 "%SYSTEMROOT%\SysWOW64\cacls.exe" "%SYSTEMROOT%\SysWOW64\config\system" | |
) ELSE ( | |
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system" | |
) |
OlderNewer