News for hackers. Stuff that matters.

fdomingues

Re:10g Upgrade on Tuesday June 02, 2026 @10:56AM (#48371110)
What are the use cases for multi gbps home network or internet access? With a 1/1 Gbps link we could use 500 Mbps to transfer 5 TBytes per day of home assistant backups, time machine deltas, security footage..., and still have the other 500 Mbps to do whatever we want.
Re:Django: One ORM to rule all databases on Sunday October 12, 2025 @11:42AM (#45559026)
I have made this tiny module to use it wherever I want it.

https://github.com/domingues/djangify-package

TIL that the iPhone Air camera bump is thicker than the main body

From the page 329 of the Accessory Design Guidelines[1], the camera bump is 5.68mm thick, the main body is 5.64mm, as advertised everywhere, which brings the total thickness to 11.32mm.Is this good? Is this bad? Don't know, don't care.[1] https://developer.apple.com/accessories/Accessory-Design-Guidelines.pdf

( Read More... | no comments | on HN )
Re:A valid HTML zip bomb on Friday July 25, 2025 @05:54AM (#44681427)
That content shift on page scroll is horrendous. Please don't do that, there is no need to auto hide a side bar.
Re:Alt.Anonymous.Messages Newsgroup on Friday February 14, 2025 @05:39AM (#43047031)
Some time ago I created a chat that uses the same principles, it's funny to have some ideas validated by something that has been around for over 20 years and that I didn't know existed.

https://github.com/domingues/vortex/

Re: on Monday August 05, 2024 @04:06AM (#41159060)
To overcome the hoarding I use Simple Tab Groups[1], that has auto backup, combined with Auto Tab Discard[2], to completely inactivate open, but unused, tabs.

[1] https://addons.mozilla.org/en-US/firefox/addon/simple-tab-gr...

[2] https://addons.mozilla.org/en-US/firefox/addon/auto-tab-disc...

Show HN: Vortex – Secure, Transport-Agnostic, E2EE Chat in Under 600 Lines

https://github.com/domingues/vortex

Vortex is a lightweight, end-to-end encrypted chat application that ensures message authenticity and confidentiality. It offers transport agnosticism, supporting both PostgreSQL and WebSocket, all in less than 600 lines of Python code.This small project started with a demo to show the feasibility of using PostgreSQL as a message broker, a week later it gained TUI and E2EE. It's designed so that...

( Read More... | no comments | on HN )
Happy to see it converted from the old flash applet.
Is useful to do code generation/transformation, for example in this utility[1] it uses the information provided on the declaration of the class to generate the methods required by the base class.

The user of the utility write this:

    class Book(objects.Object):
        title: Optional[str]
And the generated class code is:

    class Book(Base):
        __slots__ = ('title', )
        title: typing.Optional[str]
    
        def __init__(self, title=None):
            self.title = title
    
        @classmethod
        def from_data(cls, data):
            title = data.get('title', None)
            return cls(title=title)
    
        def to_data(self):
            data = {}
            if self.title is not None:
                data['title'] = self.title
            return data
    
        @classmethod
        def from_oracle_object(cls, obj):
            return cls(title=obj.title)
    
        def to_oracle_object(self, connection):
            obj = connection.gettype('Book').newobject()
            obj.title = self.title
            return obj
[1]https://github.com/domingues/oracle-object-mapping
Re:C++ Is 9.4 Times Faster Than Python in Prime Number Test on Wednesday February 03, 2021 @12:12PM (#26015946)
C++ Is NOT 9.4 Times Faster Than Python in Prime Number Test

I added 3 lines to the Python code and got it 10x faster:

    (venv) $ python prime.py 
    Number of primes between 0 to 1000000 = 78498
    Elapsed time: 6.502481937408447
    (venv) $ python prime.py 
    Number of primes between 0 to 1000000 = 78498
    Elapsed time: 0.6258630752563477
Diff:

    3c3,5
    < 
    ---
    > import numba
    >  
    > @numba.njit
    14a17
    > @numba.njit
Re:Python 3.9 is around the corner on Wednesday September 30, 2020 @06:51AM (#24637344)
Since Python 3.7 you can postpone evaluation of the annotations[1].

You can do something like this:

  from __future__ import annotations

  Class Node:
      parent: Optional[Node]
[1] https://www.python.org/dev/peps/pep-0563/
Re:$PHP = ; on Wednesday January 24, 2018 @11:10AM (#16223772)
$=${$}[$]; $($);

Actually some time ago I found some piece of alien PHP code (a backdoor) in my server, and I couldn't understand it! I did't know the $($); syntax. After searching for that and not finding anything I discovery that exist one special Unicode character that is invisible.

Full code here: https://imgur.com/a/Cggdx