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, 2016

OpenVPN – How to connect to Access Server from a Mac – basically says use Tunnelblick

Posted by jpluimers on 2016/03/18

Nice summary for just saying “Use Tunnelblick

This howto article explains how to obtain and setup a Mac openvpn client to connect to the OpenVPN Access Server.

Source: How to connect to Access Server from a Mac

–jeroen

Posted in Apple, Mac, Mac OS X / OS X / MacOS, Mac OS X 10.5 Leopard, Mac OS X 10.6 Snow Leopard, Mac OS X 10.7 Lion, MacBook, MacBook Retina, MacBook-Air, MacBook-Pro, MacMini, OpenVPN, OS X 10.11 El Capitan, OS X 10.8 Mountain Lion, OS X 10.9 Mavericks, Power User | Leave a Comment »

TP Link ER5120 limitations: lacking and disturbing features

Posted by jpluimers on 2016/03/18

Mikrotik have statistics and way more features. The most lacking or disturbing features on the TP-LINK (none of which are mentioned in their documentation):

  • The documentation mentions you can enable Enable Bandwidth Based Balance Routing then select the WAN connections to combine but that doesn’t work at all, even if you follow the bandwidth steps carefully.
  • Balanced Routing work when you perform these steps as mentioned at time point 457 in this video https://youtu.be/YDUfP8a5zNY
    • Enable Application Optimized Routing
    • Enable Bandwidth Based Balance Routing
  • Virtual-Server table can only handle 32 incoming port redirects; you get the message “Cannot add more than 32 Virtual Server entries” like in the picture below.
  • No IPv6 support
  • No way to show any statistics as graphs.
  • Every once in a while the web interface becomes really really slow which only a reboot can resolve.
  • You cannot have one of the WAN connections have multiple IP addresses.
  • Local DHCP clients are not added to the DNS proxy which means you cannot resolve them by name.
  • TCP Sequence Prediction: Difficulty=0 (Trivial joke)
  • You cannot configure how often to check WAN connections

On the other hand: when you do balanced routing indeed bundles all the WAN connections, configured Virtual Servers do work well and WAN specific routing settings to what they need to.

Source: Gigabit Load Balance Broadband Router TL-ER5120 – Welcome to TP-LINK

Verdict: fine for home use, not good for real multi-WAN use.

–jeroen

Read the rest of this entry »

Posted in Internet, Power User, routers | 1 Comment »

English…

Posted by jpluimers on 2016/03/18

After getting the pronunciation of bear wrong for the umpteenth time and searched for bear beer tear pear peer and more, I came across the below poem often wrongly attributed to George Bernard Shaw but in fact written by a Dutch guy: Gerard Nolst Trenité and called The Chaos.

Some videos: Bernard Shaw Poem English Pronunciation.

Here is the poem in full:

Read the rest of this entry »

Posted in Fun, Quotes | Leave a Comment »

The Default magic function in Delphi

Posted by jpluimers on 2016/03/17

Stefan Glienke worded it perfectly: Default(typeIdentifier) is a “magic” function that is implemented into the compiler and causes it to generate the correct code – like for records with managed fields it generates a call to FinalizeRecord and some instructions to zero the remaining fields.

Source: I know I can write MyRecordVar := Default(TMyRecordType) because I asked a qu…

–jeroen

Posted in Delphi, Delphi 10 Seattle, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Delphi XE8, Development, Software Development | Leave a Comment »

Reminder to self: app.config and “ORA-12154: TNS:could not resolve the connect identifier specified”

Posted by jpluimers on 2016/03/17

When you have one app.config for your whole set of DTAP environments (develop/test/acceptance production), every once in a while you get this error:

ORA-12154: TNS:could not resolve the connect identifier specified

For this particular setup, it means the replacement of parameters in the app.config with actual values from the DTAP went wrong (or was missing). For that we’ve some steps in both the PreBuildEvent and PostBuildEvent of the .csproj file:

PreBuildEvent:

del "$(ProjectDir)$(TargetFileName).config"
copy "$(ProjectDir)app.config" "$(ProjectDir)$(TargetFileName).config"

PostBuildEvent:

powershell -noprofile -file Replace-Parameter.ps1 -Path "$(TargetDir)$(TargetFileName).config"

The PreBuildEvent looks like it is not needed, but sometimes Visual Studio forgets to perform the copy action.

–jeroen

Posted in .NET, .NET 2.0, .NET 3.0, .NET 3.5, .NET 4.0, .NET 4.5, .NET ORM, C#, C# 2.0, C# 3.0, C# 4.0, C# 5.0, C# 6 (Roslyn), Database Development, Development, NHibernate, OracleDB, Software Development | Leave a Comment »

assembly:InternalsVisibleTo: .net – C# “internal” access modifier when doing unit testing – Stack Overflow

Posted by jpluimers on 2016/03/16

It seems I always forget about the InternalsVisibleTo attribute which allows you to specify which external assembly can see your internal types and type members:

Internal classes need to be tested and there is an assembly attribute:

using System.Runtime.CompilerServices;
[assembly:InternalsVisibleTo("MyTests")]

Add this to the project info file, e.g. Properties\AssemblyInfo.cs.

Thanks Eric Schaefer for that answer.

–jeroen

via .net – C# “internal” access modifier when doing unit testing – Stack Overflow.

Posted in .NET, .NET 2.0, .NET 3.0, .NET 3.5, .NET 4.0, .NET 4.5, C#, C# 2.0, C# 3.0, C# 4.0, C# 5.0, C# 6 (Roslyn), Development, Software Development | Leave a Comment »

Bug squasing: A heisenbug is not your average bug.

Posted by jpluimers on 2016/03/15

I took the liberty to make an English translation of this very interesting German story about squasing an Heisenbug from Kristian KöhntoppHeisenbugsquashing bei +SysEleven: Sechs Monate Kernels crashen, aber jetzt isser tot….

Don’t forget to read (translated) comments in the original thread. Very interesting read!

I agree it’s in the Heisenbug category given “Time can also be a factor in heisenbugs, particularly with multi-threaded applications.”.

Anyway, the translation and original:

English:

Read the rest of this entry »

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

Fritz!Box 7360 and 7490: static routes over VPN don’t work

Posted by jpluimers on 2016/03/15

I’ve tried the below on a Fritz!Box 7490 configuration and it fails as well.

The case is that I’ve a VPN (see Getting Fritz!Box LAN-LAN VPN to work) between a Fritz!Box 7360 (having internal IP 192.168.24.1) and a Fritz!Box 7490 (having internal IP 192.168.71.1). This is how it looks from the Fritz!Box 7360 side:

Name Address in the Internet local network remote network
80.100.143.119 80.100.143.119 192.168.24.0/24 192.168.171.0/24

On the 192.168.171.0/24 side of things, the internal IP of the 80.100.143.119 router is 192.168.171.1. Inside the 192.168.171.0/24 network is is another router (192.168.171.22) having an internal 192.168.71.0/24 network.

Basically I want to tell the Fritz!Box 7360 (at IP 192.168.24.1) that there is an internal route to 192.168.71.0/24 via 192.168.171.22.

I found and read Accessing multiple IP networks behind a FRITZ!Box over VPN connection between two FRITZ!Boxes | FRITZ!Box 7360 | AVM International.

Based on it, I wanted to add this route on the 192.168.24.1:

Static IPv4 Route

IPv4 network 192.168.71.0
Subnet mask 255.255.255.0
Gateway 192.168.171.22
Enabled X

When you do that, you get this error message:

An error occurred.
Error description: The route is illegal.
Please enter your data again. If the error occurs again, please consult AVM Support.

How can I get this route to work?

–jeroen

Posted in Fritz!, Fritz!Box, Internet, Power User | 1 Comment »

git-extras/Commands.md at master · tj/git-extras

Posted by jpluimers on 2016/03/15

[WayBack] git-extras is awesome: it adds many [WayBack] useful commands to git. Like [WayBack] git ignore and [WayBack] git-info.

For instance, this adds README.md~ to the .gitignore file:

git ignore README.md~

It makes command-line git much more usable, even so much that it lessens the needs of SourceTree and other UIs tools.

You can get it at the GitHub repository [WayBack] tj/git-extras.

Lots of help is at [WayBack] git-extras/Commands.md: it explains all the commands that git-extras adds.

Thanks [WayBack] nifr for posting about git-extras at [WayBack] Is there an ignore command for git like there is for svn? – Stack Overflow.

–jeroen

 

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

Delphi: disable or change your welcome page to not use the Embarcadero site (as that site has been hacked twice this weekend)

Posted by jpluimers on 2016/03/14

Initial hack

Initial hack – image via the forums server.

This weekend, the Embarcadero web site was hacked by AnonCoders. Not once (see also [WayBack] G+ link and [WayBackDelphiPraxis link and [WayBackimage) but at least twice (see also [WayBackG+ link and [WayBackimage and [WayBackDelphi Praxis link and [WayBackimage) where the initial hacked simple text “Hacked By AnonCoders ~ Cyber Caliphate” after having been reverted back to the site – hopefully by Embarcadero staff – was replaced with [WayBack] more graphical content later on.

Hack presenting itself in the IDE

Hack presenting itself in the IDE – image via the forums server.

The Welcome Page inside the Delphi IDE uses the Embarcadero web site, so the Delphi IDE Welcome Page was also affected (see also [WayBackthis G+ link).

Because the IDE uses this on-line content, potentially any code could be executed inside the IDE (apart from that page being loaded over http, so any man-in-the-middle could abuse this, but I digress). This imposes a security risk as many developers run the IDE from accounts having more rights than the average user.

Read the rest of this entry »

Posted in Delphi, Delphi 10 Seattle, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Delphi XE8, Development, QC, Software Development | 13 Comments »