Skip to content

Instantly share code, notes, and snippets.

View jh0ker's full-sized avatar
🚀
Hacking

Jannes Höke jh0ker

🚀
Hacking
View GitHub Profile
@jh0ker
jh0ker / _readme.md
Last active January 6, 2024 14:35
Max attributes and skills in SCUM game single player

README

This script manipulates the SCUM database for the single player mode to increase the level of all skills and attributes to max (or the value of your choice) for a given prisoner. This script does not work for multiplayer characters.

You can edit the configuration settings SET_ATTRIBUTES and SET_SKILLS at the start of the script below to change the target values for the skills and attributes. Default is maxed out.

Tested with SCUM Build 0.9.101.72873

How do I use it?

@jh0ker
jh0ker / telegram_example.py
Created April 9, 2021 00:07
Tokenize Tweets using entities provided by Twitter API
"""
The original reason I wrote this.
Also provides a more real-world example on how to use the result.
Uses python-telegram-bot for sending messages to Telegram.
"""
import html
from typing import List
@jh0ker
jh0ker / renew_certificates.py
Created December 18, 2016 07:18
Python 3.5 - Script to check letsencrypt certificates for all domains, renew them if required, concatenate them into bundles and restart haproxy
from os import listdir, system
from os.path import join
from subprocess import run, PIPE
import logging
import re
from datetime import datetime, timedelta
logging.basicConfig(format='%(asctime)s - %(levelname)s - %(message)s',
level=logging.INFO,
filename='/root/renew_certificates.log',
@jh0ker
jh0ker / mwt.py
Last active February 3, 2023 20:38
Memoize-with-timeout decorator
#!/usr/bin/env python
# Source: http://code.activestate.com/recipes/325905-memoize-decorator-with-timeout/#c1
import time
from functools import wraps
class MWT:
"""Memoize With Timeout"""
_caches = {}
_timeouts = {}

Keybase proof

I hereby claim:

  • I am jh0ker on github.
  • I am jhoeke (https://keybase.io/jhoeke) on keybase.
  • I have a public key whose fingerprint is 2ECD 60B2 9C78 0EB3 F0EC 0755 EEC1 0F19 5865 8BD6

To claim this, I am signing this object:

@jh0ker
jh0ker / Example.py
Last active August 29, 2015 14:21
A Simplifier for pygame events for use with the Arduino Pixel Videogame
from led.PixelEventHandler import *
[...]
# Event Loop
for pgevent in pygame.event.get():
event = process_event(pgevent)
if event.type == PUSH and event.player == PLAYER1:
# Movements
@jh0ker
jh0ker / How to use
Last active December 24, 2015 16:09
A more or less fast and easy way to create animated tile-based graphics using div-elements.
How to use:
- Import jQuery and Pixels.js
- Create the graphics:
logo = new Pixels();
logo.createNew(5,5); //5x5 tiles
logo.def_fg = '#04B404'; //Set foreground color. Default is #000
logo.def_bg = '#111'; //Set background color. Default is #333
logo.width = 30; //Set tile-width in px. Default is 10
logo.height = 30; //Set tile-height in px. Default is 10
logo.paddingx = 5; //Set space between tiles in px. Default is 2