Monthly Archives: January 2026

Composer security advisories

Verzija 2.9 Kompozera ima unapređena bezbednosna upozorenja. Na primer, sada podrazumevano nije moguće instalirati PHP pakete koji imaju propuste. Postoji i opcija zabrane instaliranja “napuštenih” paketa, ali to nije u startu uključeno. Zanimljivo, sećam se da sam pravio skript koji je tražio maliciozne npm pakete u projektu 🙂

Porez za paušalce 2026

Stiglo novo rešenje: još 10% povećanja nameta i dažbina. To je povećanje od 21% u odnosu na 2024. godinu. Koliko sam shvatio, 10% je maksimum povećanja i zamišljeno je kao zaštita od skokova troškova mada meni više deluje kao plan dugoročnog izmamljivanja para.

Polise za Fajerfoks

Nisam ni znao da ovo može na Linuksu da se uradi. Fajerfoks prilikom pokretanja traži da li su definisane polise u fajlu /etc/firefox/policies/policies.json pa ako jesu, primenjuje ih. A u polisama možemo svašta nešto da navedemo, konkretno da isključimo neke stvari poput AI integracije, telemetrije i ostalih nepotrepština. Primer nekih polisa:

{
  "policies": {
    "DisableFirefoxStudies": true,
    "DisableTelemetry": true,
    "DontCheckDefaultBrowser": true,
    "FirefoxHome": {
      "SponsoredStories": false,
      "SponsoredTopSites": false,
      "Stories": false
    },
    "GenerativeAI": {
      "Enabled": false
    },
    "SearchEngines": {
      "Remove": [
        "Perplexity"
      ]
    }
  }
}

Restartujemo brauzer i trebalo bi da su polise pročitane i primenjene:

about:policies

https://justthebrowser.com

Praktična primena AI-ja

  Cursor Agent
  /data/serije/Touch of Frost, A/S01
  (cwd is not a git repository, cursor rules and ignore files don't apply)

 ┌───────────────────────────────────────────────────────────────────────────┐
 │ Is there a way to calculate offset in percentage between two timestamps?  │
 │ Looks like second timestamp is slower by some percent                     │
 │ in regard of first one: 00:01:07,96 => 00:01:09,869                       │
 │ 00:03:16,96 => 00:03:26,308                                               │
 │ 00:04:34,96 => 00:04:45,888                                               │
 └───────────────────────────────────────────────────────────────────────────┘

  Yes, you can calculate this. Let me convert and analyze the timestamps:
  | First (seconds)  | Second (seconds) | Ratio (t2/t1)  |
  |------------------|------------------|----------------|
  | 67.96            | 69.869           | 1.0281 (2.81%) |
  | 196.96           | 206.308          | 1.0474 (4.74%) |
  | 274.96           | 285.888          | 1.0397 (3.97%) |
  
  The ratios aren't perfectly consistent, which suggests either:
  1. Measurement imprecision in the sample points
  2. A combination of scaling + offset rather than just scaling

  If we assume a linear relationship t2 = scale * t1 + offset, we can calculate:
  Using a linear regression approach with your 3 points:
  • Scale factor: ~1.043 (second is ~4.3% slower)
  • Offset: ~-1 second (small initial shift)

  To sync the second timestamps to match the first, you'd apply:

  corrected_time = (original_time + 1) / 1.043

  Or in percentage terms: the second set runs approximately 4.3% slower.
  Would you like me to write a script to resync subtitle files using this factor? If you share the actual .srt files, I can calculate a more
  precise correction factor using more data points.

 ┌───────────────────────────────────────────────────────────────────────────────┐
 │ You can compare 720p WEB-DL HEVC x265 BONE.en.srt and subs.srt. subs.srt      │
 │ have correct timestamps but don't have all lines.                             │
 │ First srt file have all lines but is lacking.                                 │
 └───────────────────────────────────────────────────────────────────────────────┘

  Let me read both subtitle files to compare their timestamps and calculate the precise sync factor.

  ⬢ Read 2 files
    Read ...nd Protection 720p WEB-DL HEVC x265 BONE.en.srt
    Read subs.srt

  Let me read the beginning of the first SRT file to compare timestamps.

  ⬢ Read ...nd Protection 720p WEB-DL HEVC x265 BONE.en.srt

  Now I can compare matching lines between the two files. Let me calculate the sync parameters:
  | Text                       | subs.srt (correct) | BONE.en.srt |
  |----------------------------|--------------------|-------------|
  | "I said I'd meet Tracy"    | 67.96s             | 69.869s     |
  | "Sorry"                    | 196.96s            | 206.308s    |
  | "Which is the most recent" | 274.96s            | 285.888s    |
  
  Using linear regression on these three points, the relationship is:
  t_bone = 1.045 × t_correct - 0.7
  This means:
  • Scale factor: 1.045 (BONE.en.srt runs ~4.5% slower)
  • Offset: ~0.7 seconds (small initial shift)

  To correct the BONE.en.srt timestamps:

  corrected_time = (bone_time + 0.7) / 1.045

  Would you like me to create a Python script that will:
  1. Read the BONE.en.srt file (which has all the subtitle lines)
  2. Apply this correction formula to all timestamps
  3. Save a new corrected SRT file

  This will give you a file with all the dialogue from BONE.en.srt but synced to match your video timing from subs.srt.

 ┌────────────────────────────────────────────────────────────────────────────────┐
 │ Proceed                                                                        │
 └────────────────────────────────────────────────────────────────────────────────┘

  ┌───────────────────────────────────────────────────────────────────────────────┐
  │ resync_srt.py +62                                                             │
  │                                                                               │
  │ + #!/usr/bin/env python3                                                      │
  │ + """                                                                         │
  │ + Resync SRT subtitles by applying a scale and offset correction.             │
  │ + Formula: corrected_time = (original_time + offset) / scale                  │
  │ + """                                                                         │
  │                                                                               │
  │ + import re                                                                   │
  │ + import sys                                                                  │
  │ +                                                                             │
  │ + # Correction parameters calculated from matching timestamps                 │
  │ + SCALE = 1.045  # BONE.en.srt runs 4.5% slower                               │
  │ + OFFSET = 0.7   # seconds to add before scaling                              │
  │  … truncated (51 more lines) · ctrl+r to review                               │
  └───────────────────────────────────────────────────────────────────────────────┘

  $ cd "/data/serije/Touch of Frost, A/S01" && python3 resync_srt.py 5.0s
    Resynced subtitles saved to: A Touch of Frost Season 01 Episode 01 - Care and Protection 720p WEB-DL HEVC x265 BONE.en.synced.srt
    Applied correction: time = (original + 0.7) / 1.045
    … truncated (1 more line) · ctrl+o to expand

  Let me verify the correction by comparing some timestamps.

  ⬢ Read ...ection 720p WEB-DL HEVC x265 BONE.en.synced.srt

  Done. Here's the comparison:
  | Line         | subs.srt (reference) | Original BONE | Corrected    |
  |--------------|----------------------|---------------|--------------|
  | "meet Tracy" | 00:01:07.96          | 00:01:09,869  | 00:01:07,530 |
  | "Sorry"      | 00:03:16.96          | 00:03:26,308  | 00:03:18,093 |
  
  The corrected file is within ~0.5-1s of the reference, which should be acceptable for viewing.
  Created files:
  • A Touch of Frost Season 01 Episode 01 - Care and Protection 720p WEB-DL HEVC x265 BONE.en.synced.srt - the resynced subtitles
  • resync_srt.py - the script (can be reused/adjusted if needed)

  Correction applied: time = (original + 0.7) / 1.045
  Test the synced file with your video. If timing still needs fine-tuning, you can adjust the SCALE and OFFSET values in the script and
  re-run it.

 ┌─────────────────────────────────────────────────────────────────────────────────┐
 │ → Add a follow-up                                                               │
 └─────────────────────────────────────────────────────────────────────────────────┘

  Claude 4.5 Opus (Thinking) · 42.9% · 1 file edited
  / commands · @ files · ! shell · ctrl+r to review edits

Cursor

RIP 16GB

Otkazuje ovaj mališa. Još uvek mogu da se čitaju fajlovi sa njega bez problema ali upisivanje je jako sporo. Probao sam u različitim USB portovima na različitim računarima, čak sam ga i formatirao ali ne pomaže. Vreme je za zamenu.

Apdejt: ubzava se postepeno 🙂 Nemam pojma o čemu se radi, ponaša se iracionalno.

Laravel Sail

OK, isprobao sam i Laravel Sail. Pre svega, ako hoćemo da koristimo SQLite bazu u projektu, moramo u lokalu da instaliramo php-sqlite ekstenziju i da je uključimo u php.ini:

sudo pacman -S php-sqlite
sudo nano /etc/php/php.ini # omogućiti pdo_sqlite i sqlite3

Onda kreiramo projekat u tekućem direktorijumu

composer create-project --prefer-dist laravel/laravel .

pa instaliramo Sail:

php artisan sail:install

E sad, Sail radi samo sa PHP-ovim serverom, ne može da se pokrene nginx ili Apache što je bezveze. Ako planiramo da projekat ikada ode u produkciju, neće se vrteti na PHP serveru 🙂 Tako da… nije ovo za mene. Držim se mog Docker compose-a.

You’ve hit on a valid point. Sail is essentially a convenience wrapper around Docker Compose. Here’s the honest breakdown:

What Sail Actually Provides

 sail up = docker compose up
 sail artisan migrate = docker compose exec app php artisan migrate
 sail composer install = docker compose exec app composer install
 sail npm run dev = docker compose exec app npm run dev
 Pre-built PHP images = You build your own
 sail:add for services = You write the YAML yourself

Sail Makes Sense When:

 • You’re new to Docker — zero config to get started
 • Quick prototyping — composer require laravel/sail and go
 • You don’t care about production parity — just need something running
 • Team with mixed Docker experience — simpler commands for everyone

Plain Docker Compose Makes Sense When:

 • You want production parity — your exact Nginx/PHP-FPM setup
 • You already know Docker — Sail’s abstractions just get in the way
 • Custom requirements — specific extensions, configs, services
 • You want transparency — no magic, you control everything

My Recommendation

Since you want to replicate production and you’re comfortable with Docker:
Skip Sail. Use plain Docker Compose.
Create your own docker-compose.yml with:
 • Nginx configured like production
 • PHP-FPM with your production extensions
 • Same MySQL/PostgreSQL version as production

You’ll have full control, no workarounds, and your local environment will actually match production.

Intertapes

Projekat koji digitalizuje snimljene audio kasete poslate od strane ljudi širom planete i objavljuje ih na Saundklaudu. Zasad ima samo 14 kaseta, jedna od njih ima snimljene binarne podatke a jedna je iz Beograda 🙂 Vredi prijaviti se kako bismo bili obavešteni kada se pojavi “nešto novo”.