Skip to content

Instantly share code, notes, and snippets.

View kenotron's full-sized avatar
🐽

Ken Chau kenotron

🐽
View GitHub Profile
@kenotron
kenotron / playwright.config.js
Last active October 18, 2023 03:17
Playwright Github Workflow
import { defineConfig, devices } from "@playwright/test";
import { generateTestDatabaseUrl } from "~/db/generate-test-url";
import 'dotenv/config';
/**
* Read environment variables from file.
* https://github.com/motdotla/dotenv
*/
// require('dotenv').config();
@kenotron
kenotron / duplex.sh
Last active March 9, 2025 07:52
ghostscript to deal with 3 hole punch margins
#!/bin/sh
gs \
-o output_duplex_ch6.pdf \
-dFirstPage=643 \
-dLastPage=726 \
-sDEVICE=pdfwrite \
-dBATCH \
-dNOPAUSE \
-dDEVICEWIDTHPOINTS=612 \
-dDEVICEHEIGHTPOINTS=792 \
@kenotron
kenotron / download_comfyui_assets.py
Created May 12, 2025 16:51
Download IPAdapter for a fun side project of producing profession looking headshot photo of myself using ComfyUI
'''
This script downloads ComfyUI assets, including the IPAdapter_plus custom node and various models.
It assumes you are running on Windows and places the files in a "comfyui" folder
within your user's Documents directory.
'''
import os
import subprocess
import requests
from tqdm import tqdm # For progress bar, ensure it's installed: pip install tqdm