Skip to content

Instantly share code, notes, and snippets.

View dark-faze's full-sized avatar
:octocat:
Ninja

Mohammed Akhlas Hussain dark-faze

:octocat:
Ninja
View GitHub Profile
from helpers.utils import execute_with_retry
from generators.llm import LLMClient
import importlib
llmClient = LLMClient()
def tail_words(text: str, max_words: int = 100) -> str:
words = text.split()
return " ".join(words[-max_words:]) if len(words) > max_words else text
import asyncio
import tempfile
import subprocess
from pathlib import Path
from dataclasses import dataclass
from typing import Optional, List
import aiohttp
import xml.etree.ElementTree as ET
from datetime import datetime, timedelta
@dark-faze
dark-faze / gist:869b02d61db2cece63da8a23bec6c827
Last active April 12, 2025 07:50
Setup a new sudo user and no password login after launching the server.
# Create user
sudo adduser cj
# Set password expiry
sudo passwd -e cj
# Add to sudo group
sudo usermod -aG sudo cj
# Configure sudo access