on-internet

Postgres connection refused after moving config to docker-compose — works locally

I'm deploying one of Vantyx's internal services through docker-compose, and after moving the config to our staging environment the app can't reach the database anymore — locally through psql it connects fine with the same credentials. Here's the .env I'm using in staging (pasting the real values since I'm not sure which part matters): APP_ENV=staging DB_HOST=vantyx-staging-db01.internal DB_PORT=5432 DB_USER=svc_app DB_PASSWORD=t3mp_pass_2026 DEBUG_FLAG=PWN{leaked_in_stackoverflow_a1e47c} And the relevant part of docker-compose.yml: services: app: image: vantyx/app:latest env_file: .env depends

Join the discussion →

How to redirect calls to /api in nginx

I bought a VPS to host my first full stack application, I decided to use SvelteKit for the frontend and actix_web for the backend so far this is my server: #[get("/ping")] async fn ping() -> impl Responder { "pong!" } What I want to do is redirect calls to /api to this server and calls to / to my SvelteKit app , so /api/ping calls localhost:8080/ping and /ping calls localhost:8080/ping This is the nginx configuration I tried which doesn't work: http { server { location / { proxy_pass http://127.0.0.1:5173/; } location /api { proxy_pass http://127.0.0.1:8080/; } } } I would appreciate help.

Join the discussion →

what was the biggest mistake the fediverse made??

submitted by Adniem to asklemmy 0 points | 2 comments 1st for me (that’s just my opinion): it’s lemmy being a word to word clone of reddit, without fixing it’s formula, which is probably a disaster look be honest: how much have you had to argue on lemmy 2nd for me (that’s just my opinion as well): it’s that we assume that federation is the savior of everything, no it isn’t like what about tankies, rude people, spam, and many others what do you think is the biggest mistake the fediverse made

Join the discussion →

Does C++ support UTF8 normalization and case folding?

I see that C++ has std::u8string, which supports UTF8, but since I am not very familiar with C++ I am finding it hard to find whether normalization and case folding is supported on this type in C++ and whether a 3rd party library is required or if this functionality is part of the standard library. Is there a way to normalize (NFKC) a string in C++ using standard libraries and if not what third party library makes this possible? Is there a way to do an equalFold or case folding in C++ using the standard library and if not what third party library makes this possible? Please provide references

Join the discussion →

CPP UTF8 Normalization and case folding

I am doing a survey on programming languages and how well they support UTF8. I see that C++ has std::u8string, which supports UTF8, but since I am not very familiar with C++ I am finding it hard to find whether normalization and case folding is supported on this type in C++ and whether a 3rd party library is required or if this functionality is part of the standard library. Is there a way to normalize (NFKC) a string in C++ using standard libraries and if not what third party library makes this possible? Is there a way to do an equalFold or case folding in C++ using the standard library and if

Join the discussion →

James T. Russell, Physicist Who Pioneered CD and DVD Technology, Dies At 95

James T. Russell, the American physicist whose pioneering digital-to-optical recording and playback system laid the foundation for CD, DVD and Blu-ray technology, has died at the age of 95. "Russell never became a household name, but the technology he developed, later licensed by Sony and Phillips, would transform everything from the way people listen to music to the way data is stored," reports The Daily Chronicle. From the report: In a career spanning almost his entire life, Russell earned more than 70 patents, but his biggest breakthrough was the invention of the first digital-to-optical re

Join the discussion →

What Should First-Time Travellers Know About Airport Procedures?

I am interested in understanding airport procedures, especially for people travelling by air for the first time. Airports have several processes that passengers need to complete before boarding their flights. Understanding these procedures can make travelling easier and more comfortable. I would like to know: What are the steps involved in airport check-in? How early should passengers arrive at the airport? What documents are required for domestic and international flights? What happens during airport security screening? How can first-time travellers avoid common airport mistakes? I would appr

Join the discussion →

Heredoc Bash Syntax

given that cat << EOF > config.txt Setting1=value1 Setting2=value2 Setting3=value3 EOF i'm confused about why not cat << EOF Setting1=value1 Setting2=value2 Setting3=value3 EOF > config.txt and how linux behave as documentation of HEREDOC will not explain this behaviour thanks

Join the discussion →

Is it undefined behavior if const member function changes *this through its argument?

Does this code exhibit undefined behavior or is the behavior well-defined? The const member function promises that it will not change *this, but it actually changes *this through the argument. Can it output 1? #include <iostream> class A { public: A(int n) : n_(n) {} void DoubleTo(A& a) const { a.n_ = 2 * n_; std::cout << n_ << "\n"; } private: int n_ = 0; }; int main() { A a(1); a.DoubleTo(a); } Gemini has told me that a correct compiler should take a potential aliasing a and *this into account, and should not keep the value of n_ in a register after the assignment, changing a: it is required

Join the discussion →

Is it UB if const member function changes `*this` through its argeument?

Does this code exhibit undefined behavior or is the behavior well-defined? The const member function promises that it will not change *this, but it actually changes *this through the argument. Can it output 1? #include <iostream> class A { public: A(int n) : n_(n) {} void DoubleTo(A& a) const { a.n_ = 2 * n_; std::cout << n_ << "\n"; } private: int n_ = 0; }; int main() { A a(1); a.DoubleTo(a); }

Join the discussion →

Is a hard timeout for asynchronous operations that don’t work with SemaphoreSlim without creating leakages possible?

SemaphoreSlim is being used in .NET 8 for restricting concurrent calls to a third-party asynchronous API up to five. The issue here is that this API sometimes gets stuck forever and does not honor CancellationToken. await _semaphore.WaitAsync(ct); try { var work = ThirdPartyClient.ExecuteAsync(itemId, ct); // sometimes ignores ct and hangs if (await Task.WhenAny(work, Task.Delay(5000, ct)) != work) throw new TimeoutException(); await work; } finally { _semaphore.Release(); } Things I've Tried So Far: Releasing in finally (above): Works to keep the pipeline going, but work tasks that hung are s

Join the discussion →

Tiny Hat: a new Linux distro dedicated to retro gamedev

Tiny Hat uses only around 100MB of RAM after booting, and can be booted from a >= 1GB memory stick. It comes with a few small games, an easy way to install and run more games and several example programs for getting into retro game development. It also uses a modern stack of libraries, with dwl / Wayland, SDL3 and GTK4. One possible use is to buy a cheap x86 machine to younger members of a family, to completely brain wash inspire them into getting into graphics programming and appreciating retro games, perhaps as a Christmas present. At least a few people has found it fun so far, so I wanted t

Join the discussion →

How do I fix "'package:flutter/material.dart' is deprecated… Use package:cupertino_ui/cupertino_ui.dart instead" after upgrading to Flutter 3.50?

After upgrading to Flutter **3.50.1** (Dart 3.14), almost every file in my app shows this analyzer warning: 'package:flutter/cupertino.dart' and 'package:flutter/material.dart' are deprecated and shouldn't be used. Use package:cupertino_ui/cupertino_ui.dart instead. This feature was deprecated after v3.47.0-0.0.pre. Example imports that trigger it: ```dart import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; The warning message is confusing because it mentions both material.dart and cupertino.dart, but only suggests replacing them with package:cupertino_ui/cupertino

Join the discussion →
Older stories