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 / 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 / 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 / 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 / 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 / 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 / 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.