Posted by jpluimers on 2017/06/09
The locking tab of RJ45 plugs breaks very easily. Replace it by two nylon cable ties (aka zip ties), in minutes. IMPORTANT NOTES: – This must be regarded as a temporary “Mac Gyver” solution, for home usage. – Definitely not for IT staff! (no crimper? asking for one in the budget won’t get you fired!) – Before the tab breaks, consider protecting the plug.
Source: Repair a Broken Ethernet Plug – All
via: Now that’s very cool!! – Joe C. Hecht – Google+
Read the rest of this entry »
Posted in LifeHacker, Network-and-equipment, Power User | Leave a Comment »
Posted by jpluimers on 2017/06/08
The RouterOS scripting language you can use on Mikrotik device immediately shows it’s origin: the console.
- It is a statement oriented language where statement separators can be both semicolons and new-lines.
- You can use the \ at the end-of the line as line-continuation character effectively spreading statements over multiple lines.
As promised some links to questions I asked:
Some questions by others that were also extremely useful:
- Functions and function parameters – MikroTik RouterOS
new function syntax, much simpler than the old syntax in Functions in CMD Scripts – MikroTik RouterOS that hopefully someone someday will convert to the new syntax.
- Functions and function parameters – MikroTik RouterOS
:typeof can return “nothing”
- Functions and function parameters – MikroTik RouterOS
Fragment that adds all scripts named “Function.*” as :global functions upon system startup.
Declare those functions when you need them, just like in the nested-function example.
- run script from terminal – MikroTik RouterOS
this is in fact very simple:
it also has the benefit that the terminal does tell you on which line and column your script is wrong (Winbox does not show that during execution):

- [Solved] Use of externally defined global variables inside import scripts, – MikroTik RouterOS
It’s better to pass information to functions as parameters (named parameters make code a lot more readable than positional parameters).
- Return IP Octet Function – MikroTik RouterOS
Parses an IP octet and returns either a specific or all octets. More elaborate: Mikrotik Scripting – Function to Split an IP Address into an Array | Paper Street Online
Note you can use bitwise operators on octets.
- How do you clear a global variable? – MikroTik RouterOS
List all global variables using /system script environment
Unset a variable with a play :set variableName
- Array Pop Function – MikroTik RouterOS
- Array Push Function – MikroTik RouterOS
- Basic XML/string parser function – MikroTik RouterOS
Function getBetween(inputString, betweenStart, betweenEnd)
- Using :find command where string is not found – MikroTik RouterOS
:if ([:len [:find "abcd" "x"]] > 0) do={:put "Found";} else={:put "Not Found";};
- Manual:Configuration Management – MikroTik Wiki
When you upload a script over ftp and have it end with auto.rsc, then it is automatically being executed and logged. For instance a file called anything.auto.rsc will have the log written to anything.auto.log.
- I did it! Script to compute UNIX time! – MikroTik RouterOS
- Understanding scripting data types – MikroTik RouterOS
:typeof, nil, nothing, str, :parse vs new-style functions (:parse can be faster!)
- Simple HTTP GET? – MikroTik RouterOS
Some escaping required…
- It is not possible to exit or break a loop statement – MikroTik RouterOS so if you want to break a :for loop early, you have to recode it into a :while loop. You can
:return from a function when inside a loop, but that’s not the same (for instance compare C# break versus return or Delphi break versus exit).
- :for loops are a strange beast so I will elaborate on those in a separate post.
And a few observations:
–jeroen
Posted in Development, Internet, MikroTik, Power User, RouterOS, routers, Scripting, Software Development | 1 Comment »
Posted by jpluimers on 2017/06/07
I learned one of the reasons you might want to use functions instead of read-only properties from properties – How can I mark a property as deprecated in delphi? – Stack Overflow [WayBack]:
Delphi hinting directives: deprecated, experimental, library and platform cannot be used on properties but can be on other members (like fields, procedures and functions).
Since a read-only property is very much like a read-only field, but fields cannot be read-only it can make sense to replace the read-only property with a function. Then on the function you can place hint directives.
This can help enormously refactoring large code bases where – because of size – you cannot perform a certain replacement in one step.
–jeroen
Posted in Delphi, Development, Software Development | Leave a Comment »
Posted by jpluimers on 2017/06/07
When switching my DHCP to a Mikrotik CCR1009, both the AP7920 and AP7921 failed to get IP addresses. The APC7921 would look bounce between waiting and offered states like this:

The cause is the need of DHCP Option 43 (Vendor Class Identifier) specified in RFC2132 – based on [WayBack] RFC 2131 – Dynamic Host Configuration Protocol and [WayBack] RFC 1533 – DHCP Options and BOOTP Vendor Extensions – which I found first via these links:
Read the rest of this entry »
Posted in Development, Internet, MikroTik, Power User, RouterOS, routers, Scripting, Software Development | 3 Comments »
Posted by jpluimers on 2017/06/06
For automated installs that cannot have UI interaction:
The install is “per user” as it is a user-local application; it installs in %LocalAppData%\Programs\Fiddler\Fiddler.exe.
Docs
Note that Fiddler acts as a HTTP proxy. When Fiddler starts, it hooks itself into the default WinINET proxy (which is used by any tool using the WinINET API, including Edge, Internet Explorer, Chrome, but not FireFox).
If you kill your Windows machine before stopping Fiddler, it cannot restore the WinINET proxy, so you have to do that by hand (otherwise you cannot browse web pages any more).
Manual restore:
- Run
"C:\Windows\System32\rundll32.exe" shell32.dll,Control_RunDLL inetcpl.cpl,,4
- Press “LAN settings” (Dutch: “LAN-Instellingen”)
- Uncheck the proxy server checkbox “Use a proxy server for your LAN” (Dutch “Een proxy-server voor uw LAN gebruiken”)
- Confirm
- Close the control panel wizard
–jeroen
Read the rest of this entry »
Posted in Development, Fiddler, Software Development, Web Development | Leave a Comment »
Posted by jpluimers on 2017/06/06
The WAN sides of my Mikrotik CCR1009 are partly behind Fritz!Box routers that do NAT and contain a truckload of port-forwards.
A while ago, I wanted the CCR1009 to do PPTP as Fritz!Box 7360 and 7490: static routes over VPN don’t work (so I could only VPN to the WAN side of the CCR1009). However, it would not pass through the Fritz!Box from the outside.
It appears you need to forward both:
Maybe one day I will ditch the Fritz!Box 7490 and directly hookup the Mikrotik to the NTU: xs4all ftth en Mikrotik router – Google Groups.
But preferably I should follow Don’t use PPTP, and don’t use IPSEC-PSK either (via: CloudCracker blog)
–jeroen
via: VPNs einrichten mit PPTP – administrator.de: Achtung mit PPTP VPN Servern hinter NAT Firewalls !

Forward both PPTP TCP port 1723 and the GRE protocol
Posted in Fritz!, Fritz!Box, Fritz!WLAN, Internet, IPSec, MikroTik, Network-and-equipment, Power User, PPTP, routers, VPN | Leave a Comment »
Posted by jpluimers on 2017/06/05
Interesting:
As I always try to maximize the usage of new hardware I started to explore what is possible with this combination. In this post I will explain how you get access to your FRITZ!Box using ssh.
Source: FRITZ!Box tuning part 1: Enable remote access over ssh [WayBack]
–jeroen
Posted in Fritz!, Fritz!Box, Internet, Power User | Leave a Comment »
Posted by jpluimers on 2017/06/05
Without announcing an actual date, right before the weekend Embarcadero killed their [WayBack] QualityCentral publicly accessible and search engine indexed issue database.
So I wrote this on Google Plus:
Embarcadero just flushed down the drain man-decades of work and useful information. Mainly nilling the work done by their customers to document and inform about known issues, knowing search engines indexed it well and having some hope it would assist into maybe some getting resolved.
The documentation has not been updated and still references qc.embarcadero.com, for instance from [WayBack] docwiki.embarcadero.com/RADStudio/Tokyo/en/Quality_Central
They say the web service is still up, but that likely will die at the snap of a finger as well. Besides, these links mentioned in QualityCentral web services guide are dead too:
These still work though:
So all is left are memories from the past. And dead links from Stack Overflow, blogs and other sites to a defunct repository.
Dead links: q=-site%3Aqc.embarcadero.com+qc.embarcadero.com%2Fwc%2Fqcmain.aspx even from for instance EDN: q=”qc.embarcadero.com”+site%3Aedn.embarcadero.com
Luckily some of the links have been saved in the WayBack machine: https://web.archive.org/web//http://qc.embarcadero.com/
It would have been better if Embarcadero had put some time to archive everything there.
I doubt they will. There was a habit of reclassifying bugs in QC as “feature requests” which continues in Quality Portal (which requires login and is not indexed by search engines so has way less value).
[WayBack] And here is why I think twice before spending time to report feature requests to QP. And even bugs/unexpected behavior are regularly being sweeped under the carpet reclassified as new feature… – Stefan Glienke – Google+
Memories:
Oh well, life goes on and relying on one development tool or vendor is never a good idea.
–jeroen
Posted in Delphi, Development, QC, Software Development | 18 Comments »
Posted by jpluimers on 2017/06/05
Brilliant:
This is small tool that adds Attach and Detach option to contextual (aka right-click) menu of Virtual disk (vhd) files. That enables those operations to be done without trip to Disk Management console. Detach option is available on hard drive contextual menu also (if selected in options).
Source:
–jeroen
Posted in Power User, Windows, Windows 10, Windows 7, Windows 8, Windows 8.1, Windows Server 2012, Windows Server 2012 R2 | Leave a Comment »