The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,861 other subscribers

Archive for 2017

Objective-See: the Mac OS X / MacOS / Mac OS 10 root password issue tracked down

Posted by jpluimers on 2017/11/29

[WayBackObjective-See: tracking down the cause a serious authentication flaw in Mac OS X / MacOS / Mac OS 10: resetting the root password by just clicking OK.

Via: [WayBack] How the MacOS High Sierra ##IAmRoot bug actually works. ##insightful … TL;DR the return value of the verify password function is interpreted wrong. Fix looks trivial. But this IS a serious bug. – Jan Wildeboer – Google+

Note the bug was already revealed two weeks ago: [WayBack] … after updating to High Sierra, the two admin accounts on this machine are all of a sudden standard accounts …

Via: [Archive.is] Mike Myers‏ @fristle: Perhaps nobody noticed two weeks ago when the root login vulnerability in macOS High Sierra was shared as a helpful tip on Apple’s own Developer forums. https://forums.developer.apple.com/thread/79235

The bug has already been fixed: [WayBack] About the security content of Security Update 2017-001 – Apple Support

Via: [WayBack] That was reasonably fast! ##Apple has released the fix for the embarrassing ##IAmRoot bug. https://support.apple.com/en-us/HT208315 – Jan Wildeboer – Google+

–jeroen

Read the rest of this entry »

Posted in Apple, Mac OS X / OS X / MacOS, macOS 10.12 Sierra, Power User | Leave a Comment »

QA frustrations: waiting  almost a year for a resolution

Posted by jpluimers on 2017/11/29

A frustrating part of reporting issues to many companies is the time it takes to get a response at all or a response “maybe in the far future”.

Below is just an example, but I see this regularly, for instance another example (scheduled in a later security related post) a company that responds to a “welcome in the 21st century” complaint on enforcing a 16 character password limit by responding “maybe we are going to extend it in the 22nd century”.

[WayBack] why are the parameters in a reverse order.

–jeroen

Posted in Development, Quality Assurance, Software Development | Leave a Comment »

Yay! The WordPress.com Press-This bookmarklet now works again!

Posted by jpluimers on 2017/11/29

Good news the Press-This bookmarklet on WordPress.com has been reinstated.

See https://github.com/WordPress/press-this/pull/29 and the discussions in these below threads and sources.

Solves issues:

  • #12 – Add text domains
  • #15 – Restore Bookmarklet Functionality
  • #17 – Needs better documentation
  • #32 – The Press This bookmarklet itself on the tools page does not have the code

Some relevant sources:

Read the rest of this entry »

Posted in Bookmarklet, Development, Power User, SocialMedia, Software Development, Web Browsers, Web Development, WordPress, WordPress | Leave a Comment »

Canonical Delphi Singleton Pattern – Stack Overflow

Posted by jpluimers on 2017/11/29

Though I try to refrain from using the singleton pattern when possible (I prefer dependency injection over accessing “globals” that usually tend up to be not so global after all), sometimes I need to.

In C# there has been a canonical singleton pattern implementation by John Skeet for a very long time at [WayBackC# in Depth: Implementing the Singleton Pattern.

I just found out there has been similar implementations in Delphi both in this question (which like many useful questions is marked “closed”, oh the joy of StackOverflow): [WayBack] “Delphi Singleton Pattern – Stack Overflow:

I like both implmentation, but usually take the first as mostly locking has little overhead and sometimes two instances cannot co-exist (though that’s lessened when part of the singleton uses lazy initialisation, for instance from Spring4D).

–jeroen

via: [WayBack] May I please ask for your opinion on the following code:..singleton… – John Kouraklis – Google+

Posted in Delphi, Development, Software Development | Leave a Comment »

tiOPF discussion thread

Posted by jpluimers on 2017/11/29

Sometimes the title of a G+ entry looks not so interesting, but then you read the comments. In this cast it’s about the mediator pattern support in the tiOPF object persistence framework, how it works very well from Free Pascal and both classic and  modern Delphi compilers and why developers dislike ARC. It’s cool as it allows you to decouple UI from business logic and separate out business logic from your application into a back-end. Recommended reading: [WayBack] Hello i have a program that use MS SQL SERVER 2000i want to make a mobile application that connect to this database to make some consultationclient fi… – Mohammed Bouhlal – Google+

–jeroen

Posted in Delphi, Development, FreePascal, Pascal, Software Development | Leave a Comment »

Until 20171201 you can get free access to “Automate the Boring Stuff with Python”? 

Posted by jpluimers on 2017/11/29

A very interesting course: [WayBack] Want to learn how to “Automate the Boring Stuff with Python”? Check out this reddit post by Al Sweigart for free access to his online course on Udemy… – ThisIsWhyICode – Google+

If you get it before 20171201, then you can still access it for free after that date.

If you get it later, then you pay either USD 50, or USD 10; see this reddit fragment:

[WayBack] I’m releasing a free code for the “Automate the Boring Stuff with Python” Udemy course

Use this link to sign up for the “Automate the Boring Stuff with Python” Udemy online course: https://www.udemy.com/automate/?couponCode=PY_ALL_THE_THINGS

It’s free until the end of Friday, Dec 1, 2017. Afterwards it goes back to its normal $50 price. (Though you can use this link https://www.udemy.com/automate/?couponCode=FOR_LIKE_10_BUCKS to buy it for $10. And it’s an open secret that if you browse Udemy in privacy mode, they’ll show you the discount price to lure in a “new” customer. But course creators get a much larger cut when people use their referral codes.)

The course follows the book of the same name, which is available for free, in full, at [WayBackhttps://automatetheboringstuff.com under a Creative Commons license. (Which I encourage you to use to share your own creative works.)

The course is 50 videos and made for people with no previous programming experience. The first 15 videos are free to view on YouTube: https://www.youtube.com/watch?v=1F_OgqRuSdI&list=PL0-84-yl1fUnRuXGFe_F7qSH1LEnn9LkW

And now I will go self-flagellate to atone for my part in legitimizing “cyber monday”.

–jeroen

Read the rest of this entry »

Posted in Development, Python, Scripting, Software Development | Leave a Comment »

Kriscode.Hint := ‘Kris”s coding blog’: Lazarus IDE on ARM Ubuntu (Raspberry Pi, Ubuntu Touch, etc)

Posted by jpluimers on 2017/11/28

Interesting writeup as Lazarus and Free Pascal have come a long way: [WayBackKriscode.Hint := ‘Kris”s coding blog’: Lazarus IDE on ARM Ubuntu (Raspberry Pi, Ubuntu Touch, etc)

Via:

–jeroen

Posted in Development, FreePascal, Lazarus, Pascal, Software Development | Leave a Comment »

Implementing Memoize in Delphi 2009 – Community Blogs – Embarcadero Community

Posted by jpluimers on 2017/11/28

I think it was Stefan Glienke who pointed me at the Memoisation pattern: [WayBackImplementing Memoize in Delphi 2009 – Community Blogs – Embarcadero Community

Or in laymans terms: caching with generic functions and dictionaries.

Note the Archive.is link is way better readable than the WayBack link, so below I’ve saved parts only in Archive.is.

It points to two other interesting reads:

Later I found it was indeed Stefan who pointed me to the above links and also came up with this very small Memoisation example which is based on Spring4D:

and guess what? because we have interfaced based dictionary this is super easy, let me just hack an example, 5mins6:52 PM

function BuildCache: Tfunc<string,string>;
var
 cache: IDictionary<string,string>;
begin
 cache := TCollections.CreateDictionary<string,string>;
 Result :=
   function(s: string): string
   begin
     if not cache.TryGetValue(s, Result) then
     begin
       Sleep(1000); // hard work! ;)
       Result := ReverseString(s);
       cache.Add(s, Result);
     end;
   end;
end;

Since the returned anonymous method captures the dictionary its kept inside and once the anonymous method goes out of scope the dictionary is also cleaned, want to reset the cache? Just create a new one and throw the old one away.

Need thread safety? just add

System.TMonitoy.Enter/Leave(cache.AsObject);

–jeroen

Posted in Delphi, Development, Software Development | Leave a Comment »

iptables debugging « \1

Posted by jpluimers on 2017/11/28

Using the TRACE target: [WayBackiptables debugging « \1 via [WayBack] iptables Debugging using the TRACE chain – Kristian Köhntopp – Google+

Docs:

TRACE
This target marks packes so that the kernel will log every rule which match the packets as those traverse the tables, chains,
rules. (The ipt_LOG or ip6t_LOG module is required for the logging.) The packets are logged with the string prefix: “TRACE:
tablename:chainname:type:rulenum ” where type can be “rule” for plain rule, “return” for implicit rule at the end of a user
defined chain and “policy” for the policy of the built in chains.
It can only be used in the raw table.

Way more details in the linked article.

–jeroen

Posted in *nix, *nix-tools, Firewall, Infrastructure, iptables, Power User | Leave a Comment »

Kaart met onontplofte bommen in Amsterdam nu openbaar

Posted by jpluimers on 2017/11/27

De interactieve bommenkaart van de gemeente die laat zien waar onontplofte bommen uit de Tweede Wereldoorlog liggen, is openbaar gemaakt.

Source: [Archive.is] Kaart met onontplofte bommen in Amsterdam nu openbaar

Kaart: [Archive.is] Grote kaart – Dataportaal

Eerder artikel: [Archive.isKaart met verdachte bommen onder Amsterdam bijgewerkt

Dichtbij: [Archive.isVerdachte gebieden: Monte Viso / Gran Paradiso / Pasubio

 

Posted in LifeHacker, Power User | Leave a Comment »