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

Archive for March, 2017

Sniffers, Packet Capture – PFSenseDocs – cool, as it uses tcpdump/Wireshark format!

Posted by jpluimers on 2017/03/13

I hadn’t done a lot with pfSense in the past, which I regret a bit since I discovered this really cool feature: Sniffers, Packet Capture – PFSenseDocs.

The coolness isn’t so much that you can capture packets, but that it’s compatible with tcpdump and Wireshark (which has become available natively for Mac like 2 years ago).

Which means that you can download captures and open them in Wireshark.

So it’s as easy as 1,2,3:

  1. Set-up the capture on your router https://a.b.c.d/diag_packet_capture.php and start it
  2. Stop the capture and download the file
  3. Open the file in Wireshark or convert it to text using tshark

–jeroen

Posted in *nix, *nix-tools, Internet, Monitoring, pfSense, Power User, routers, tcpdump, Wireshark | Leave a Comment »

Display and edit keyboard macros with GExperts – twm’s blog

Posted by jpluimers on 2017/03/13

Yes!

The GExperts Macro Library expert can now display and edit keyboard macros that have been recorded in the Delphi IDE.

Thomas did some great work on GExperts. Again.

Source: [WayBackDisplay and edit keyboard macros with GExperts – twm’s blog

Via: [WayBack] The GExperts Macro Library expert can now display and edit keyboard macros that have been recorded in the IDE. – Thomas Mueller (dummzeuch) – Google+

–jeroen

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

Powershell Get-AppxPackage > List.txt … Get-AppxPackage Advertising | Remov…

Posted by jpluimers on 2017/03/13

[WayBack]   Microsoft Is Spamming Windows 10 File Explorer With Ads For OneDrive Storage – Slashdot… – Joe C. Hecht – Google+ has steps to find and remove the packages you do not want to:

Powershell
Get-AppxPackage > List.txt
...
Get-AppxPackage Advertising | Remove-AppxPackage
Get-AppxPackage bingfinance | Remove-AppxPackage
Get-AppxPackage bingnews | Remove-AppxPackage
Get-AppxPackage bingsports | Remove-AppxPackage
Get-AppxPackage bingweather | Remove-AppxPackage

Background info at [WayBackMicrosoft Is Spamming Windows 10 File Explorer With Ads For OneDrive Storage – Slashdot

–jeroen

Posted in Power User, Windows, Windows 10 | 2 Comments »

Converting playlists both ways between Google Play Music and Spotify

Posted by jpluimers on 2017/03/10

–jeroen

via: Ich habe aus Gründen ein kleines Skript geschrieben, das Playlisten von Google Play Music zu Spotify überträgt. Klappt ziemlich gut und vermeidet einige… – Kristian Köhntopp – Google+

Posted in Google Play Music, Media Streaming, Power User, Spotify | Leave a Comment »

YouTube to MP4 & MP3 Converter and Video Download – ClipConverter.cc

Posted by jpluimers on 2017/03/10

Every now and then I want to download or play a (fragment of a) YouTube video.

This is what I use to grab the video as music: YouTube to MP4 & MP3 Converter and Video Download – ClipConverter.cc

Then I use Audacity to create fragments.

–jeroen

Posted in Audacity, Audio, Media, Power User, SocialMedia, YouTube | 2 Comments »

Computerphile Mike Pound is now on GitHub – mikepound/mazesolving: A variety of algorithms to solve mazes from an input image

Posted by jpluimers on 2017/03/09

I love Computerphile. One of their presenters is Mike Pound and he is now on GitHub as mikepound

His repository is for the beow video on Maze Solving.

The repository mikepound/mazesolving: A variety of algorithms to solve mazes from an input image also has a Wiki where contributions are being discussed: Home · mikepound/mazesolving Wiki

–jeroen

Read the rest of this entry »

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

PowerShell: when Format-Table -AutoSize displays only 10 columns and uses the width of the console when redirecting to file

Posted by jpluimers on 2017/03/09

Lets start with the second problem: There are various ways to redirect PowerShell output to a file.

  • Shell redirect with a greater than sign (>) to create/overwrite output or two greater than signs (>>) to append output.
  • Use Out-File [WayBack] with a filename and either -FilePath (default, similar to >) or -Append (similar >>).

I write “similar” as they are not fully equivalent. That’s where Format-Table [WayBack] with the -AutoSize parameter comes in (with or without a -Wrap parameter).

Apart from Format-Table displaying only 10 columns by default (see below), the -AutoSize will change columns presentation depending not just on the -Wrap parameter but also to the total width it thinks it has available.

Useful Format-Table parameters

First the representation:

Read the rest of this entry »

Posted in CommandLine, Development, Power User, PowerShell, PowerShell, Scripting, Software Development, Windows | 3 Comments »

ShellCheck – shell script analysis tool

Posted by jpluimers on 2017/03/09

This is golden: ShellCheck – shell script analysis tool.

It checks your shell scripts, either on-line or off-line (brew install shellcheck for Mac, apt, etc for Linuces)

–jeroen

via: regex – Read file line by line with bash script – Stack Overflow

Posted in bash, Development, Scripting, Sh Shell, Software Development | Leave a Comment »

Using Delphi nextgen compilers … https://xkcd.com/303/ some arguments to have both for the Win32 platform

Posted by jpluimers on 2017/03/08

Last week there was a nice poke by Stefan Glienke around the Delphi nextgen compiler being used for the upcoming Intel x64 Linux support in Delphi (yes, no Arm there, hopefully somewhere in the future) at [Archive.isUsing Delphi nextgen compilers … https://xkcd.com/303/

It resulted into a nice thread of strengths and weaknesses of the classic and nextgen compilers.

I’m emphasising a long term wish for the Win32 platform to have two compilers: a classic one and an LLVM nextgen one.

Reasons include this:

  • Various compiler architectures can emit code for the same end-platformm: Kylix Linux x86 support uses the classic compiler, new Linux x64 support is using the LLVM nextgen compiler
  • Debugging non-Win32 (x86 on Windows) is slow and buggy at best
  • LLVM nextgen compiler takes about 2 orders of magnitude longer than the classic compiler
  • the classic compiler has various optimisation deficits for about 2 decades and won’t be fixed
  • the LLVM nextgen compiler has many more optimisation opportunities than the classic compiler
  • the LLVM nextgen compiler supports zerobased strings and ARC which are almost impossible to debug because of the debugger issues so writing truly cross platform code using Delphi is a drag

So, please please please Delphi team: provide an LLVM nextgen compiler for the Win32 platform.

via: [Archive.isUsing Delphi nextgen compilers … https://xkcd.com/303/

Recommended video: [WayBack] The recent next gen compiler debate reminded me of this nice talk.This is about c++ but it shows off nicely what a high quality compiler can achieve in terms of optimisation… – Christoph Hillefeld – Google+

–jeroen

Read the rest of this entry »

Posted in Delphi, Development, Software Development | 1 Comment »

node.js – a nightmare to get started. Did I try the wrong technology for my problem?

Posted by jpluimers on 2017/03/08

Most of my web-stuff is on Apache. Which works fine, has TLS/SSL enabled, etc.

But I wanted to do server-side JavaScript. Which somehow is a forrest without trees, or a nightmare to get started, especially on OpenSuSE.

First of all, virtually all examples explain how to run node as a script. But none explain where to save it, how to run it as a service (and restart when it crashes: it will crash) or how to run multiple sites under it. And the scripts seems to listen to a TCP port by themselves so they operate as a full server by themselves. Nice for a fully fledged portal, but not for some one-offs.

Some links below hopefully will get me re-started later on, but for now, I’ve given up: the out-of-the-box experience is totally non-intuitive.

Maybe what I really want is something else: I want JavaScript stuff that normally renders a page in the browser through the dom to run server side so I can run XMLHttpRequest to various places without bumping into CORS stuff but still render a page DOM.

If you know a better way to do what I want (serving small mostly single-page scripts written in an easy to debug/trace language) let me know.

So basically work around this:

XMLHttpRequest cannot load http://myApiUrl/login. No
'Access-Control-Allow-Origin' header is present on the requested
resource. Origin 'null' is therefore not allowed access.

Read the rest of this entry »

Posted in *nix, Apache2, Development, JavaScript/ECMAScript, Linux, openSuSE, Power User, Scripting, Software Development, SuSE Linux | 1 Comment »