Skip to content

Instantly share code, notes, and snippets.

@woctezuma
woctezuma / download_library_items.py
Last active May 4, 2024 21:06
Fetch a user's libary from EGS
import json
from pathlib import Path
import requests
BASE_URL = (
"https://library-service.live.use1a.on.epicgames.com/library/api/public/items"
)
STATIC_PARAMS = "includeMetadata=true"
OUTPUT_FNAME = "library-items.json"
@woctezuma
woctezuma / download_publisher_index.py
Created April 25, 2024 09:57
Fetch the publisher index from EGS
import json
from pathlib import Path
import requests
BASE_URL = "https://egs-platform-service.store.epicgames.com/api/v1/egs/publisher-index"
OUTPUT_FNAME = "publisher-index.json"
LOCALE = "fr"
STORE_ID = "EGS"
@woctezuma
woctezuma / publisher-index.json
Created April 25, 2024 09:56
The publisher index at EGS
[
{
"contact": null,
"offers": [
{
"id": "3ceadb8101fb4950a9de85b31ed12f29",
"namespace": "188fb42582e24d20b0a876ed817efd69",
"title": "SOULVARS"
}
],
@woctezuma
woctezuma / inspect_profiles.py
Last active April 25, 2024 10:01
Look for words in Discord profiles (pronouns and bio)
import json
from pathlib import Path
BIO_FIELD = ["bio"]
PRONOUNS_FIELD = ["pronouns"]
fname = "profiles.json"
with Path(fname).open() as fn:
d = json.load(fn)
@woctezuma
woctezuma / intersect_owned_and_ignored.py
Created April 22, 2024 14:42
Check if an owned app is ignored
import json
from pathlib import Path
# https://store.steampowered.com/dynamicstore/userdata/
fname = "store.steampowered.com.json"
with Path(fname).open() as f:
data = json.load(f)
owned_apps = data["rgOwnedApps"]
@woctezuma
woctezuma / github_notes.md
Created January 12, 2024 14:53
Markdown syntax for notes on GitHub

Note

Highlights information that users should take into account, even when skimming.

Tip

Optional information to help a user be more successful.

Important

Crucial information necessary for users to succeed.

[!WARNING]

@woctezuma
woctezuma / left_click.ahk
Created January 2, 2024 10:36
AutoHotkey: automatically left-click several times
#Requires AutoHotkey v2.0
^a:: ; Press <Ctrl+A> to start the script.
{
Loop 10 ; Loop 10 times.
{
MouseClick "left" ; Left-click
Sleep 100 ; Sleep
if GetKeyState("z", "P") ; Press <Z> to stop the script.
break
@woctezuma
woctezuma / solve_egs_riddle.py
Created December 29, 2023 22:43
Find Steam games whose names fullfil a few constraints
import json
import pathlib
import re
WORD_LENGTH = 4
START_FIRST_WORD = "a"
START_LAST_WORD = "i"
WORD_LENGTH = 2
START_FIRST_WORD = "e"
https://www.grac.or.kr/resource/images/rating_all.gif
Part 1/2
등급분류번호 게임물명 등급분류일자 장르 등급 내용정보표시
EPIC-SG-231218-0001 Cursed to Golf 2023-12-18 액션
EPIC-SG-231218-0004 Freshly Frosted 2023-12-18 퍼즐
EPIC-SG-231218-0002 Human Resource Machine 2023-12-18 퍼즐
EPIC-SG-231213-0002 Melvor Idle 2023-12-13 캐주얼
EPIC-SG-231210-0001 art of rally 2023-12-10 레이싱
EPIC-SG-231122-0004 Slide Stories: Bucky's Quest 2023-11-22 퍼즐
EPIC-SG-231122-0003 Weener Smash - 1st Edition 2023-11-22 캐주얼
@woctezuma
woctezuma / .pre-commit-config.yaml
Last active May 4, 2024 13:07
Config for pre-commit hooks
files: \.(py|json)$
default_stages: [commit, manual]
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.4
hooks:
- id: ruff
args:
[
--fix,