File Operations Find and Replace Text sed -i 's/old-text/new-text/g' filename Replace all occurrences of ‘old-text’ with ’new-text’ in a file Quick File Search find . -name "*.txt" -type f -mtime -7 Find all .txt files modified in the last 7 days Move files with rsync and ssh rsync -avz -e "ssh -p 22" <source_file_or_dir> user@<remote_host>:/<remote_dir>/ Rsync via ssh. Port 22 is default but is added as a reminder that you might need to change to something else. ...
LocalSend: A Practical Alternative to Cloud File Sharing
LocalSend is an open-source file transfer tool that operates on your local network. It’s the solution to the common problem: “I just want to send this file to my device over there.” It’s the best replacement for a “you wouldn’t have an empty usb stick somewhere, would you?” What Sets it Apart Works across all platforms (Windows, macOS, Linux, iOS, Android) No internet required No file size limits No accounts or setup No cloud storage costs Immediate transfers at network speed Real-World Use Cases Local Collaboration Share project files with teammates in the same office Transfer meeting recordings without uploading to cloud Exchange design assets between devices Media Management Move photos from phone to computer Transfer video files between editing devices Share music libraries locally Development Work Share builds with test devices Transfer datasets between machines Move VM images locally Home Network Share downloaded files between devices Back up phone photos to computer Move documents between family devices Why Choose LocalSend Over Cloud Storage Speed Transfers at local network speed (100MB/s+) No upload/download waiting time No internet bandwidth used Privacy Files never leave your network No third-party servers involved Complete control over your data Simplicity Select files → pick device → send No syncing issues No storage management No subscription Getting Started Download from your platform’s store or GitHub Install on your devices Ensure devices are on same WiFi Start sending files Technical Notes Uses HTTP protocol for transfers TLS encryption for security mDNS for device discovery Works on both IPv4 and IPv6 networks Common Questions Q: Is it really free? A: Yes, completely free and open source. ...
Quick comparison of AMD and Nvidia GPU's for LLM work
Quick comparison why Nvidia is preferred over its (only) competitor AMD for LLM work. Aspect NVIDIA GPUs AMD Radeon Pro Framework Support Extensive support via CUDA for PyTorch, TensorFlow, and most ML frameworks Limited support, fewer frameworks optimized for AMD ML Ecosystem Mature CUDA ecosystem with wide adoption Less developed ROCm ecosystem with limited compatibility Software Integration Well-established pipelines and tools More restricted options, may require additional setup Raw Computing Power Strong performance with direct ML optimization Good raw power but harder to leverage for ML tasks Memory Options Various models with sufficient VRAM (16GB+) Competitive VRAM options but harder to utilize for ML Primary Use Case Strong in both ML/AI and professional graphics Better suited for professional graphics work LLM Specific Support De facto standard for LLM deployment Limited practical application for LLMs Towards end of CY24: ...
Enterprise Security Landscaping
What To Do First Quadrant quadrantChart title Core Security Controls Maturity Assessment x-axis Low Implementation Complexity --> High Implementation Complexity y-axis Low Impact --> High Impact quadrant-1 Strategic Projects quadrant-2 Essential Foundation quadrant-3 Supporting Controls quadrant-4 Specialized Needs Basic IAM: [0.2, 0.8] SIEM/SOC: [0.9, 0.9] Email Security: [0.3, 0.9] Network Controls: [0.4, 0.6] XDR Platform: [0.8, 0.8] Zero Trust: [0.9, 0.7] Vulnerability Scanning: [0.3, 0.4] Asset Management: [0.2, 0.3] Security Awareness: [0.1, 0.6] GRC Platform: [0.7, 0.4] CASB: [0.6, 0.3] Threat Intel: [0.6, 0.2] Pen Testing: [0.9, 0.3] API Security: [0.5, 0.5] The quadrant is a visual aid to help assessing and prioritizing security risk mitigation activities. Below you will find a more exhaustive overview of what needs to be prioritized. Use that and other information from your own organization to build your own quadrant. ...
Mermaid.js text-to-rendering diagram examples
Mermaid.js allows you to create diagrams using text-based syntax. This post shows how to create various diagram types, from simple flowcharts to complex system architectures. Each example includes both the code and its rendered result. 1. Basic Flowchart Here’s the code: flowchart LR A[Start] --> B{Is it working?} B -->|Yes| C[Great!] B -->|No| D[Debug] D --> B Which renders as: flowchart LR A[Start] --> B{Is it working?} B -->|Yes| C[Great!] B -->|No| D[Debug] D --> B 2. Sequence Diagram The code: ...
Video to Text Rendering: A Simple AI Pipeline
Here’s a powerful one-liner that converts any video into a concise text summary using modern AI tools: #!/bin/sh yt-dlp -x --audio-format mp3 "$1" -o "audio.mp3" && \ whisper "audio.mp3" --model medium --output_format txt --output_dir . && \ cat audio.txt | ollama run mistral "Summarize the following text, removing any fluff and focusing on key points: ${cat}" > summary.txt && \ rm audio.mp3 audio.txt && cat summary.txt How It Works The pipeline combines three powerful tools: yt-dlp: A robust video downloader that handles YouTube, Vimeo, and many other platforms. It extracts just the audio track to minimize processing time. ...
Running Backup Scripts on Boot and Wake with systemd
If you’re running automated backups on a laptop, traditional schedulers like cron or fcron might not be ideal. Your machine isn’t always on, and you might want to trigger backups specifically when the system starts up or wakes from sleep. Here’s how to use systemd to run your backup script at these key moments. The systemd Service File Create /etc/systemd/system/backup.service: [Unit] Description=Run backup script at boot and wake-up After=multi-user.target suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.target [Service] Type=oneshot User=yourusername Group=yourgroup ExecStart=/path/to/backup-script.sh [Install] WantedBy=multi-user.target suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.target The User and Group directives ensure the script runs as your user instead of root. This is important for: ...
GPU Comparison Guide: Running LLMs on RTX 4070, 3090, and 4090
As more developers and enthusiasts venture into running Large Language Models (LLMs) locally, one question keeps coming up: Which GPU should you choose? In this post, we’ll compare three popular NVIDIA options: the RTX 4070, 3090, and 4090, breaking down the technical jargon into practical terms. Understanding the Key Terms Before diving into the comparison, let’s decode what these specifications mean in real-world usage: VRAM (Video RAM) Think of VRAM as your GPU’s short-term memory: ...
Getting Started with Ansible for Linux System Administration
Getting Started with Ansible for Linux System Administration System administration can be tedious and time-consuming, especially when managing multiple remote servers. Ansible provides a powerful solution for automating these tasks, making server management more efficient and less error-prone. Here’s how to set up Ansible and create your first playbooks for managing Linux servers. Key Concepts Ansible: An automation tool that uses YAML for defining configurations, making it human-readable and easy to manage. It operates over SSH, requiring no agents on remote systems. ...
Mosh: The Mobile Shell - Userland Remote Access with Tailscale
Mosh (Mobile Shell) is a userland remote terminal application that provides resilient connections surviving network changes and interruptions. Unlike traditional system daemons, Mosh runs entirely in userspace, providing natural security boundaries and simplified deployment. How Mosh Works Userland Architecture Mosh operates entirely in userspace, which is fundamentally different from traditional SSH: Initial Connection Uses existing SSH for authentication SSH launches mosh-server as your user (not root) Server picks available UDP port Communicates port and key back through SSH Local mosh-client establishes UDP connection Security Benefits ...