Skip to content

Instantly share code, notes, and snippets.

View JasPanesar's full-sized avatar

Jas Panesar JasPanesar

View GitHub Profile
@adtac
adtac / README.md
Last active April 26, 2025 09:06
Using your Kindle as an e-ink monitor

3.5 fps, Paperwhite 3
@adtac_

step 1: jailbreak your Kindle

mobileread.com is your best resource here, follow the instructions from the LanguageBreak thread

I didn't really follow the LanguageBreak instructions because I didn't care about most of the features + I was curious to do it myself, but the LanguageBreak github repo was invaluable for debugging

@adtac
adtac / Dockerfile
Last active May 16, 2025 08:58
#!/usr/bin/env docker run
#!/usr/bin/env -S bash -c "docker run -p 8080:8080 -it --rm \$(docker build --progress plain -f \$0 . 2>&1 | tee /dev/stderr | grep -oP 'sha256:[0-9a-f]*')"
# syntax = docker/dockerfile:1.4.0
FROM node:20
WORKDIR /root
RUN npm install sqlite3
@DaniruKun
DaniruKun / whisper-transcribe.bash
Last active November 7, 2024 07:15
Transcribe (and translate) any VOD (e.g. from Youtube) using Whisper from OpenAI and embed subtitles!
#!/usr/bin/env bash
# Small shell script to more easily automatically download and transcribe live stream VODs.
# This uses YT-DLP, ffmpeg and the CPP version of Whisper: https://github.com/ggerganov/whisper.cpp
# Use `./transcribe-vod help` to print help info.
# MIT License
# Copyright (c) 2022 Daniils Petrovs
@bennadel
bennadel / CsvSerializer.cfc
Created October 1, 2022 12:52
Remediating CSV Injection Attacks In ColdFusion
component
output = false
hint = "I provide helper methods for SAFELY serializing Array data as CSV content."
{
// These are used internally, but can also be used externally as well in order to make
// the calling code more obvious (seeing names is easier than seeing ASCII numbers).
this.chars = {
COMMA: ",",
TAB: chr( 9 ),
@bennadel
bennadel / MyMultiStepForm.cfc
Created July 7, 2022 12:11
Building-Up A Complex Objects Using A Multi-Step Form Workflow In ColdFusion
component
extends = "PendingFormData"
output = false
hint = "I provide processing methods around a particular multi-step form."
{
/**
* I initialize the multi-step form helper with the given form scope.
*/
public void function init( required struct formScope ) {
@tatsuyasusukida
tatsuyasusukida / !README-javascript-media-video.md
Last active May 16, 2025 02:36
🎥 How to record a video with JavaScript [demo video available]

🎥 How to record a video with JavaScript [demo video available]

Demo video: How to record a video with JavaScript

About this article

This article describes how to shoot a video from JavaScript using the MediaStream Recording API. The related resources are shown below.

@aadimator
aadimator / process_logseq_timestamped.js
Created February 12, 2022 17:46
LogSeq Timestamp Process
const notice = (msg) => new Notice(msg, 5000);
const log = (msg) => console.log(msg);
module.exports = async function processLogseq(params) {
const {app, quickAddApi: {yesNoPrompt, inputPrompt, utility}} = params;
const shouldRemove = await yesNoPrompt("Should I remove timestamps?", `If you say no, I'll process them to be default youtube timestamp links. If you say yes, I'll simply remove them.`);
let text = await utility.getClipboard();
text = text.toString();
@waydabber
waydabber / ddcavcontrol.init.lua
Last active April 21, 2025 06:21
Hammerspoon script to control a Display via DDC (brighness, volume) and a Yamaha AV (network) using standard Mac keyboard with MacOS OSD
-- ddcavcontrol
-- v1.2.1
-- This Hammerspoon script is intended to do the following:
-- 1) Control External Display Brightness via DDC (utilizing a proper brightness+contrast curve)
-- 2) Control External Display Volume via DDC
-- 3) Control Digital AV Volume via Network (currently works with Yamaha AVs)
-- 4) Use the standard brightness and volume keys of an Apple keyboards
-- 5) Display the standard MacOS OSD as expected