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,854 other subscribers

Archive for 2019

Preventing sites to add themselves to the Google Chrome search engine list

Posted by jpluimers on 2019/01/11

For a long time, sites have been able to add themselves to the search engine list in Google Chrome.

 

The last one is my own, but hundreds of them are not.

I never noticed this until I needed to add some custom search engine strings to the list and found the UI is obnoxiously slow when there are hundreds of entries in that list.

It’s like the cookies editor: the editing speed decreases exponentially with the number of entries in that list.

The feature is called Tab to Search, apparently is intentional, based on the OpenSearch standard and well documented:

Many people dislike it though:

There are various ways around it documented in the last link.

This is the one I liked best: [WayBackDon’t add custom search engines – Chrome Web Store.

Via: [WayBack] Google Chrome: Remove all ‘Other Search Engines’ – Super User who also pointed me to the script below the signature ([WayBack] Remove chrome “other search engines” · GitHub), which likely needs this change:

penguin020 commented on Dec 22, 2017  

Just in case you are trying to use this with the (keep) mechanism, I think that the engine.modelIndex can get muddled if you do not refresh between runs of this script, possibly deleting engines you wish to keep.

UPDATE: if you reverse sort by modelIndex, this problem is obviated.

Add

val.others.sort(function (a, b) { return b.modelIndex - a.modelIndex; });

just after the .then.

–jeroen

Read the rest of this entry »

Posted in Chrome, Google, GoogleSearch, Power User | Leave a Comment »

5 Simple Steps to Install Youtube Vanced Edition (No Root Needed) – Saint – watch without ads

Posted by jpluimers on 2019/01/11

Interesting [WayBack] 5 Simple Steps to Install Youtube Vanced Edition (No Root Needed) – Saint

You want to listen to your YouTube playlist in peace without any pesky ads and with a dark theme.YouTube Vanced is a pretty well known modded version of YouTube.

Via: [WayBack] Software-update: Pi-hole 4.0 – IT Pro – Downloads – Tweakers

–jeroen

Posted in Power User, SocialMedia, YouTube | Leave a Comment »

How much is Google Cloud Latency between Regions?

Posted by jpluimers on 2019/01/11

Interesting post which links to an on-line overview of the current latencies:

Does anybody know about similar information about other big cloud providers like Amazon and Azure?

–jeroen

Posted in Cloud, GCP Google Cloud Platform, Infrastructure, Internet, Power User, SpeedTest | Leave a Comment »

Life after Google+ – Lars Fosdal: Friends+Me Google+ Export tool.

Posted by jpluimers on 2019/01/11

A little while ago, I blogged about Life after Google+ – Lars Fosdal. In the mean time, Lars has made a lot of progress exporting the community [WayBack] Delphi Developers – Google+ (which has moved to en.delphipraxis.net !).

He is a heavy user of the Friends+Me Google+ Export tool, which basically is an actively maintained web scraper with standard output targets:

[WayBack] Google Plus Exporter – Medium: Export your Google+ feeds to WordPress, Blogger, and JSON.

It does not depend on the G+ REST API: “the app is using web scraping and will keep working until the bitter end”.

Quite a bit of that information and the feedback he has is in this thread: [WayBack1/WayBack2] Hi Everyone, We’ve just released Google+ Exporter, an application that helps you to export your Google+ feeds (profile, pages, collections, communities… – Friends+Me – Google+

Of course G+ does not save the whole thread in the WayBack machine, so here it is copy-pasted (unformatted; maybe I will format it later):

Read the rest of this entry »

Posted in Development, G+: GooglePlus, Gutenberg editor, LifeHacker, Power User, SocialMedia, Software Development, Web Development, WordPress, WordPress | Leave a Comment »

from a WSDL import: empty “Reference.cs” – Google Search

Posted by jpluimers on 2019/01/10

A search for empty “Reference.cs” – Google Search seems to indicate this happens with referenced types that – despite turning off that option – from the Visual Studio 2017 IDE sometimes results in an empty Reference.cs.

My solution: import in an empty project, then move the reference to the existing project and add it.

[WayBack] c# – Sometimes adding a WCF Service Reference generates an empty reference.cs – Stack Overflow

–jeroen

Posted in .NET, C#, Development, Software Development, Visual Studio 2015, Visual Studio 2017, Visual Studio and tools | Leave a Comment »

Some ideas to show a Google Calendar on a TV using a Raspberry Pi and HDMI output

Posted by jpluimers on 2019/01/10

Using OpenSuSE Tumbleweed E20 on Raspberry Pi 3: accessing the enlightenment desktop over VNC after automatic logon I wanted to buy an on-line read-only diary to help my mentally retarded brother see what his next few days are going to be like.

He increasingly has difficulty handling a paper agenda and has an agenda with 30 minute blocks like [Archive.isbol.com | Bureau Agenda 2017 – 1 dag per Pagina | 0041560163422 | Boeken (and the [Archive.is] picture on the right), but actually he needs 15 minute blocks during some portions of the day.

We call that kind “bureau agenda” which I think translates well into “desk diary”.

They were quite different from the agendas I used to have at school (:

[WayBack[Zonder titel] Rijam agenda 1983/84 verzamelen? Stripcatalogus op Catawiki

For most school mates, they were more like this:

Had je een O’Neill of ging je voor De Familie Doorzon? De oude agenda’s uit je middelbare schooltijd zijn de verpersoonlijking van je eigen puber-ik. Afgelopen weekend startte in het Nationaal Onderwijsmuseum in Dordrecht de toffe tentoonstelling Grow Up over die vuistdikke, volgeplakte agenda’s.

[WayBackSchoolagenda vol sentiment | Go with the Vlo

Anyway, some ideas I initially had are below.

This is what I actually did:

Two things for the future:

Initial thoughts

Raspberry based:

Chromecast based:

–jeroen

Read the rest of this entry »

Posted in Development, Google, GoogleCalendar, Hardware Development, JavaScript/ECMAScript, JSFiddle, LifeHacker, Power User, Raspberry Pi, Scripting, Software Development | 2 Comments »

git on Windows: prevent “The requested URL returned error: 403” during push of https based repository

Posted by jpluimers on 2019/01/10

When you search for git push "The requested URL returned error: 403", then the usual answer is “use ssh over https”, for instance at [WayBackgithub – Pushing to Git returning Error Code 403 fatal: HTTP request failed – Stack Overflow.

However, lots of places (especially larger corporations and financials) limit outgoing traffic to http and https based for (often perceived) security reasons.

In this case, I needed a solution for Windows, which – after a long search – found two solutions that are below.

I use the https://gitlab.com/wiert.me/examples/sql-examples.git repository as an example, but it isn’t limited to GitLab: the same symptoms happen with other hosters as well (for instance on GitHub and BitBucket):

First what doesn’t work: they all give the same 403 message.

  1. Installing a newer git version (I tried git version 2.13.3.windows.1)
  2. have the plain URL:
  3. put just the username or e-mail address in the URL
  4. put just the username or e-mail address in the URL with a blank password
  5. for the four above, add the caching credential helper then add a credential:
    • git config --local credential.helper cachegit config --local credential.https://gitlab.com.username wiert
      You get this log:
      Pushing to https://gitlab.com/wiert.me/examples/sql-examples.git
      git: 'credential-cache' is not a git command. See 'git --help'.
      remote: HTTP Basic: Access denied
      fatal: Authentication failed for 'https://gitlab.com/wiert.me/examples/sql-examples.git/'

What could work

The first thing that works is to include the actual password in the repository URL like this:

When you enter the correct password, everything is fine. Except that the password is stored as plain text on disk.

What works

The real solution on Windows is to use the Windows Credential Manager. I found this because of the 5th failure above.

To see which username/password combinations have been stored or add your own, you can start the Credential Manager on the command-line like this (each Windows version seems to have a different path to the UI from the control panel; the console trick just works on all Windows versions I tested):

%windir%\explorer.exe shell:::{1206F5F1-0569-412C-8FEC-3204630DFB70}

Note the above was the reason for writing List of Shell GUIDs for various Windows versions for use in shortcuts and batch files.

What might work on non-Windows systems

I have the impression that the “cached” credential manager will work on non-Windows systems, but need to find some time testing that on multiple platforms. Stay tuned (:

For that I need to look into at least these:

–jeroen

Posted in BitBucket, Development, DVCS - Distributed Version Control, git, GitHub, GitLab, Source Code Management | Leave a Comment »

Getting the class from an TRttiProperty by using MetaclassType

Posted by jpluimers on 2019/01/09

Basically I learned that I should not only look for ClassType, but also for MetaclassType: [WayBack] Not a major problem, but given that xProp is a TRttiProperty instance is there a better way to get the ClassType of a property that is tkClass? – Chad Hower – Google+:

Chris Rolliston

The System.Rtti way is this –

x := xProp.PropertyType.AsInstance.MetaclassType;

Been in since TRttiContext was first added, IIRC.

It indeed has been documented since Delphi 2010: [Archive.is] Rtti.TRttiClassRefType.MetaclassType – RAD Studio VCL Reference

–jeroen

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

Converting html fragments to reStructuredText

Posted by jpluimers on 2019/01/09

Though normally you would write documentation in reStructuredText, then generate HTML or PDF, often you find a part of the documentation source in HTML.

Here are some sites and tools I’ve used to convert HTML fragments to reStructuredText. I favour on-line over local command-line tools as usually these kinds of conversions are “one-time only”.

–jeroen

Posted in Development, Lightweight markup language, reStructuredText, Software Development | Leave a Comment »

List of Shell GUIDs for various Windows versions for use in shortcuts and batch files

Posted by jpluimers on 2019/01/09

In my search for starting the Windows Credential Manager from the console, I found [WayBackCredential Manager Shortcut – Create – Windows 7 Help Forums explaining:

%windir%\explorer.exe shell:::{1206F5F1-0569-412C-8FEC-3204630DFB70}

This reminded me of From batch file or shortcut: start Windows Update (via: Windows 7 Help Forums) and batch-file trick: Starting Windows Explorer and selecting a file (“explorer” commandline parameters “/n” “/e” “/select” “/root” “/start” site:microsoft.com).

The odd thing is that some of the GUID shortcuts works fine using the shell::: syntax, but fail with the /e:: syntax, for instance Windows Update until Windows 8.1:

%windir%\explorer.exe shell:::{36eef7db-88ad-4e81-ad49-0e313f0c35f8}
%windir%\explorer.exe /e,::{36eef7db-88ad-4e81-ad49-0e313f0c35f8}

One day I’ll create a table of permutations for various Windows versions and execute options.

For now these links need to suffice:

–jeroen

Posted in Batch-Files, Development, Power User, Scripting, Software Development, Windows, Windows 10, Windows 7, Windows 8, Windows 8.1, Windows 9 | 1 Comment »