Skip to content

Instantly share code, notes, and snippets.

View Smart123s's full-sized avatar

Péter Tombor Smart123s

  • Student at University of Pannonia
  • Hungary
  • 07:51 (UTC +02:00)
View GitHub Profile
@Smart123s
Smart123s / gog_cron_tutorial.md
Last active November 26, 2022 09:42
Tutorial on how to set up a cron job that claims games given away on gog.com every day.

Intro

In this tutorial I'm going to guide you through setting up a cron job, that opens https://www.gog.com/giveaway/claim every day, which adds the game currently on giveaway to your account. I'm going to use a Raspberry Pi with Raspberry Pi OS, but any Linux distro should work, as long as it's powered on during the time you plan to run the cron job. If you don't have a Raspberry Pi at home, I'd recommend using a free VPS. Google Cloud and Oracle Cloud both offer a reliable, and free VPS. For the setup, I'm going to use Chrome, but any browser is feasible.

Getting a session cookie

You can do this on your desktop machine.

  1. Install the EditThisCookie extension (Firefox version is also available).
  2. Right click EditThisCookie icon in the extensions toolbar, then click Options.
@Smart123s
Smart123s / pou_recalculate_check.sh
Created May 9, 2022 18:21
Re-calculates and updates the value of `check` in me.pou.app_preferences.xml for the Android game Pou
#!/bin/bash
# Read the value of state from me.pou.app_preferences.xml
state=$(grep -oPm1 '(?<=<string name="state">)[^<]+' me.pou.app_preferences.xml)
# Format state to the hashable string & calculate it's hash
check=$(echo -n "p@v_4"${state//&quot;/\"} | md5sum | awk '{ print $1 }')
# Update the value of check in the me.pou.app_preferences.xml
# Regex from https://stackoverflow.com/a/17333829/9767089
@Smart123s
Smart123s / Update-AUPackages.md
Last active April 27, 2024 00:28
Update-AUPackages Report #powershell #chocolatey