on-internet

How to compress an image to a target size in KB, right in the browser (no upload)

Last month I needed to shrink a photo to under 50 KB for an online form. Every tool I found wanted me to upload the picture to some server first. For an ID photo and a signature, I didn't love that. So I looked into doing it entirely in the browser. It turns out to be simpler than I expected, and it's a good example of how the canvas API can do real work. The idea JPEG quality is a number between 0 and 1, but file size doesn't scale in a straight line with it. You can't just calculate the right value. What works is a binary search: try a quality, check the size, then move up or down. The code

Bash redirection explained: >, >>, 2>, 2>&1 and | (and why the order matters)

AI disclosure: this article was created with the help of AI. An AI assistant drafted the text from the lesson script, and it was reviewed before publishing. Every command was actually run in a fresh debian:13 container (GNU bash 5.2.37); all outputs below are copied from that run, not written by hand. Why do errors still show up on your screen after "> file"? This video explains the two output streams, stdout and stderr, and shows live what >, >>, 2>, 2>/dev/null, 2>&1, &> and | do, why "2>&1 > file" doesn't work, how to save output and still see it with tee, and how noclobber protects files f

U-336S. Самый крутой dial-up-модем девяностых

Приветствую всех! За годы распространения модемной связи некоторое оборудование успело стать поистине легендарным. Именно об одном из таких девайсов мы сегодня и поговорим. В своё время этот модем стоил вдвое дороже USR Courier, и представлял собой, пожалуй, вершину развития таких устройств. Что же в нём такого интересного? Сегодня мы взглянем на профессиональный модем Zyxel U-336S. Узнаем, за что он назывался профессиональным, позвоним с него и посмотрим на всё это в работе. Как водится, будет много интересного. Press F1 to continue

Join the discussion →

Douane houdt acht bolletjesslikkers aan op Schiphol

Op Schiphol is gisteren een groep bolletjesslikkers opgepakt. Acht mensen hadden drugs in hun lijf, vermoedelijk cocaïne. De verdachten maakten deel uit van een groep van tien mensen die was geland uit de Surinaamse hoofdstad Paramaribo. Tijdens een controle sloeg een speurhond van de douane alarm. Daarop ging de douane over tot een inwendige check. De medewerkers stuitten op verdovende middelen bij acht van de tien reizigers. De verdachten zijn vastgezet door de Koninklijke Marechaussee. De controles waarbij de bolletjesslikkers gisteren tegen de lamp liepen, waren zogeheten 100-procentscontr

Liberty and Peace

I feel the raindrops on my marble skin, My colour which once glistened in the sun now fades away My eyes now covered in specks of dust… Continue reading on Medium »

Every QR code we let you download has been scanned first: how the check works

A QR code with your logo in the middle and rounded dots in your brand colours looks great. It also might not scan. Low contrast, a logo that's too big, a gradient that fades into the background: each of these can break a code, and you only find out when it's printed on 500 flyers. On QRStitch, the download button waits for a real decode of the exact image on your screen. This post shows how that works, what we check before the decode, and how the dynamic-code redirect behind it is built. Key takeaways Don't just estimate scannability. Render the final design and decode it with a real QR reader

Инцидентът в Марсилия: Какво се знае към момента

Броени часове след нападението над фенове на "Левски" в Марсилия към момента информациите са за 11 пострадали. В болница са откарани петима души. Според френските власти няма сериозно ранени. Все още не е ясно защо се стига до инцидента...

Úpice na Trutnovsku pokračuje v debatách o výstavbě větrníků. ČEZ představil projekt novým zastupitelům

Zástupci společnosti ČEZ představili ve čtvrtek odpoledne nedávno zvoleným zastupitelům města Úpice na Trutnovsku projekt na výstavbu větrných elektráren. O těch začalo minulé vedení města vyjednávat s polostátní společností už před třemi roky. Větrníky vysoké až 250 metrů by mohly stát v místní části Radeč, odpůrci jejich výstavby neuspěli v místním referendu.

A scanned PDF page can be three images: OCR on the background layer read 186 characters

A script that extracts "the image" from a scanned PDF and sends it to OCR assumes the page is one image. On one public-domain page in this test it was three, and the OCR result depended on which of the three got picked: 186 characters at a 93.62% character error rate for one, zero characters for another, 0.33% for the third. Rendering the whole page and recognizing that gave 0.26%. The numbers below come from a single run on one Apple-silicon Mac, on one page. What the page is made of The page is page 16 of the 1921 edition of Psycho-Analysis and the War Neuroses (Ferenczi, Abraham, Simmel, Jo

Focar de ploșnițe la un centru DGASPC din Odobești / Clădirea a fost evacuată pentru dezinsecție completă

Toţi beneficiarii Centrului de Îngrijire şi Asistenţă I Odobeşti au fost relocaţi temporar în alte servicii sociale, în urma constatării unei infestări cu ploşniţe de pat, clădirea fiind supusă unui tratament de dezinsecţie care va dura cel mult 25 de zile, a informat, vineri, Direcţia Generală de Asistenţă Socială şi Protecţia Copilului (DGASPC) Vrancea, relatează […] © G4Media.ro.

Ɗan shugaban Uganda ya yi iƙirarin ƙwace wani yanki na DRC

Gwamnatin Jamhuriyar Demokraɗiyyar Congo (DRC) ta gayyaci babban jami’in ofishin jakadancin Uganda, domin neman ƙarin bayani biyo bayan wasu kalamai masu zafi da Babban Hafsan Sojojin Uganda kuma ɗa ga shugaba Yoweri Museveni, Janar Muhoozi Kainerugaba, ya wallafa a shafinsa na X game da rikicin da ke faruwa a DRC, inda kalaman nasa ke nuna goyon bayan ƙungiyoyin ƴan tawaye.

Is Pakhtunkhwa stuck between a rock and a hard place?

Khyber Pakhtunkhwa has been simmering for months and the crisis has all the markers of a national one. It ticks most boxes: An emergency was declared; a provincial government was suspended. Governor’s rule was imposed. The army was deployed. Protests were managed. A constitutional court clipped the powers of a provincial court. A president withdrew protection against preventive detention for provincial lawmakers. A chief minister became a chief-minister-under-preventive-detention. A federal oversight committee was formed. A technocratic council replaced the provincial cabinet. The bureaucracy

From flat network to zero trust: an infrastructure security hardening case study

The question nobody could answer A prospective enterprise customer asked a simple due diligence question: if an attacker popped one of your containers, what else could they reach? Nobody on a 40-engineer team running a B2B scheduling platform (roughly 9,000 paying seats) could answer with confidence. No breach had happened. The uncertainty itself was the problem, and it's the same uncertainty a lot of growing platforms are sitting on without realizing it. This is a condensed breakdown of how we moved that infrastructure from a flat, perimeter-trust network to a zero trust model, in four shippa

Stream from OBS to a browser with WHIP on AWS

In a live auction or remote workshop, a few seconds of video delay can make an audience response arrive after the moment has passed. This walkthrough sends an OBS feed to Ant Media Server on Amazon EC2 and plays it back in a browser over WebRTC. A simple stopwatch test shows how much delay viewers actually see. WHIP, the WebRTC-HTTP Ingestion Protocol, handles the OBS-to-server connection. OBS sends a session offer over HTTPS, then sends the audio and video over WebRTC. The browser opens its own playback connection to the server. That gives you three places to check when a stream stalls: HTTPS

Count Aspect Ratio Changes and Calculate Drift Medians in Python

A staged photo has several properties worth recording separately. The aspect ratio flag tells you whether its frame kept the original width to height proportion. The alignment flag records whether the comparison succeeded. Architecture drift summarizes structural change, with lower scores indicating closer preservation of the room. For a listing, a different ratio prompts an inspection of the edges for cropping and of fixed features for stretching. The fields below come from the public StagingBench data, and you can summarize them with collections.Counter and statistics.median from the Python

How to set a default value for FastAPI's Header?

I have a simple localised GET endpoint: @router.get("/codes", description="Get a list of codes data matching a query and locale") def get_codes_data( query: str = Query(default="", description="Search query"), accept_language: str = Header(default="de") ) -> CodesResponse: I would expect `Accept-Language` to be equal to `de` if I did not set a value. However, when a value is not provided, the value of `accept_language` is as follows: en-GB,en-US;q=0.9,en;q=0.8 When a value is provided, everything works as expected. I found a few issues on fastAPI's GitHub Issues that makes me think this is eit

Join the discussion →

Кайсы тармак көбүрөөк каржыланат? Келерки жылдын бюджети талкууда

Кыргызстандын 2027-жылкы бюджети парламентте талкууланууда. Өкмөт билим берүү, саламаттык сактоо жана социалдык коргоого көбүрөөк каражат бөлүүнү сунуштады. Барскоон-Бедел жолуна 18 млрд сомго жакын акча каралган. Бюджет кантип бөлүндү жана кайсы тармактар утушта?

Doğum yardımı ödemeleri hesaplara yatırıldı

Aile ve Sosyal Hizmetler Bakanı Mahinur Özdemir Göktaş, Kasım ayı doğum yardımı ödemelerinin bugün itibarıyla annelerin hesaplarına yatırıldığını açıkladı.

Закат ATX, что в вирусном прогнозе о смерти классического ПК подтвердилось, а что нет

В конце ноября 2026 года в блогах overclockers.ru вышел пост с заголовком “Закат классического ПК: почему архитектура 1995 года доживает последнее десятилетие”. Тезис простой: модульный ATX-конструктор - отдельно процессор, отдельно память, отдельно видеокарта, отдельно блок питания - заканчивается к 2027-2028 году. На смену идут моноплаты Mini-ITX с распаянным чипом и единой памятью, похожие по философии на Apple M1, только под Windows и с нейросетями на борту. Читать далее

Join the discussion →
Older stories