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
@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
@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 / 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 / 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. ...
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 / postman-visualizer.txt
Created May 11, 2020 13:29
postman-visualizer.txt
BONUS: here's a test rule for POSTMAN that help you quickly copy/paste results (more info https://learning.postman.com/docs/postman/sending-api-requests/visualizer/):
var template = `
<table bgcolor="#FFFFFF">
<tr>
<td>Video</td>
<td>
{{#response.video}}
@h3xxx
h3xxx / response.json
Created March 6, 2020 13:54
example json response
{"ip":"127.0.0.1","country":"Poland","cc":"PL"}
@h3xxx
h3xxx / tizenrecover.java
Created June 25, 2019 11:23 — forked from rgngl/tizenrecover.java
Recovery utility for Tizen certificate passwords
// Small utility to recover forgotten Tizen certificate password.
// If you still have the Eclipse IDE remembering the password, you
// can find it in encrypted form in a file:
// <WORKSPACE>/.metadata/.plugins/org.tizen.common.sign/profiles.xml
// Then simply paste the password from that file to this utility as
// a command line parameter.
// Code is mostly copied from Tizen IDE source code.
package fi.ustun.tizendecipher;
@h3xxx
h3xxx / install_apps_wsl.sh
Last active March 27, 2019 10:57
apps to install on Ubuntu WSL
apt install mc nmap hping3 htop unzip
apt install nodejs npm
apt install git-flow
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update && sudo apt-get install yarn
apt install zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
@h3xxx
h3xxx / git-aliases
Created October 3, 2018 09:50
git-aliases.txt
https://stackoverflow.com/questions/1057564/pretty-git-branch-graphs
[alias]
lg1 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all
lg2 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all
lg3 = log --graph --abbrev-commit --decorate --format=format:'%C(yellow)%h%C(reset)%C(auto)%d%C(reset) %C(normal)%s%C(reset) %C(dim white)%an%C(reset) %C(dim blue)(%ar)%C (reset)' --all
lg4 = log --all --decorate --oneline --graph
lg = !"git lg1"