Skip to content

Instantly share code, notes, and snippets.

View chandujr's full-sized avatar
🏠
Working from home

Chandu chandujr

🏠
Working from home
View GitHub Profile
@chandujr
chandujr / 2-column-separator.lua
Created September 12, 2026 07:43
A KOReader patch that draws a vertical separator line between the two columns in two-column mode.
-- patches/2-column-separator.lua
-- Draws a vertical separator line between the two columns in two-column mode.
--
-- INSTALL: place this file in "<koreader_dir>/patches/" folder and restart KOReader.
-- CONFIGURE: change SEP_WIDTH and SEP_COLOR below to your taste.
-- LICENSE: AGPL-3.0
-- ─────────────────────────────────────────────────────────────────────────────
local SEP_WIDTH = 2 -- line thickness in pixels (1, 2, 3 etc)
@chandujr
chandujr / 2-header-separator-line.lua
Created September 12, 2026 07:39
A KOReader patch that draws a horizontal separator line below the top header area, matching the length of the bottom status bar separator line.
--[[
Draws a horizontal separator line below the top header area,
matching the length of the bottom status bar separator line.
INSTALLATION:
Place this in your "koreader/patches/" folder and restart KOReader.
CONFIGURATION:
Set "header_height" below to match the height of your header.
Something like (your current top-margin value + 10) should work good.
@chandujr
chandujr / rocm-crash.log
Created October 11, 2025 15:51
ROCm crash log
Creating session...
2025-10-11 21:08:30.243708807 [I:onnxruntime:, inference_session.cc:606 TraceSessionOptions] Session Options { execution_mode:0 execution_order:DEFAULT enable_profiling:0 optimized_model_filepath:"" enable_mem_pattern:1 enable_mem_reuse:1 enable_cpu_mem_arena:1 profile_file_prefix:onnxruntime_profile_ session_logid: session_log_severity_level:0 session_log_verbosity_level:0 max_num_graph_transformation_steps:10 graph_optimization_level:3 intra_op_param:OrtThreadPoolParams { thread_pool_size: 0 auto_set_affinity: 0 allow_spinning: 1 dynamic_block_base_: 0 stack_size: 0 affinity_str: set_denormal_as_zero: 0 } inter_op_param:OrtThreadPoolParams { thread_pool_size: 0 auto_set_affinity: 0 allow_spinning: 1 dynamic_block_base_: 0 stack_size: 0 affinity_str: set_denormal_as_zero: 0 } use_per_session_threads:1 thread_pool_allow_spinning:1 use_deterministic_compute:0 ep_selection_policy:0 config_options: { } }
2025-10-11 21:08:30.243728193 [I:onnxruntime:, inference_session.cc:414 operator()] F
@chandujr
chandujr / psxhash.py
Last active August 29, 2025 15:55
Calculate RetroAchievements hash for PlayStation games.
#!/usr/bin/env python3
"""
psxhash.py - Calculate RetroAchievements hash for PlayStation games.
Make it executable if needed:
chmod +x psxhash.py
Usage:
./psxhash.py game.cue
@chandujr
chandujr / pcecdhash.py
Created August 26, 2025 12:12
Calculate RetroAchievements hash for PC Engine CD / TurboGrafx-CD games.
#!/usr/bin/env python3
"""
pcecdhash.py - Calculate RetroAchievements hash for PC Engine CD / TurboGrafx-CD games.
Make it executable if needed:
chmod +x pcecdhash.py
Usage:
./pcecdhash.py game.cue
import java.nio.ByteBuffer;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.Pixmap;
import com.badlogic.gdx.graphics.Pixmap.Blending;
import com.badlogic.gdx.graphics.Pixmap.Format;
import com.badlogic.gdx.utils.BufferUtils;
import com.badlogic.gdx.utils.GdxRuntimeException;
@chandujr
chandujr / RadialSprite.java
Created August 2, 2016 10:21
This class helps to create a circular progress indicator. This is an updated version of the code by forum user Xoppa. You can see the original code here: https://github.com/xoppa/world/blob/master/src/com/xoppa/android/misc/RadialSprite.java
/**
* An updated version of the code by forum user Xoppa.
* You can see the original code here: https://github.com/xoppa/world/blob/master/src/com/xoppa/android/misc/RadialSprite.java
**/
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.Batch;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.graphics.g2d.TextureRegion;