Skip to content

Instantly share code, notes, and snippets.

View jh0ker's full-sized avatar
🚀
Hacking

Jannes Höke jh0ker

🚀
Hacking
View GitHub Profile
@cbmeeks
cbmeeks / custom.js
Created November 30, 2023 01:35
Simple Combo / Select Box
const autocomplete = (inputId, listId, dimensionCode) => {
const input = document.getElementById(inputId)
const list = document.getElementById(listId)
if (!input || !list) return false
list.innerHTML = ''
let items = []
let current = -1
const bg_default = 'bg-white'
const bg_select = 'bg-blue-500'
@spajus
spajus / WreckedEmptyShipScenario.cs
Created October 13, 2022 08:14
Stardeus scenario example code
using System.Collections;
using Game.Audio;
using Game.Constants;
using Game.Data;
using Game.Procgen;
using Game.Story.Events;
using Game.Systems.Goals;
using Game.Utils;
using KL.Randomness;
using KL.Utils;
from typing import Any, Dict, List, Mapping, Union
# Values for JSON that aren't nested
JSON_v = Union[str, int, float, bool, None]
# If MyPy ever permits recursive definitions, just uncomment this:
# JSON = Union[List['JSON'], Mapping[str, 'JSON'], JSON_v]
# Until then, here's a multi-layer way to represent any (reasonable) JSON we
# might send or receive. It terminates at JSON_4, so the maximum depth of
@benigumocom
benigumocom / debug_from_qr.py
Last active October 28, 2024 02:31
Connect Wireless Debug from Terminal on Android11
#!/usr/bin/env python3
"""
Android11
Pair and connect devices for wireless debug on terminal
python-zeroconf: A pure python implementation of multicast DNS service discovery
https://github.com/jstasiak/python-zeroconf
"""
@adrianlzt
adrianlzt / sharescreen
Last active January 7, 2022 07:14
Scripts to share only a portion of the screen
#!/bin/bash
# Modified version of https://github.com/Ashark/hliss/blob/master/vlc-hangouts
# Script to share a portion of the screen in VLC to be used by Chrome/Firefox to share the screen
# By default, when run, it asks to click in some window. The area of that window is what is going to be shared.
# If executed with "sharescreen area", it asks for a portion of the screen to be shared.
unset x y w h
# Old code to choose a monitor
@quonic
quonic / scum_sqlite.ps1
Last active September 3, 2022 22:16
For the game SCUM. This sets stats too 5 and skills to 4 for specified character.
#Requires -Module PSSQLite
param(
[Alias('Name', '')]
[string]
$ProfileName
)
<#
Updated for 9/2 patch
Updated by request of Truth91
#>
@junian
junian / twitch-recorder.py
Last active October 14, 2024 06:01
Record Twitch Streams Automatically in Python
# This code is based on tutorial by slicktechies modified as needed to use oauth token from Twitch.
# You can read more details at: https://www.junian.net/2017/01/how-to-record-twitch-streams.html
# original code is from https://slicktechies.com/how-to-watchrecord-twitch-streams-using-livestreamer/
import requests
import os
import time
import json
import sys
import subprocess
@nigma
nigma / serve.py
Created December 20, 2012 22:44
Serving Django with CherryPy
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import webbrowser
from threading import Timer
os.environ["DJANGO_SETTINGS_MODULE"] = "webapp.settings"
import cherrypy