Skip to content

Instantly share code, notes, and snippets.

View HosseyNJF's full-sized avatar
🤙

M. Hosseyn Najafi HosseyNJF

🤙
  • Bitpin
  • Istanbul, Turkey
  • 19:57 (UTC +03:00)
  • X @HosseyNJF
View GitHub Profile
@homogulosus
homogulosus / iwantthissitebutmarkdown.zsh
Last active March 16, 2025 07:10
Download and URL recursively and compiles html to markdown
#!/usr/bin/env zsh
# Version: 0.1
# Author: homogulosus
# Date: Mon Jul 13 13:19:32 EDT 2020
# Description: Downloads a URL recursively and recompiles html to markdown.
URL=$1
function down_with_site() {
@seddonym
seddonym / durability.py
Last active September 13, 2024 09:24
Durable decorator
import functools
from django.conf import settings
from django.db import transaction, utils
def durable(func):
"""
Decorator to ensure that a function is not being called within an atomic block.
@acastro2
acastro2 / example.go
Last active October 26, 2024 15:50
Kafka retries with Go
package main
import (
"context"
"crypto/tls"
"encoding/json"
"fmt"
"math/rand"
"time"
#! /usr/bin/env nix-shell
#! nix-shell -i python3 -p "python311.withPackages(p: with p; [ gitignore-parser ])"
import logging
import os
from glob import glob
from gitignore_parser import parse_gitignore
logging.basicConfig(level=logging.DEBUG)