Skip to content

Instantly share code, notes, and snippets.

@dijikul
dijikul / merge_500.py
Last active March 19, 2025 01:28
Merge Multiple PDF's into PDF's under 500 MB each (JFK File Research)
import os
import PyPDF2
def get_pdf_size(pdf_writer):
"""Estimate the size of the PDF by writing it to a temporary file."""
import io
temp_stream = io.BytesIO()
pdf_writer.write(temp_stream)
return temp_stream.tell() / (1024 * 1024) # Convert bytes to MB
@dijikul
dijikul / combine.py
Last active March 19, 2025 00:20
Combine Multiple PDF's into One (JFK File Analysis)
import os
import PyPDF2
def merge_pdfs(input_directory, output_file):
# Create a PDF merger object
merger = PyPDF2.PdfMerger()
# Get a sorted list of all PDF files in the directory
pdf_files = sorted([f for f in os.listdir(input_directory) if f.lower().endswith('.pdf')])
@dijikul
dijikul / Mermaid.config
Created October 23, 2023 05:34
Branching Model Colours
{
"theme": "dark",
"themeVariables": {
"git0": "#aa00aa",
"git1": "#aa0000",
"git2": "#bb7700",
"git3": "#00aa00",
"git4": "#0055aa",
"git5": "#0077aa",
"git6": "#0088aa",
@dijikul
dijikul / Rail.svg
Created April 25, 2023 02:57
VCV Rack Rail.svg for Color Key in OBS
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dijikul
dijikul / KSP2 DSP-72
Created March 17, 2023 01:10
Kerbal Space Program 2 DSP-72
{
"Version": "0.1",
"Guid": {
"Guid": "00000000-0000-0000-0000-000000000000",
"DebugName": null
},
"OwnerPlayerGuidString": "",
"OwnerPlayerId": 0,
"AuthorityPlayerId": 0,
"AssemblyOABConfig": {
Quick Fix:
xinput set-prop 'TPK USA LLC Touch Fusion 4.' 'Coordinate Transformation Matrix' 0 -1 1 1 0 0 0 0 1
Full Fix via (https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=230554&p=1413454#p1413454):
install evdev and add the following to the ""evdev touchscreen catchall":
Option "SwapAxes" "true"
Option "InvertX" "true"
Option "InvertY" "false"
<dashboard>
<label>Lab 3 - Web Store Server Error v2</label>
<search id="baseSearch">
<query>| tstats summariesonly=t count from datamodel="bcg_ws_student9" by _time, host, sourcetype, bcg_ws_root_event.status, bcg_ws_root_event.action1, bcg_ws_root_event.product_name1, bcg_ws_root_event.price1 span=1s | rename bcg_ws_root_event.status as status, bcg_ws_root_event.action1 as action, bcg_ws_root_event.product_name1 as product_name, bcg_ws_root_event.price1 as price</query>
<earliest>-30d@d</earliest>
<latest>now</latest>
<sampleRatio>1</sampleRatio>
</search>
<row>
<panel>
-- use it as service of automator
on run {input, parameters}
do shell script "date +%Y-%m-%d\\ %H.%M.%S"
set the clipboard to input & " - " & result as text
tell application "System Events"
the path to the frontmost application
the name of the result
@dijikul
dijikul / SPACEPLAN.ahk
Created May 20, 2017 17:28
SPACEPLAN_clicker
#MaxHotkeysPerInterval, 999
$*space::
IfWinActive, SPACEPLAN
{
Loop
{
if not GetKeyState("space", "P")
break
Send {space}
}