Skip to content

Instantly share code, notes, and snippets.

View f9n's full-sized avatar
💭
I may be slow to respond.

Fatih Sarhan f9n

💭
I may be slow to respond.
View GitHub Profile
@f9n
f9n / redis_delete_keys_without_ttl.sh
Last active February 3, 2023 09:05 — forked from patrickhulce/findkeys.sh
Delete all keys without a TTL in Redis
#!/bin/sh
LIMIT=$1
redis-cli keys "*" | head -n $LIMIT > keys.txt
cat keys.txt | xargs -n 1 -L 1 redis-cli ttl > ttl.txt
paste -d " " keys.txt ttl.txt | grep .*-1$ | cut -d " " -f 1 | xargs redis-cli del
@f9n
f9n / windows10qemu.md
Last active November 12, 2022 09:41
Running Windows 10 in a UEFI enabled QEMU environment with KVM.
#!/usr/local/bin/python3.6
import requests
import feedparser
from urllib.parse import urljoin
from lxml import html
def findfeedWithLxml(site):
raw = requests.get(site).content
result = []
possibleFeeds = []