News for hackers. Stuff that matters.

brianpursley

Re:Git-blame-someone-else on Monday July 26, 2021 @04:32PM (#27965053)
It’s not just blame. GitHub uses commits to build the contributor list on your repo home page, so you can make it look like it has some famous contributors:

https://github.com/jayphelps/git-blame-someone-else/graphs/c...

Re:Sorting networks and their applications (1968) [pdf] on Saturday July 03, 2021 @08:44AM (#27721254)
I find sorting networks to be fascinating.

Beyond 8 inputs, there isn’t a pattern to follow to construct the optimal sorting network, and there are only “best known” sorting networks (but not proven to be optimal) for networks beyond 11 inputs.

Unintuitively, the optimal sorting network for, let’s say, 16 inputs is not just an iteration on the optimal sorting network for 15 inputs. So you can’t just build upon what was optimal for a smaller sorting network to get what is optimal for a larger sorting network.

I’ve spent more time than I probably should have several years ago experimenting with various genetic algorithms to construct sorting networks for 14, 15, and 16 inputs. It was a fun challenge and learning experience though.

Here is a little utility I wrote in Python to check whether a comparison network is a sorting network and can generate diagrams for them in svg format.

https://github.com/brianpursley/sorting-network

Re:We Hacked Apple for 3 Months on Thursday October 08, 2020 @10:42AM (#24719489)
The most valuable vulnerability they found was some publicly exposed Spring Boot Actuator endpoints (https://docs.spring.io/spring-boot/docs/current/reference/ht...):

  $34,000 - Multiple eSign environments vulnerable to system memory leaks containing secrets and customer data due to public-facing actuator heapdump, env, and trace
I guess it goes to remind you if you are a developer, don't overlook the simple things like not exposing these endpoints in production (literally a line in a config file) or at least making them secured.

And if you are a bug bounty hunter, some of the simplest things can lead to the best ROI. I'm actually surprised something this basic was not already found and reported, but credit goes to their recon efforts for determining where to look.

Re:Symbian Won on Thursday June 25, 2020 @12:44PM (#23642631)
> I could never accept the coding standard for curly bracket positioning.

OK, so I had to look.

It's like they saw the two main camps (same line vs next line) and said "let's come up with something everyone will hate":

    TInt GetROMSize(TInt /*aDeviceNumber*/, TInt /*aAttrib*/, TBool /*aSet*/, TAny* aInOut)
        {
        TMemoryInfoV1 info;
        TPckg<TMemoryInfoV1> infoPckg(info);
        TInt r=UserSvr::HalFunction(EHalGroupKernel, EKernelHalMemoryInfo, (TAny*)&infoPckg, NULL);
        if (r==KErrNone)
            {
            *(TInt*)aInOut=info.iTotalRomInBytes;
            }
        return r;
        }
I’m not sure I understand the use case for wanting to kill vim. Wouldn’t you want to save what you are editing?

Now vim clutch, on the other hand, is the kind of innovation that saves vim enthusiasts valuable milliseconds... https://github.com/alevchuk/vim-clutch

Re:What Peak Hello World Looks Like on Sunday May 17, 2020 @11:51AM (#23212778)
This is awesome!
Re:Daily standups should be async on Friday May 15, 2020 @03:01PM (#23196008)
Best standup process I ever had was just a slack channel called standups, and everyone just posted a couple sentences sometime during the morning: what they did yesterday, and what they plan to do today.

It was great because first of all there is a history everyone can look back on, which can save some unnecessary communication and coordination. But most importantly it avoids the dreaded sidetrack conversation that turns your standup into a 20 minute meeting.

Re:This blog runs on my Raspberry Pi on Tuesday April 28, 2020 @12:24PM (#23008585)
*ran
This reminds me of a little Visual Basic program I hacked together about 20 years ago when I wanted to buy a PlayStation 2 but there was a shortage after it launched.

Every 5 minutes, my program would make a request to the product page on Amazon and look for the text "out of stock". If it didn't find it, the program would sound off an alarm bell.

I still remember sitting nearby, watching TV one night when the alarm went off. I jumped up and ran over to my computer and bought myself a PS2.

As silly as it sounds, what I remember most fondly about the PlayStation 2 was making and using this little program to help buy it.