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

Archive for the ‘Power User’ Category

Mikrotik RouterOS scripting: for loops are a bit of getting used to

Posted by jpluimers on 2017/07/18

Earlier, I wrote “:for loops are a strange beast so I will elaborate on those in a separate post.” so now is the time to do that.

The :for loop documentation is very dense:

Command Syntax Description
for :for <var> from=<int> to=<int> step=<int> do={ <commands> } execute commands over a given number of iterations

So a for loop has these elements:

  • from=
  • to=
  • step=
  • do=

Luckily, the old RouterOS 2.7 documentation on loops (which they’ve revamped after Router OS 2.7 removing many useful examples) has this:

:for – It has one unnamed argument, the name of the loop variable. from argument is the starting value for the loop counter, tovalue is the final value. This command counts loop variable up or down starting at from and ending with to, inclusive, and for each value it executes the do statement. It is possible to change the increment from the default 1 (or -1), by specifying the stepargument.

[admin@MikroTik] > :for i from=1 to=100 step=37  do={:put ($i . " - " . 1000/$i)}
1 - 1000
38 - 26
75 - 13
[admin@MikroTik] >

You might think that from= the start value, to= the finish value and the loop won’t execute when step= a positive value and from= larger than to=. Or that without a step= the loop will always iterate in ascending order.

Wrong! And wrong!

So it’s time for some…

:for loop examples

Read the rest of this entry »

Posted in Development, Internet, MikroTik, Power User, RouterOS, routers, Scripting, Software Development | Leave a Comment »

Brand New Model F Keyboards – The Model M Predecessor: Mechanical Capacitive Buckling Spring Keyboards with NKRO

Posted by jpluimers on 2017/07/17

If it had function keys, I might have ordered it, but in case anyone is still interested: order before the end of July as they will likely not do a re-run of this unique project: [Archive.isBrand New Model F Keyboards – The Model M Predecessor: Mechanical Capacitive Buckling Spring Keyboards with NKRO.

Model F quality is much better than Model M, which is way better than anything manufactured after that. Just compare the spring mechanisms below.

via: [WayBackKeyboardfanaat gaat getrouwe reproducties IBM Model F leveren – Computer – .Geeks – Tweakers

What is the Difference between IBM Model M and Model F Key-Switches?

[WayBackWhat is the Difference between IBM Model M and Model F Key-Switches?

 

 

–jeroen

Read the rest of this entry »

Posted in Keyboards and Keyboard Shortcuts, Power User | Leave a Comment »

TomatoUSB – selectively save/restore NVRAM settings before/after upgrading

Posted by jpluimers on 2017/07/14

TomatoUSB recommends a NVRAM reset (or 30/30/30 reset) before and after upgrades.

This means you loose all your settings which causes a lot of people to not upgrade at all.

The steps to export/import are a bit vague as they depend on what you want to save.

It basically comes down to do this on the old configuration

nvram export --set

Save that output to a local file and then use a search tool searching for specific sections you want to restore.

After you restored the sections ensure you persist them:

nvram commit

This is what the TomatoUSB author usually searches for:

Read the rest of this entry »

Posted in Internet, Power User, routers, TomatoUSB | Leave a Comment »

SUSE 12.3 – How to auto start services…?

Posted by jpluimers on 2017/07/14

Old (somehow it was blocked in the post queue), but sometimes still relevant for more modern services as, well sysv versus systemd war still are not over yet…

Interesting: systemctl gives flaky results for many services.

chkconfig nfs
chkconfig nfs on

Source: [WayBack] SUSE 12.3 – How to auto start services…?

This is on my system:

revue:~ # systemctl is-enabled shellinabox
shellinabox.service is not a native service, redirecting to systemd-sysv-install
Executing /usr/lib/systemd/systemd-sysv-install is-enabled shellinabox
shellinabox  off
enabled
revue:~ # rcshellinabox status
Checking for service shellinabox                                                       unused
● shellinabox.service - LSB: shellinabox
Loaded: loaded (/etc/init.d/shellinabox)
Active: inactive (dead)
Docs: man:systemd-sysv-generator(8)
revue:~ # rcshellinabox start
redirecting to systemctl start shellinabox.service
revue:~ # chkconfig shellinabox
shellinabox  off
revue:~ # chkconfig shellinabox on
revue:~ # chkconfig shellinabox
shellinabox  on

–jeroen

Posted in *nix, openSuSE, Power User, SuSE Linux | Leave a Comment »

Cool Google stuff: Trivia Template for the Google Assistant

Posted by jpluimers on 2017/07/11

This is soo cool: [Archive.isTrivia Template to make Google Assistant trivia questionaires.

It reminds me of a project a few years back where we did a similar thing to create automated interviews.

The trivia template tool lets you build apps for the Google Assistant without writing a single line of code.

Source: [WayBackGoogle Assistant Trivia Template – Leon Nicholls – Medium

Via: [WayBack] Trivia Template: Nandini Stocker and I just launched a template tool to create trivia games for the Google Assistant. The template turns your questions and answers from a spreadsheet into a fully functioning game without writing any code… – Leon Nicholls – Google+

–jeroen

Posted in Development, Google, Google AI, Power User, Software Development | Leave a Comment »

Droste effect… best torrent sites – Google Search

Posted by jpluimers on 2017/07/11

Likely the Droste effect won’t last long: best torrent sites – Google Search and https://www.google.com/#q=best%20torrent%20sites both give this list at the top and a recursive link about stories with the search links at the bottom.

via many, including:

–jeroen

Read the rest of this entry »

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

3.6 GIG – Public-Mikrotik-Bandwidth-Test-Server – MikroTik RouterOS

Posted by jpluimers on 2017/07/10

Don’t abuse: 3.6 GIG – Public-Mikrotik-Bandwidth-Test-Server – MikroTik RouterOS [WayBack]

Primary btest server (for short high speed bursts):

Read the rest of this entry »

Posted in Hardware, Internet, MikroTik, Network-and-equipment, Power User, routers, WinBox | 6 Comments »

Happy #NoEmailDay – The case of the 500-mile email

Posted by jpluimers on 2017/07/07

Good reading on #NoEmailDay 2017: The case of the 500-mile email [WayBack] on how a sysadmin in the mid 1990s found the cause of not being able to send email further than roughly 500 miles.

The exact mile unit doesn’t matter as it was all approximation. Read the FAQ on the 500-mile email [WayBack]

–jeroen

via:

PS: some sendmail tricks from

Read the rest of this entry »

Posted in *nix, *nix-tools, Fun, Power User, sendmail | Leave a Comment »

Mikrotik RouterOS /ip firewall address-list timeout values sort-of documented

Posted by jpluimers on 2017/07/05

Thanks to ZeroByte answering at [Answered] Where are ip firewall address-list timeout values documented – MikroTik RouterOS [WayBack] which I edited a bit here:

I haven’t seen anything specific to the format of these time tokens, but the firewall add-to-address-list timeout is documented here:
http://wiki.mikrotik.com/wiki/Manual:IP … Properties…It seems to take the same format as any other similar duration-related input I’ve encountered:
  • a raw number is interpreted as seconds
You can specify a number as another duration with tokens:
  • s = seconds (default)
  • m = minutes
  • h = hours
  • d = days
  • w = weeks

A few aspects:

  • Tokens can combine be in any order
  • Whitespace is ignored

So these are all valid:

2s 2h 2w
1w2d3h4m5s
5s4m3h2d1w

  • Days and weeks just get added together. If you specify 1w8d, this is the same as 2w1d
  • The last value specified may be in h:m:s format or in h:m (omit seconds)
  • Interestingly, if you mix and match, they just get added:
    • “1d 2h 12:30” -> “1d 14:30:00”
  • Values larger than 536870911 seconds are stored and tracked but when displayed show as 0sec.
    (248 days, 13:13:55)
  • The maximum value is 4294967295 seconds (which is the maximum 32-bit value)
    This decodes to: 7101w3d6h28m15s as the largest value….
    (7101 weeks is ~136 years counting for leap years, by the way)

–jeroen

Posted in Development, Internet, MikroTik, Power User, RouterOS, routers, Scripting, Software Development | Leave a Comment »

How cool is that Hypercube Lego Server, featuring the powerful Xeon D-1540 on tiny and familiar Supermicro X10SDV-F motherboard – via: TinkerTry IT @ Home

Posted by jpluimers on 2017/07/05

It’s from a while ago, but they’ve likely updated the supported motherboards and storage by now.

How cool is that Hypercube Lego Server, featuring the powerful Xeon D-1540 on tiny and familiar Supermicro X10SDV-F motherboard | TinkerTry IT @ Home

–jeroen

Posted in Power User | Leave a Comment »