Soluții

Verificarea și monitorizarea spațiului disponibil pe volumele sistemului

Stația este lentă sau apar erori la instalarea aplicațiilor/Windows Update și este necesar să verificăm rapid spațiul disponibil.

Verificarea spațiului liber pe toate volumele locale folosind PowerShell.

Get-PSDrive -PSProvider FileSystem |
Select-Object Name,
@{Name="TotalGB";Expression={[math]::Round(($_.Used + $_.Free) / 1GB,2)}},
@{Name="FreeGB";Expression={[math]::Round($_.Free / 1GB,2)}}

Pentru identificarea volumelor cu mai puțin de 10 GB disponibili:

Get-PSDrive -PSProvider FileSystem |
Where-Object {$_.Free -lt 10GB} |
Select-Object Name,
@{Name="FreeGB";Expression={[math]::Round($_.Free / 1GB,2)}}

Administratorul poate identifica rapid stațiile/volumele care necesită curățare sau extindere.

[mai mult...]

Cum se instaleaza Firefox Nightly pe Debian 11, 12, 13?

Nightly este locul unde ajung primele schimbari Firefox, ceea ce il face util cand trebuie sa testati functii ale platformei web, comportamentul extensiilor sau compatibilitatea site-urilor inainte ca acele schimbari sa ajunga la Beta sau Firefox stable. Pentru a instala Firefox Nightly pe Debian cu actualizari normale prin package manager, folositi repository-ul APT oficial al Mozilla in loc de un tarball gestionat manual.

NOTA: Folositi canalul Nightly doar cand doriti specific build-uri zilnice de previzualizare. Repository-urile implicite Debian furnizeaza Firefox ESR. Metadatele APT curente ale Mozilla furnizeaza pachetul firefox-nightly pentru amd64 si arm64; sistemele 32-bit i386 trebuie sa foloseasca in schimb pachetul firefox-esr al Debian.

Actualizarea Debian si instalarea prerequisitelor
Reimprospatati metadatele APT inainte de a adauga o noua sursa de pachete:

sudo apt update

Instalati pachetele folosite pentru a descarca cheia de semnare Mozilla, a inspecta amprenta si a citi sursele APT HTTPS:

sudo apt install ca-certificates curl gpg -y

Adaugarea repository-ului APT Mozilla pentru Firefox Nightly
Creati directorul keyring, descarcati cheia de semnare Mozilla ca utilizator neprivilegiat, instalati-o in calea keyring APT, apoi eliminati copia locala temporara:

sudo install -d -m 0755 /etc/apt/keyrings
curl -fsSLo packages.mozilla.org.asc https://packages.mozilla.org/apt/repo-signing-key.gpg
sudo install -m 0644 packages.mozilla.org.asc /etc/apt/keyrings/packages.mozilla.org.asc
rm -f packages.mozilla.org.asc

Verificati amprenta cheii de semnare inainte de a avea incredere in repository:
gpg --quiet --show-keys --with-fingerprint /etc/apt/keyrings/packages.mozilla.org.asc

pub rsa2048 2021-05-04 [SC]

      35BA A0B3 3E9E B396 F59C  A838 C0BA 5CE6 DC63 15A3
uid                      Artifact Registry Repository Signer <artifact-registry-repository-signer@google.com>

Creati fisierul sursa Mozilla cu o garda de arhitectura. Daca comanda raporteaza o arhitectura nesuportata, opriti-va aici deoarece APT nu va avea un candidat firefox-nightly utilizabil pentru acel sistem:
bash

(
  arch="$(dpkg --print-architecture)"

  case "$arch" in
    amd64 | arm64)
      printf '%s\n' \
        'Types: deb' \
        'URIs: https://packages.mozilla.org/apt' \
        'Suites: mozilla' \
        'Components: main' \
        "Architectures: $arch" \
        'Signed-By: /etc/apt/keyrings/packages.mozilla.org.asc' | sudo tee /etc/apt/sources.list.d/mozilla.sources >/dev/null
      ;;
    *)
      printf 'Firefox Nightly from Mozilla APT currently supports amd64 and arm64, not %s.\n' "$arch" >&2
      exit 1
      ;;
  esac
)

Adaugati un pin APT constient de canal pentru repository-ul Mozilla. Primul stanza mentine Nightly si pachetele de limba Nightly preferate din Mozilla, in timp ce al doilea stanza mentine celelalte pachete Firefox Mozilla sub pachetele proprii Debian cu exceptia cazului in care instalati intentionat un alt canal:
printf '%s\n' \

  'Package: firefox-nightly*' \
  'Pin: origin packages.mozilla.org' \
  'Pin-Priority: 1000' \
  '' \
  'Package: firefox*' \
  'Pin: origin packages.mozilla.org' \
  'Pin-Priority: 100' | sudo tee /etc/apt/preferences.d/mozilla >/dev/null

Reimprospatati APT si confirmati ca firefox-nightly este vizibil din repository-ul Mozilla:
sudo apt update

apt-cache policy firefox-nightly | grep -m1 -F 'packages.mozilla.org'

500 https://packages.mozilla.org/apt mozilla/main amd64 Packages

[mai mult...]

Cum se instaleaza Dokku pe Debian 11, 12, 13?

Dokku transforma un singur server Debian intr-o platforma mica de aplicatii condusa de Git, dar calea de instalare conteaza deoarece Dokku detine Docker, rutarea Nginx, accesul SSH pentru deploy si datele aplicatiilor pe host. Pentru a instala Dokku pe Debian, folositi scriptul oficial de bootstrap pentru un server nou sau metoda manuala DEB822 APT doar cand Docker Engine, Buildx si Compose sunt deja gestionate separat.

Pachetele curente Dokku suporta Debian 13 (Trixie), Debian 12 (Bookworm) si Debian 11 (Bullseye) pe amd64 si arm64.

Confirmarea versiunii Debian, arhitecturii si hostname-ului
Verificati codename-ul Debian, arhitectura si hostname-ul complet calificat inainte de a adauga pachete. Scriptul de bootstrap Dokku necesita un hostname functional, iar sursa de pachete trebuie sa corespunda versiunii Debian:

. /etc/os-release
printf '%s %s\n' "$PRETTY_NAME" "$VERSION_CODENAME"
dpkg --print-architecture
hostname -f

Codename-urile Debian suportate sunt trixie, bookworm si bullseye. Arhitecturile suportate sunt amd64 si arm64.

NOTA: Daca hostname -f esueaza, setati un hostname corespunzator si o intrare /etc/hosts corespunzatoare inainte de a rula instalatorul.

Planificarea DNS, memoriei si accesului la retea
Dokku functioneaza cel mai bine cu cel putin 1 GB de memorie pentru build-urile bazate pe Docker. Un domeniu real sau o inregistrare DNS wildcard este de asemenea puternic recomandata deoarece Dokku foloseste numele aplicatiei si domeniul global pentru a genera rute precum app.example.com.

Cerinta Stare recomandata De ce conteaza
Versiune Debian Debian 13, 12 sau 11 Scriptul curent de pachete Dokku si sursa packagecloud suporta aceste versiuni
Arhitectura CPU amd64 sau arm64 Dokku publica indexe curente de pachete Debian pentru aceste arhitecturi
Memorie 1 GB sau mai mult Build-urile buildpack si imaginile Docker pot esua sau folosi swap intens pe servere mai mici
DNS Wildcard *.example.com sau un singur domeniu de aplicatie DNS wildcard permite fiecarei aplicatii sa primeasca un subdomeniu predictibil
Porturi SSH, HTTP si HTTPS accesibile dupa necesitate SSH primeste push-uri Git, iar HTTP si HTTPS servesc aplicatiile deployate

NOTA: Pentru un setup wildcard, pointati *.apps.example.com si apps.example.com catre serverul Debian. Pentru un host de laborator fara DNS, o adresa precum 203.0.113.10.sslip.io poate furniza testare in stil subdomeniu prin serviciul public sslip.io.

Alegerea metodei de instalare Dokku

Metoda Sursa sau canalul Comportament actualizari Potrivit pentru Compromisuri
Script oficial bootstrap Instalator Dokku plus repository packagecloud Dokku Actualizari Dokku gestionate APT dupa instalare Servere Debian noi si majority prime instalari Ruleaza un instalator root care bootstrappeaza de asemenea Docker si scrie propriile fisiere de sursa APT
Setup manual DEB822 APT Acelasi repository packagecloud Dokku cu un keyring cu scope Actualizari Dokku gestionate APT Gestiunea configuratiei, imagini golden si servere unde Docker este deja instalat
[mai mult...]

How to repurpose an old Kindle

There are plenty of things you can do with an old Kindle, from loading it with children’s books and giving it to your kids to trading it in for a newer model. You may be surprised by how much more you can do with an old Kindle. Here are five real projects that I’ve done with my jailbroken fourth-generation Kindle.

We tend to take Wikipedia for granted. You can find information on an incredible number of topics, all on a single website. The trouble is, you usually can’t check Wikipedia without an internet connection. How are you supposed to settle that debate when you’re camping off the grid?

A simple solution is to turn your old Kindle into a small Wikipedia library that will work completely offline. Kiwix is free, open-source software that makes websites and other references available offline. The content is available as compressed ZIM archives, and you can create your own bespoke Wikipedia library to upload to your Kindle and check whenever you want, even without a network connection.

When I order something online that I’m looking forward to receiving (such as a new tiny eReader), I will regularly check my phone to see when it’s due to arrive. Often, I’ll check multiple times before there are any updates. I decided to turn my old Kindle into a package tracker so that I could see updates without having to check them.

The project pulls information from the emails Amazon sends me when an order status changes. This information triggers an automation running on a Raspberry Pi that updates the image displayed on the Kindle’s screen. I can see my package’s current status with a glance at the Kindle.

A Kindle was never designed to show video, and while the slow refresh rate of the E-Ink screen means that it will never be practical for watching your latest Netflix obsession, it is possible to get a Kindle to show a very slow-refresh video feed. I set up an automation in Home Assistant that repeatedly takes snapshot images from my video doorbell. It then serves these to the Kindle, and my Kindle 4 can update the images about once a second, creating a very basic video stream. When my doorbell rings, the Kindle can display the feed. Even with the slow refresh rate, it’s more than good enough to see who is at the door so I don’t go answer unnecessarily.

Most projects on this list require a jailbroken Kindle, but this one works even on a standard Kindle. A stock Kindle can display photos that you upload, meaning you can use it as an E-Ink photo frame.

While a Kindle’s E-Ink display isn’t ideal for high-resolution, full-color images, black-and-white images can look surprisingly good on the screen, even on older models. The best part is that a Kindle uses hardly any power when displaying a static image, so the Kindle can potentially leave the image on the screen for weeks without needing to be plugged into power.

Jailbreaking does give you additional options. With a jailbroken Kindle, you can set up a folder of photos and have the Kindle automatically cycle through the images, just like a typical digital photo frame. A Kindle isn’t designed for writing. Even the Kindle Keyboard, with its built-in physical keyboard, is a nightmare to write on for any length of time. That doesn’t mean that your Kindle can’t be used as part of a distraction-free writing setup.

You can use something such as a Raspberry Pi to provide the computing power while the Kindle acts as an E-Ink terminal. By connecting a keyboard to the Pi, you can type away and see everything you write on the Kindle’s E-Ink screen. One benefit is that the display is far less susceptible to glare than a standard laptop screen, so it’s a good option for working outdoors in bright sunlight.

[mai mult...]

How to detect brute-force or failed logon attempts on Windows with event viewer and PowerShell

How to see who tried to sign in to the machine, from where, with which account, and how to tell a typo from an attack.

Prerequisites

  • Administrator rights (the Security log is restricted)
  • Logon auditing enabled. This is the default on Windows client versions, and you can confirm it with:
  auditpol /get /subcategory:"Logon"

Look for “Success and Failure”.

[mai mult...]