Skip to content

Instantly share code, notes, and snippets.

View MonteLogic's full-sized avatar
♂️

Monte Logic MonteLogic

♂️
View GitHub Profile
>>> def run_my_curves_final_fix():
... from gi.repository import Gimp
... curve_points_255 = [ (0, 0), (200, 141), (255, 255) ]
... flat_curve_float = []
... for input_val, output_val in curve_points_255:
... flat_curve_float.append(input_val / 255.0)
... flat_curve_float.append(output_val / 255.0)
... channel = Gimp.HistogramChannel.VALUE
... images = Gimp.get_images()
... if images:
// scripts/mobile-web-dev.js
const { networkInterfaces } = require('os');
const { spawn } = require('child_process');
const net = require('net');
// --- 1. Find the local IP address ---
const nets = networkInterfaces();
let localIp = 'localhost';
{
"type": "excalidraw",
"version": 2,
"source": "https://excalidraw.com",
"elements": [
{
"id": "JCn5cWqDzLlde0SmCe_zR",
"type": "rectangle",
"x": 424.53379623062995,
"y": 66.38394918455538,
{
"type": "excalidraw",
"version": 2,
"source": "https://excalidraw.com",
"elements": [
{
"id": "JCn5cWqDzLlde0SmCe_zR",
"type": "rectangle",
"x": 424.53379623062995,
"y": 66.38394918455538,
@MonteLogic
MonteLogic / sleep-improvement-1.md
Last active December 20, 2024 18:46
[object Object]

Sleep Improvement Journal 1

Start: Fri Dec 20 2024 12:40:32 CST

Don't drink liquids 90 minutes before bed, ideally longer but 90 minutes is the cutoff.

The last thing you should do before going to bed is urinate.

Look at your Urine if its clear before you go to bed, you are very likely to wake up again.

@MonteLogic
MonteLogic / index.ts
Last active November 23, 2024 15:04
This file should check if there is a local db if not create one and inject the schema found in the db folder. Very incomplete file, this file is just a "blank canvas".
// tests/db-create/index.ts
import { createClient } from '@libsql/client';
import fs from 'fs/promises';
import path from 'path';
// Database configuration
const TEST_DB_PATH = path.join(process.cwd(), 'test.db');
const PROD_DB_PATH = path.join(process.cwd(), 'local.db');
export async function initializeTestDb() {
// tests/db-create/index.ts
import { createClient } from '@libsql/client';
import fs from 'fs/promises';
import path from 'path';
// Database configuration
const TEST_DB_PATH = path.join(process.cwd(), 'test.db');
const PROD_DB_PATH = path.join(process.cwd(), 'local.db');
export async function initializeTestDb() {
@MonteLogic
MonteLogic / label-my-room-1.md
Last active November 16, 2024 22:57
Labeling my room

A labeled area for, wraps, ankle wraps, knee wraps.

The wraps I have, they should have a hook on them for easy storage.

@MonteLogic
MonteLogic / testing-turso-nextjs-13.md
Last active November 19, 2024 01:11
Testing using SQLite(Turso) and Next.js 13+

" I'll create a comprehensive test suite for the employee page functionality using Vitest, SQLite with Turso, and MSW (Mock Service Worker) for mocking API calls to Clerk.

"

Still don't know how the Turso database storage and retrieval works.

@MonteLogic
MonteLogic / yiddish-dict-1.md
Last active November 8, 2024 16:39
Yiddish Dictionary - 1 [object Object]

Words:

פ

פינטעלעך: Little dots/ tidbits

Pronounced: Pintelech

Word used