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 2,465 other followers

Archive for April, 2020

How to pin either a Shortcut or a Batch file to the new Windows 7, 8 and 10 Taskbar and start menu? – Super User

Posted by jpluimers on 2020/04/29

This nailed it: way easier than all the alternatives involving VB scripts, registry keys and Group Policy Editors.

  1. Create a shortcut to your batch file.
  2. Get into shortcut property and change target to something like: cmd.exe /C "path-to-your-batch".
  3. Simply drag your new shortcut to the taskbar

Source: [WayBackHow to pin either a Shortcut or a Batch file to the new Windows 7, 8 and 10 Taskbar and start menu? – Super User

The trick is step 2. After that you can modify back your shortcut to just the batch file.

–jeroen

Posted in Batch-Files, Development, Power User, Scripting, Software Development, Windows, Windows 7 | Leave a Comment »

Side by Side user scoped .NET Core installations on Linux with dotnet-install.sh – Scott Hanselman

Posted by jpluimers on 2020/04/28

For my link archive: [WayBack] Side by Side user scoped .NET Core installations on Linux with dotnet-install.sh – Scott Hanselman

Via [WayBack] DotNetKicks on Twitteru: „Side by Side user scoped .NET Core installations on Linux with  by @shanselman  #aspnet via @DotNetKicks“

–jeroen

Posted in .NET, .NET Core, .NET Core, .NET Standard, Development, Linux, Power User, Software Development | Leave a Comment »

Migrating to python 3: adding parenthesis to print calls and getting rid of printf style formatting

Posted by jpluimers on 2020/04/28

There is still so much Python 2.x stuff on the web, and I’m slowly moving what I have to Python 3.

These links are good starts for print calls and string formatting:

–jeroen

Posted in Development, Python, Scripting, Software Development | Leave a Comment »

GitHub – pyscripter/pyscripter: Pyscripter is a feature-rich but lightweight Python IDE

Posted by jpluimers on 2020/04/28

Just in case I ever need to develop Python scripts on Windows (nowadays it’s mostly on Linux/BSD based systems):[WayBack] GitHub – pyscripter/pyscripter: Pyscripter is a feature-rich but lightweight Python IDE.

If you like that, you can (also) help with this project: [WayBack] PyScripter localization Translate PyScripter into your own language.

Via: [WayBack] The PyScripter IDE, which is written in Delphi is looking for translators. We have set up a translation project on transifex.com and would be happy if s… – Lübbe Onken – Google+

–jeroen

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

KiTTY auto-reconnect ssh tunnel so you can RDP from remote machine into local one

Posted by jpluimers on 2020/04/27

I needed this equivalent in KiTTY while also keeping the connection alive:

ssh -o "ExitOnForwardFailure yes" -R :3389:127.0.0.1:3389 

Here, (via [WayBack] SSH options, Port Forwarding over SSH, Keepalives – zwilnik), -R Specifies that the given port on the remote (server) host is to be forwarded to the given host and port on the local side. This works by allocating a socket to listen to port on the remote side, and whenever a connection is made to this port, the connection is forwarded over the secure channel, and a connection is made to host port hostport from the local machine.

This is unlike most port forwarding examples which shows you how to forward a local port to a remote one (for instance [WayBack] Portforwarding with SSH (Putty)).

 

I wanted this on Windows, but auto connect, and not depend on OpenSSH. So I used the portable edition of [WayBack] Download KiTTY., which is a PuTTY derivative with more features.

With OpenSSH it is easier, but requires either Windows 10 (having it pre-installed) or an OpenSSH installation. How simple? This simple: [WayBack] openssh – How do I keep SSH connection alive on Windows 10? – Stack Overflow

The portable version of KiTTYensures all configuration is in configuration files (not the registry like the regular edition: [WayBack] KiTTY Session Configuration Location – Chase’s Notes)

I bumped into KiTTY because in another situation, I needed to execute a remote command and found [WayBack] ssh – How to run a remote command in PuTTY after login & keep the shell running? – Super User

Later I found other references as it can also auto-logon:

Kitty has a URL based update checker; for instance [WayBackwww.9bis.net/kitty/check_update.php?version=0.70.0.6 checks if a newer version than 0.70.0.6 is available. If you do not trust it, you can run that URL over TLS as well.

These screenshots seem to do just get the above configuration:

  1. Under “SSH”, in “Tunnels”
    • tick “Remote ports do the same (SSH-2 only)”
    • fill in a source port (that’s the remote port and will become the :3389: bit above)
    • fill in destination 127.0.0.1:3389 (that’s the local RDP port on your Windows machine)
    • tick “Remote”
    • tick “Auto”
    • click “Add” to get to the second screenshot

  2. Under connection:
    • Ensure “Seconds between keepalives” is larger than zero (I took 1)
    • Tick “Disable Nagle’s algorithm”
    • Tick “Enable TCP keepalives”
    • Tick “Attempt to reconnect on system wakup”
    • Tick “Attempt to reconnect on connection failure”
  3. On the “SSH” tab:
    • Do not enter a “Remote command” (seems unneeded on my system)

So for now, I can do without things like:

–jeroen

Posted in *nix, *nix-tools, Power User, ssh/sshd, Windows | Leave a Comment »

 
%d bloggers like this: