Skip to content

Instantly share code, notes, and snippets.

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

Arvid Kahl arvidkahl

🏠
Working from home
View GitHub Profile
@arvidkahl
arvidkahl / Composition.md
Created July 29, 2025 19:55
Podscan.fm -> n8n -> Kit.com Newsletter Automation: OpenAI Prompts

Two-Step Daily Podcast Ideas Newsletter Generation Prompt

You are a skilled newsletter curator specializing in entrepreneurial content. Your task is to analyze extracted business ideas from multiple podcast episodes and create an engaging, actionable daily newsletter for entrepreneurs in the digital economy using a two-step process.

Input Data

You will receive an array of many podcast episode analyses, each containing:

  • Episode metadata (podcast name, episode title, host, reach score, etc.)
  • Extracted business ideas with scores and categorization
  • Implementation details and timestamps
@arvidkahl
arvidkahl / redis_investigation.py
Last active March 1, 2025 22:04
redis_investigation.py
import redis
from collections import defaultdict
import json
from datetime import datetime, timedelta
import random
import time
def analyze_redis_memory(host='localhost', port=6379, db=1, pattern='*', sample_size=1000):
"""
Analyzes Redis keys and sorts them by memory usage.
@arvidkahl
arvidkahl / CardStack.vue
Created February 3, 2024 14:24
Podscan's Card Stack
<template>
<div class="bg-white">
<div
@mouseenter="paused = true"
@mouseleave="paused = false"
@mouseover="paused = true"
@click="continueRotation()"
class="cardstack mt-24 xs:mt-28 sm:mt-24 mb-24 m-auto max-w-screen-sm grid grid-cols-1 grid-rows-1 select-none">
<article v-for="card in cards"
@arvidkahl
arvidkahl / cuda_11.7_installation_on_Ubuntu_22.04
Created January 27, 2024 18:23 — forked from primus852/cuda_11.7_installation_on_Ubuntu_22.04
Instructions for CUDA v11.7 and cuDNN 8.5 installation on Ubuntu 22.04 for PyTorch 1.12.1
#!/bin/bash
### steps ####
# verify the system has a cuda-capable gpu
# download and install the nvidia cuda toolkit and cudnn
# setup environmental variables
# verify the installation
###
### to verify your gpu is cuda enable check
@arvidkahl
arvidkahl / square.sh
Created January 9, 2023 20:20
Convert non-square videos into squares
#!/bin/bash
# Loop through all MP4 files in the current directory
for file in *.mp4
do
# Extract the file name without the .mp4 extension
filename=$(basename "$file" .mp4)
# Run the ffmpeg command for the current file
ffmpeg -i "$file" -filter_complex "scale=960:960:force_original_aspect_ratio=increase,crop=960:960" "${filename}_square.mp4"
@arvidkahl
arvidkahl / socials.css
Created June 22, 2022 16:44
ConvertKit Signup Form Social Icons integration
a[href^="https://socialscri.be/to/"] {
font-family: "Inter", Arial, Verdana, sans-serif;
text-rendering: geometricPrecision;
font-weight: bold;
background-color: white !important;
color: black !important;
font-size: 14px !important;
}
a[href="https://socialscri.be/to/the-bootstrapped-founder/with/twitter"] {
@arvidkahl
arvidkahl / index.php
Created May 31, 2022 16:48
Image Grid List
<doctype html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://cdn.tailwindcss.com"></script>
</head>
<body class="bg-black">
@arvidkahl
arvidkahl / README.md
Last active July 3, 2021 11:46
Twitter Giveaway bash+js script

This is a script picking winners for a contest where:

  • every winning entry has to mention one other twitter account in a reply
  • double winners are allowed

You'll need a few things installed:

  • jq
  • twarc
  • boxes
@arvidkahl
arvidkahl / puppeteer_demo.js
Created March 26, 2021 16:08
How to grab a high-res Tweet using Puppeteer
// using https://try-puppeteer.appspot.com/
const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.setViewport({width: 1500, height: 3000, deviceScaleFactor: 4});
await page.goto('https://twitter.com/arvidkahl/status/1375476092853743621?s=20');
await page.waitForNavigation({ waitUntil: 'networkidle2' })
console.log(await page.content());
await page.screenshot({path: 'screenshot.png'});
@arvidkahl
arvidkahl / titleize_APA.js
Created August 23, 2020 16:08
Zero to Published: Automator Workflow to correctly titleize with APA rules ("this is a good title" -> "This Is a Good Title")
const stopwords = 'a an and at but by for in nor of on or so the to up yet'
const defaults = stopwords.split(' ')
function titleCase1(str, options) {
const opts = options || {}
if (!str) return ''
const stop = opts.stopwords || defaults
const keep = opts.keepSpaces