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 2022

Hopefully also soon in the Twitter web user-interface: “Sometimes you want to see yourself out. Take control of your mentions and leave a conversation with Unmentioning, now rolling out to everyone on all devices.”

Posted by jpluimers on 2022/07/20

I have seen this work on some mobile devices for some accounts but not yet in the web-userinterface at http://www.twitter.com or mobile.twitter.com

[Wayback/Archive] Twitter Safety on Twitter: “Sometimes you want to see yourself out. Take control of your mentions and leave a conversation with Unmentioning, now rolling out to everyone on all devices.”

–jeroen

Posted in SocialMedia, Twitter | Leave a Comment »

Converting inline svg xml to png

Posted by jpluimers on 2022/07/19

A while ago, I had a web page showing the logo as inline svg xml code.

Edit 20231209: [Wayback/Archive] Render SVG to PNG: Edit fiddle – JSFiddle – Code Playground (explained in [Wayback/Archive] html – Convert embedded SVG to PNG in-place – Stack Overflow by [Wayback/Archive] User anatoly techtonik – Stack Overflow) works way better than the InfoHeap link:

  1. Replace the svg element in it (but keep the id="inputSvg" attribute!),
  2. Run the fiddle,
  3. Save the rendered PNG file by right-clicking the “PNG (Save link as..)” link then saving the file.

Original content

It took a while to find a place to convert that on-line: [Wayback/Archive.is] inline svg xml to png – online html sandbox – InfoHeap (via [Wayback/Archive.is] Convert svg xml text to png image using canvas – InfoHeap):

The solution is a bit of JavaScript (quoted below) that you can run-online: modify the svg bit in it, then run it, scroll down in the result and verify if the canvas fits (when not: adapt the canvas side, then re-run).

The svg xml code needs to be all on one line, so remove any line breaks in it before running.

I have tested it in Chrome, but it should work in non-Chromium browsers like Firefox as well.

The inner workings of the JavaScript conversion code is explained in [Wayback/Archive.is] html – Convert embedded SVG to PNG in-place – Stack Overflow with more demo code at [Archive.is] Rasterizing In-Document SVG (thanks [Wayback] Phrogz!).

Related: [Archive.is] Jeroen Wiert Pluimers on Twitter: “Nieuwe logo, oude logo. Vrijwel alle werknemers werden een halve dag naar huis gestuurd om ruimte te maken voor de genodigden voor de zodat die de introductie van naam en logo konden bijwonen. Heel goed om verbinding te verliezen met je echte doelgroep. … “

Provalu logo

MareGroep logo

--jeroen



<div id="diagram_image">
<svg id="inputSvg" xmlns="http://www.w3.org/2000/svg&quot; xmlns:inkspace="http://www.inkscape.org/namespaces/inkscape&quot; xmlns:xlink="http://www.w3.org/1999/xlink&quot; viewBox="0 0 640 120">
<defs id="defs_block">
<filter height="1.504" id="filter_blur" inkspace:collect="always" width="1.1575" x="-0.07875" y="-0.252">
<feGaussianBlur id="feGaussianBlur3780" inkspace:collect="always" stdDeviation="4.2" />
</filter>
</defs>
<title>blockdiag</title>
<desc/>
<rect fill="rgb(0,0,0)" height="40" stroke="rgb(0,0,0)" style="filter:url(#filter_blur);opacity:0.7;fill-opacity:1" width="128" x="67" y="46" />
<rect fill="rgb(0,0,0)" height="40" stroke="rgb(0,0,0)" style="filter:url(#filter_blur);opacity:0.7;fill-opacity:1" width="128" x="259" y="46" />
<rect fill="rgb(0,0,0)" height="40" stroke="rgb(0,0,0)" style="filter:url(#filter_blur);opacity:0.7;fill-opacity:1" width="128" x="451" y="46" />
<rect fill="rgb(255,255,255)" height="40" stroke="rgb(0,0,0)" width="128" x="64" y="40" />
<text fill="rgb(0,0,0)" font-family="sans-serif" font-size="11" font-style="normal" font-weight="normal" text-anchor="middle" textLength="55" x="128" y="66">discovery</text>
<rect fill="rgb(255,255,255)" height="40" stroke="rgb(0,0,0)" width="128" x="256" y="40" />
<text fill="rgb(0,0,0)" font-family="sans-serif" font-size="11" font-style="normal" font-weight="normal" text-anchor="middle" textLength="55" x="320" y="66">execution</text>
<rect fill="rgb(255,255,255)" height="40" stroke="rgb(0,0,0)" width="128" x="448" y="40" />
<text fill="rgb(0,0,0)" font-family="sans-serif" font-size="11" font-style="normal" font-weight="normal" text-anchor="middle" textLength="55" x="512" y="66">reporting</text>
<path d="M 192 60 L 248 60" fill="none" stroke="rgb(0,0,0)" />
<polygon fill="rgb(0,0,0)" points="255,60 248,56 248,64 255,60" stroke="rgb(0,0,0)" />
<path d="M 384 60 L 440 60" fill="none" stroke="rgb(0,0,0)" />
<polygon fill="rgb(0,0,0)" points="447,60 440,56 440,64 447,60" stroke="rgb(0,0,0)" />
</svg>
</div>
<img id="outputPngImage" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4
//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg=="/>
<span id="outputPngLinkSpan">
<a href="">PNG (Save link as..)</a>
</span>

view raw

page-body.html

hosted with ❤ by GitHub


class SVGtoPNGDataURL {
constructor() {
this.canvas = document.createElement('canvas'); // Not shown on page
this.canvas2DContext = this.canvas.getContext('2d');
this.loaderImage = new Image; // Not shown on page
}
// Generate PNG data URL from SVG and send it to callback function when ready
go(svgElement, dataUrlCallback) {
var svgAsXML = (new XMLSerializer).serializeToString( svgElement );
this.loaderImage.width = this.canvas.width = svgElement.clientWidth;
this.loaderImage.height = this.canvas.height = svgElement.clientHeight;
var self = this;
this.loaderImage.onload = function() {
self.canvas2DContext.drawImage( self.loaderImage, 0, 0, self.loaderImage.width, self.loaderImage.height );
dataUrlCallback(self.canvas.toDataURL());
};
this.loaderImage.src = 'data:image/svg+xml,' + encodeURIComponent( svgAsXML );
}
};
var converter = new SVGtoPNGDataURL();
var inputSvgElement = document.querySelector('#inputSvg'), // Inline SVG element
outputPngImage = document.querySelector('#outputPngImage'), // Where to draw the result
outputPngLink = document.querySelector('#outputPngLinkSpan a');
converter.go(inputSvgElement, dataUrlCallback=function(dataURL) {
outputPngImage.src = dataURL;
outputPngLink.href = dataURL;
});

Posted in Chrome, Development, Firefox, JavaScript/ECMAScript, Power User, Scripting, Software Development, Web Browsers, Web Development | Leave a Comment »

Some @MCH2022Camp badge updates I found on Twitter

Posted by jpluimers on 2022/07/19

For all attending [Wayback/Archive] May Contain Hackers 2022 , a few things to check out:

  • their blog contains new posts with exiting news: [Wayback/Archive] Weblog | May Contain Hackers 2022 – blog
  • Tweeps and tweep-groups are fiddling with the MCH2022 badge already resulting in cool things like:
    • The MCH2022 terrain as a gameboy map (which runs on the MCH2022 badge)
    • There is a batch housing you can 3D print
    • Thumb knobs for the MCH2022 badge to it is easier on your fingers (2 models)
    • More software to run on the MCH2022 badge (like a CTF game)
    • Doom running on the badge (that of course was just a matter of time)
    • After MCH2022 there are 3 more hackercamps in Europe

More below…

Read the rest of this entry »

Posted in Conferences, Development, ESP32, Event, Hardware Development, Raspberry Pi, RP2040, Scripting, Software Development | Leave a Comment »

Viewing the most recent Windows DNS requests on the console

Posted by jpluimers on 2022/07/18

I missed that over time, ipconfig has been extended with some more commands.

The command ipconfig /displaydns does exaxctly what I want: Display the contents of the DNS Resolver Cache.

The ipconfig help:

USAGE:
    ipconfig [/allcompartments] [/? | /all |
                                 /renew [adapter] | /release [adapter] |
                                 /renew6 [adapter] | /release6 [adapter] |
                                 /flushdns | /displaydns | /registerdns |
                                 /showclassid adapter |
                                 /setclassid adapter [classid] |
                                 /showclassid6 adapter |
                                 /setclassid6 adapter [classid] ]

where
    adapter             Connection name
                       (wildcard characters * and ? allowed, see examples)

    Options:
       /?               Display this help message
       /all             Display full configuration information.
       /release         Release the IPv4 address for the specified adapter.
       /release6        Release the IPv6 address for the specified adapter.
       /renew           Renew the IPv4 address for the specified adapter.
       /renew6          Renew the IPv6 address for the specified adapter.
       /flushdns        Purges the DNS Resolver cache.
       /registerdns     Refreshes all DHCP leases and re-registers DNS names
       /displaydns      Display the contents of the DNS Resolver Cache.
       /showclassid     Displays all the dhcp class IDs allowed for adapter.
       /setclassid      Modifies the dhcp class id.
       /showclassid6    Displays all the IPv6 DHCP class IDs allowed for adapter.
       /setclassid6     Modifies the IPv6 DHCP class id.


The default is to display only the IP address, subnet mask and
default gateway for each adapter bound to TCP/IP.

For Release and Renew, if no adapter name is specified, then the IP address
leases for all adapters bound to TCP/IP will be released or renewed.

For Setclassid and Setclassid6, if no ClassId is specified, then the ClassId is removed.

Examples:
    > ipconfig                       ... Show information
    > ipconfig /all                  ... Show detailed information
    > ipconfig /renew                ... renew all adapters
    > ipconfig /renew EL*            ... renew any connection that has its
                                         name starting with EL
    > ipconfig /release *Con*        ... release all matching connections,
                                         eg. "Wired Ethernet Connection 1" or
                                             "Wired Ethernet Connection 2"
    > ipconfig /allcompartments      ... Show information about all
                                         compartments
    > ipconfig /allcompartments /all ... Show detailed information about all
                                         compartments

 

Via:

–jeroen

Posted in DNS, Internet, Power User, Windows, Windows 10 | Leave a Comment »

wrongbaud on Twitter: “Happy Friday! Looking for weekend reading about hardware hacking? JTAG, I2C, SPI, UART: …”

Posted by jpluimers on 2022/07/15

From many Fridays back: [Archive.is] wrongbaud on Twitter: “Happy Friday! Looking for weekend reading about hardware hacking? JTAG: https://t.co/PWSXXDqlcj SWD: https://t.co/vG1cTacfFM I2C: https://t.co/V3WAL5sS5e SPI: https://t.co/V4lvqVlyXE UART: https://t.co/PjGNMLnegG”:

–jeroen

Read the rest of this entry »

Posted in Development, Hardware Development | Leave a Comment »

Automatically reload page in Chrome without plugin – Super User

Posted by jpluimers on 2022/07/14

Below is a cool solution to refresh a page using a bookmarklet is to embed it into an iframe, then automatically reload it every interval.

It for instance works for the [Wayback/Archive.is] Woonveilig and often in Fritz!Box environments.

[Wayback] Jon described the below method as a solution for his own question, 6 years after asking it in [Wayback/Archive.is] Automatically reload page in Chrome without plugin – Super User.

So I made this a bookmark:


javascript:document.getElementsByTagName("body")[0].innerHTML = "<iframe id=\"testFrame\" src=\""+window.location.toString()+"\" style=\"position: absolute; top:0; left:0; right:0; bottom:0; width:100%; height:100%;\"><\/iframe>";reloadTimer = setInterval(function(){ document.getElementById("testFrame").src=document.getElementById("testFrame").src },5*60*1000)

(it is in a gist as the WordPress editors keep killing the embedded html code, despite it being escaped within <code> tags.

–jeroen

Posted in Bookmarklet, Chrome, Chrome, Development, Firefox, Google, HTML, JavaScript/ECMAScript, Power User, Scripting, Software Development, Web Browsers, Web Development | Leave a Comment »

The Delphi and Turbo Pascal tools page by Duncan Murdoch has moved domain from www8.pair.com to murdoch-sutherland.com

Posted by jpluimers on 2022/07/13

For a very long time (about 2 decades) Duncan Murdoch had his home page at www8.pair.com/dmurdoch which somewhere in 2021 has moved to

I figured that out thanks to some help from [Wayback/Archive] Pair Networks (@pairnetworks) / Twitter.

So you need to do a replacement of many URL link prefixes

  • from http://www8.pair.com/dmurdoch/
  • to: http://murdoch-sutherland.com/

For instance some old and new pages:

Read the rest of this entry »

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

GitKon Sept 22 – 23, 2021 – Virtual Git Conference | Presented by GitKraken

Posted by jpluimers on 2022/07/12

GitKon was a cool virtual conference about git and the git ecosystem: [Wayback/Archive.is] GitKon Sept 22 – 23, 2021 – Virtual Git Conference | Presented by GitKraken

Navigation was a bit hard because of the visual overload on the site (look at the various Archive.is archivals), so here is the outlined list of sessions with the rough timestamps in the below live recordings:

Global sitemap:

Live recordings are below. Hopefully they will last and per session splits will have become available.

None of them are at listed at [Wayback/Archive.is] www.youtube.com/c/Gitkraken/videos.

Via: [Wayback/Archive.is] Attendee Registration Thank You – GitKon 2021

–jeroen


Day 1 live recordings

Day 2 live recordings

Posted in Development, DVCS - Distributed Version Control, git, Mobile Development, Software Development, Source Code Management, Web Development | Leave a Comment »

Last days until the May Contain Hackers 2022 camp; the badge project can still use some help on the software side: Python apps, FPGA, documentation, etc

Posted by jpluimers on 2022/07/11

After yesterdays post (which I will be editing to add some more pictures) MCH2022 badge sneak previews from tweeps that attended the Bitlair 20220709 Sweatshop (@MCH2022Camp) now a call for help:

The Badge Team needs volunteers helping them on the software side.

At the badge event, the version 1.0 firmware was flashed so the badge will function perfectly fine during the event, but it would be cool if more features are available that attendees can get when upgrading at the event or downloading from the hatchery.

There is a virtual environment to test and a GitHub projects page with open issues to get started.

See the links below on how you can help:

Read the rest of this entry »

Posted in Development, ESP32, Hardware Development, Python, Raspberry Pi, RP2040, Scripting, Software Development | Leave a Comment »

Firewall whitelist for Windows Update

Posted by jpluimers on 2022/07/11

For Windows 10 to update at all, I had to add a truckload of domains to the Fritz!Box whitelist configuration; this is the list for now:

fe3.delivery.dsp.mp.microsoft.com.nsatc.net
fe3cr.delivery.mp.microsoft.com
www.tm.a.prd.aadg.akadns.net
prda.aadg.msidentity.com
www.tm.lg.prod.aadmsa.trafficmanager.net
login.msa.msidentity.com
login.live.com
geo.prod.do.dsp.mp.microsoft.com
ocsp.comodoca.com.cdn.cloudflare.net
ocsp.sectigo.com
crl.usertrust.com
ocsp.usertrust.com
fe2cr.update.microsoft.com.akadns.net
fe2cr.update.microsoft.com
ocsp.digicert.com
vip1-wns2-db5p.wns.notify.trafficmanager.net
wns.notify.trafficmanager.net
client.wns.windows.com
time.windows.com
*.prod.do.dsp.mp.microsoft.com
emdl.ws.microsoft.com
*.dl.delivery.mp.microsoft.com
*.windowsupdate.com
*.delivery.mp.microsoft.com
*.update.microsoft.com
adl.windows.com
tsfe.trafficshaping.dsp.mp.microsoft.com
fe2cr.update.microsoft.com
fe3cr.delivery.mp.microsoft.com
ctldl.windowsupdate.com
emdl.ws.microsoft.com
*.prod.do.dsp.mp.microsoft.com
*.au.download.windowsupdate.com
download.windowsupdate.com
ocsp.digicert.com
slscr.update.microsoft.com
adl.windows.com
*dl.delivery.mp.microsoft.com
*.tlu.dl.delivery.mp.microsoft.com
windowsupdate.microsoft.com
*.windowsupdate.microsoft.com
download.windowsupdate.com
download.microsoft.com
*.download.windowsupdate.com
test.stats.update.microsoft.com
ntservicepack.microsoft.com
update.microsoft.com
*.update.microsoft.com
*.download.microsoft.com
windowsupdate.com
wustat.windows.com
login.live.com
mp.microsoft.com
*.mp.microsoft.com
www.update.microsoft.com
support.microsoft.com
www.msftconnecttest.com

Related:

–jeroen

Posted in Power User, Windows, Windows 10 | Leave a Comment »