Skip to content

Instantly share code, notes, and snippets.

View JohannesBauer97's full-sized avatar
sluuurp

Joba JohannesBauer97

sluuurp
View GitHub Profile
@JohannesBauer97
JohannesBauer97 / google-scraper.js
Last active October 7, 2022 14:57
How to scrape full resolution images from Google in 2022
// Get all results
const imageResults = document.querySelectorAll('[jsname="N9Xkfe"]');
console.log('Number of image results:', imageResults.length);
// This array will be filled with image urls later
const imageSourceUrls = [];
// Iterate through results and subscribe to attribute change events
imageResults.forEach(imageResult => {
@JohannesBauer97
JohannesBauer97 / esp8266base.ino
Last active February 20, 2021 12:34
Base sketch for ESP8266 projects (Captive Portal, OTA Updates)
#include <ESP8266WiFi.h>
#include <DNSServer.h>
#include <ESP8266WebServer.h>
#include <WiFiManager.h> // https://github.com/tzapu/WiFiManager
#include <ESP8266HTTPClient.h>
#include <ESP8266httpUpdate.h>
const int FW_VERSION = 1;
const char* FW_VERSION_URL = "http://<domain>/<project>/version";
const char* FW_IMAGE_URL = "http://<domain>/<project>/img.bin";
@JohannesBauer97
JohannesBauer97 / updatePlauder.sh
Created May 30, 2018 14:42
Plauder update script
#!/usr/bin/env bash
#Settings:
REPODIR="/home/websites/Plauder"
BRANCH="develop"
echo "Starting Plauder update"
cd $REPODIR
git checkout $BRANCH
git reset --hard HEAD
@JohannesBauer97
JohannesBauer97 / webcheck.service
Created April 10, 2018 06:53
Systemd Unit for nodeJS webchecker Tool
# First add a nodejs system user
# useradd -M -s nodejs
# Github Repo: https://github.com/Waterfront97/WebCheck
[Unit]
Description=Controls WebChecker
After=network.target apache2.service
[Service]
User=nodejs
@JohannesBauer97
JohannesBauer97 / channelWatcherAPI.service
Last active April 9, 2018 15:36
NodeJS Systemd Start/Stop Unit
[Unit]
Description=Controls Gamerino Channelwatcher REST API
After=network.target mysql.service
[Service]
User=nodejs
ExecStart=/usr/bin/node /home/websites/TSChannelWatcher/api/index.js
Restart=always
[Install]
@JohannesBauer97
JohannesBauer97 / gitea.service
Created March 28, 2018 20:07
Gitea Systemd Unit
[Unit]
Description=Control Gitea Sourcecontrol
Requires=network.target mysql.service
[Service]
User=gitea
ExecStart=/home/websites/gitea/gitea
Restart=on-failure
[Install]