All the steps and code snippets from my tutorial series Set up an Ubuntu Web Server on an Intel NUC
Get an Ubuntu image for your NUC
apt update -y & apt upgrade -y| #### `toggle-vscode-extensions-macos.sh` | |
| # (onliner at the bottom) | |
| > "AI kan ha fel, precis som människor. Låt inte AI ta bort fransk touch med `sudo rm -rf /` utan sandlåda. Samma sak med oförsiktig vinst-maximering." | |
| Ett interaktivt Zsh/Bash-script för macOS som säkert slår av eller på alla VS Code-plugins. | |
| Detta simulerar exakt samma process som att manuellt klicka "Disable" eller "Enable" i VS Code's UI genom att använda den officiella `extensions.json`-manifestfilen. | |
| **Användning:** Klistra in hela scriptet i din terminal och kör, eller spara som en fil (t.ex. `vsc-toggle.sh`) och kör den. | |
| --- |
| config = { //SAMPLE OBJECT - replace this with your data object | |
| stroke: 2, //svg stroke value | |
| opacity: 0.3, //0-1 | |
| offsetX: 120, //px | |
| offsetY: 80, | |
| fontWeight: 400, //css font-weight | |
| fontSize: 12, //in px | |
| changePositive: '\u25B4', //unicode character for up arrow | |
| changeNegative: '\u25BE', //unicode character for down arrow | |
| colorBlue: '#1190A3', //all hex colors will automatically use the addColor dat gui function |
| #!/usr/bin/env python3 | |
| import subprocess, sys, shutil, argparse | |
| """ | |
| 📡 host_access_diag_with_ip_tor_etc.py | |
| A Python script for diagnosing host/IP access issues (DNS, TCP, HTTP/S), with optional Tor check via Docker. | |
| 🧰 Features: | |
| - Tests DNS resolution (local & Google) |
| #!/bin/bash | |
| # bash_local_test_network.sh | |
| # | |
| # Purpose: | |
| # Testing utility for local network file transfers in sandbox environments. | |
| # STRICTLY FOR TESTING AND LEARNING - NOT FOR ACTUAL USE. | |
| # | |
| # Features: | |
| # - Network validation | |
| # - Automated setup |
| === Backstory === | |
| So, while my normal home network was down, I found an old D-Link DIR-809 router lying around. I figured it could be useful to extend my iPhone's hotspot and connect multiple devices at home. After some tinkering, I managed to set it up in repeater mode, and it worked like a charm! Here's how I did it, in case you ever find yourself in a similar situation. | |
| === Guide: iPhone Hotspot to D-Link DIR-809 WiFi Router (Repeater Mode) === | |
| 1. **Initial Setup** | |
| - Factory Reset: Start by resetting the router to clear any old settings. This ensures a clean slate for configuration. | |
| - Use a clean browser (no cached data) to avoid issues during setup. | |
| - Default Login: | |
| - Username: admin |
| import subprocess | |
| import os | |
| import re | |
| # Fast draft by Kilian Lindberg | |
| # Purpose: Accessibility, ease transcript processing for AI in case of limited visual video interaction limitation | |
| # Disclaimer: Code as is, no claims but an inspirational aspiration | |
| # Install yt-dlp using pip | |
| subprocess.run(['pip', 'install', 'yt-dlp']) |
Get an Ubuntu image for your NUC
apt update -y & apt upgrade -y| #!/usr/bin/env python3 | |
| import os | |
| import time | |
| from collections import deque | |
| # Check if required libraries are installed. If not, install them. | |
| libraries = { | |
| "psutil": "psutil", | |
| "curses": "windows-curses" if os.name == "nt" else "curses" | |
| } |
| import os | |
| def search_keyword_in_file(file_path, keyword): | |
| findings = [] | |
| with open(file_path, 'r', errors='ignore') as file: | |
| lines = file.readlines() | |
| for idx, line in enumerate(lines, start=1): | |
| if keyword.lower() in line.lower(): | |
| findings.append((idx, line.strip())) | |
| return findings |
Floating point texture test...
A Pen by Kilian K Lindberg on CodePen.