Skip to content

Instantly share code, notes, and snippets.

View h3xxx's full-sized avatar
:octocat:
hello :trollface: 💻 :hurtrealbad:

Roger Bonin h3xxx

:octocat:
hello :trollface: 💻 :hurtrealbad:
View GitHub Profile
const poll = async ({ fn, validate, interval, maxAttempts }) => {
let attempts = 0;
const executePoll = async (resolve, reject) => {
const result = await fn();
attempts++;
if (validate(result)) {
return resolve(result);
} else if (maxAttempts && attempts === maxAttempts) {
@h3xxx
h3xxx / Readme.md
Created July 24, 2020 12:15 — forked from stecman/Readme.md
Steam auto trader

Maximum Hax

Automates the UI actions (clicks, typing) to sell Steam trading cards from the Steam web interface. To use this:

  1. Log into your Steam account in Chrome
  2. Go to [Username] -> Inventory
  3. Open the Javascript console (View -> Developer -> Javascript Console)
  4. Paste in the entire script below and press enter
  5. To start selling all trading cards in your inventory, type doHax() in the console and press enter
  6. ...
@h3xxx
h3xxx / python3_https_server.py
Created December 8, 2022 12:16 — forked from stephenbradshaw/python3_https_server.py
Python 3 Simple HTTPS server
#!/usr/bin/env python3
# python3 update of https://gist.github.com/dergachev/7028596
# Create a basic certificate using openssl:
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes
# Or to set CN, SAN and/or create a cert signed by your own root CA: https://thegreycorner.com/pentesting_stuff/writeups/selfsignedcert.html
import http.server
import ssl
httpd = http.server.HTTPServer(('127.0.0.1', 443), http.server.SimpleHTTPRequestHandler)
@h3xxx
h3xxx / pdf-to-txt.sh
Created December 26, 2023 14:57 — forked from drmohundro/pdf-to-txt.sh
GhostScript PDF to text stdout
# requires ghostscript to be installed first - on mac, install with `brew install ghostscript`
# -sDEVICE=txtwrite - text writer
# -sOutputFile=- - use stdout instead of a file
# -q - quiet - prevent writing normal messages to output
# -dNOPAUSE - disable prompt and pause at end of each page
# -dBATCH - indicates batch operation so exits at end of processing
gs -sDEVICE=txtwrite -sOutputFile=- -q -dNOPAUSE -dBATCH to-be-processed.pdf
@h3xxx
h3xxx / kill-processes-for-gaming.bat
Created April 8, 2024 13:19
Windows batch file to kill all unnecessary background apps (fell free to updarte the list) to release memory before starting any game.
@echo off
setlocal
REM Declare a list of process names
set processes=Slack.exe EpicGamesLauncher.exe upc.exe Discord.exe Skype.exe Signal.exe jetbrains-toolbox.exe Battle.net.exe GalaxyClient.exe "Docker Desktop.exe" "Roland Cloud Manager.exe" "Creative Cloud UI Helper.exe"
REM Iterate over the list and stop each process
for %%p in (%processes%) do (
echo Stopping process: %%p
taskkill /IM %%p /F