Windows Terminal: complete reference


Windows is the most popular PC Operating System in the world, and for good reason. Not only has Microsoft made the Operating system easy to use, but it has also blessed it with a gazillion of power-user-friendly features. Command Prompt, Windows Subsystem for Linux, and PowerShell were always good enough for advanced users. To make the whole command line programming system more streamlined, Microsoft released Windows Terminal. You can download and install the app from Microsoft Store.

Introduction

Windows Terminal is a terminal interface for command-line tools and shells, which allows users to put their favorite command-line applications under a single umbrella. It offers multi-tab support, personalized features — colored window, text formatting, and more — Unicode or UTF-8 character support, GPU-aided text rendering, and other noteworthy tools.

1. Productivity – Profiles

Windows Terminal lets you create multiple profiles for different shells. Essentially, you can configure these profiles in any way. I would cover some of the use cases to help you get started.

Steps to create new profile [more info]

  • Open the Windows Terminal application.
  • Click the drop-down button on the title bar.
  • Select the “Settings” option.
  • Click “Add new” option on the sidebar.
  • Type a name in the “Profile name” field.
  • Click the “Browse” button next to the Command Line field.
  • Select the CMD shell exe file and click “Open.”
  • Hit the “Save” button.
  • With that, you have added a new profile to the Windows Terminal.

Alternate, more advanced way is to click Open JSON file at the bottom left and edit the configuration file directly.

We would use the JSON file. Note that you might have to restart Windows Terminal to reflect changes on JSON. Each profile needs a unique GUID. You can either use the GUIDs exactly as follows or you can generate yours like following:

Generate GUID using PowerShell Core profile, showing my unique customization in Windows Terminal app

25+ Color Themes!

My code snippets would have references to these themes as an added bonus, if you would want to save countless hours creating and picking these color themes.

Subscribe to get access

Read more of this content when you subscribe today.

cmd.exe and PowerShell profiles

This probably is the most obvious one. Windows Terminal would come with this profile.

{
 "commandline": "cmd.exe",
 "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
 "hidden": false,
 "name": "Command Prompt"
},
{
 "commandline": "powershell.exe",
 "fontFace": "CaskaydiaCove NF",
 "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
 "hidden": false,
 "name": "Windows PowerShell"
}

PowerShell Core profile

PowerShell Core is a cross-platfrom (Windows, Linux and macOS) software. It has command-line shell, an associated scripting language and a framework for processing cmdlets. If you are new, please check out their home page.

{
 "commandline": "pwsh.exe",
 "fontFace": "CaskaydiaCove NF",
 "guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
 "hidden": false,
 "name": "PowerShell Core",
 "source": "Windows.Terminal.PowershellCore",
 "tabTitle": "PowerShell Core",
 "colorScheme": "SMYCK"
}

Anaconda Environments

We can create a custom profile with command line arguments to start a profile with specific Anaconda virtual environment. In other words, you can very easily create different profiles or tabs, for each Anaconda environment you have.

Subscribe to get access

Read more of this content when you subscribe today.

SSH Profile

When I was using AWS EMR or, AWS EC2 I had to use SSH prompt along with PuTTY. For authentication we would use ppk file and enable dynamic port forwarding. In principle Windows 10 has built in SSH client but for some reason, I ended up using a command line utility called Plink – from the same publisher of PuTTy.

{
 "commandline": "C:\\instals\\plink.exe -ssh -i %USERPROFILE%\\Documents\\data\\my-key.ppk -D 8088 ec2-user@xx.xx.xx.xx:xx",
 "cursorShape": "vintage",
 "guid": "{fc51cff4-926b-4287-b1a2-fa2f23dc78e5}",
 "hidden": false,
 "icon": "%USERPROFILE%\\Pictures\\icons\\rhel8.png",
 "name": "AWS EC2 Red Hat (RHEL8)"
},
{
 "commandline": "C:\\instals\\plink.exe -ssh -i %USERPROFILE%\\Documents\\data\\my-key.ppk -D 8088 hadoop@yy.yy.yyy.yy:yy",
 "cursorShape": "vintage",
 "guid": "{f8f0b31d-3ab5-49c7-b455-89dbfea31d14}",
 "hidden": false,
 "icon": "%USERPROFILE%\\Pictures\\icons\\aws.ico",
 "name": "AWS EMR SSH"
}

Git bash profile

If you have installed git bash, you can also create a profile for it.

{
 "commandline": "%USERPROFILE%\\AppData\\Local\\Programs\\Git\\bin\\bash.exe --cd-to-home",
 "cursorShape": "vintage",
 "guid": "{848fe68a-c7ab-4123-bbbc-bd24c792ca29}",
 "hidden": false,
 "icon": "%USERPROFILE%\\AppData\\Local\\Programs\\Git\\mingw64\\share\\git\\git-for-windows.ico",
 "name": "git bash"
}

Ubuntu Linux profile

If you have not already, follow these steps for installing Linux subsystem in Windows 10 and downloading a Linux distribution like Ubuntu from Microsoft Store: https://itsfoss.com/install-bash-on-windows/

{
 "colorScheme": "Ubuntu",
 "cursorColor": "#DD4814",
 "cursorShape": "filledBox",
 "fontFace": "Cascadia Mono",
 "guid": "{07b52e3e-de2c-5db4-bd2d-ba144ed6c273}",
 "hidden": false,
 "name": "Ubuntu-20.04",
 "source": "Windows.Terminal.Wsl",
 "icon": "%USERPROFILE%\\Pictures\\icons\\Ubuntu.ico",
 "useAcrylic": true,
 "acrylicOpacity": 0.85
}

2. Personalize – Oh my posh!

There is a very good chance that you have heard about this module.

Scott Hansekman’s YouTube video on how to set up Oh my posh

After you have completed the steps in the video above, and got it to work, you could download the themes and preview them using the following command. More documentation is available at: https://ohmyposh.dev/docs/.

$ Get-PoshThemes

If you are interested, you can download my very own custom theme for free at: https://gist.github.com/aarshtalati/085b9f757acb61242bbe8bd7c5829243.

How to communicate with an audience?


I strongly think that technical professionals’ ability to speak, write and the quality of idea (in that order) would be a significant factor in their success. So why is communication important? We live in an era of distractions, work from home, online conference meetings, etc. Humans have only one language processor. We do not know if everyone on the meeting across the wire implements rules of engagement as they would during an in-person discussion. Even during an in-person conversation, it is plausible for someone to be mentally absent.

The uniform code of military justice specifies court-martial for any officer who sends a soldier into battle without a weapon. Communication skills are nothing short of weapons for professionals.

Speech

If you go to conferences, I can almost guarantee that 9 out of 10 speakers would start their speech by saying “{Greetings} my name is {name} I am from {place} and this talk is about {topic}.” By repeating what you already know, the speaker is signaling you to catch up with emails on your laptop/phone or maybe make plans for your weekend. Second, “Umm … umm … aaah .. is the mic working? How much time have I got?” Not a great way to get uninterrupted attention from your audience.

Another example would be a social networking event. Most of the time, you walk up to a group of people hanging out and say, “Hi, I am {name}. I am from {place}. My interests are {hobbies}. I do {occupation}.” I bet it is just a matter of time before these people would walk away from you. How can you get them to engage with you in a conversation? If possible, use social networking tools (e.g., LinkedIn) to research the people you would be meeting and find common ground. e.g., Try to walk away from a stranger who tells you that they and you know someone in common! If we are to define the quality of communication, it could be defined as following. Here, I have used font size to emphasize the importance of each parameter.

Quality = f(Knowledge, Practice, Inherent talent)

When I deliver my presentation or speech, I generally start with an empowerment promise or a question that matters to the audience or a shocking factoid to captivate the audience. Example: A solar panel array covering an area of the Sahara desert only as big as the US state of New Mexico is capable of generating 100% of the entire world’s modern electricity needs. It would have approx 51.4 billion solar panels. I am sure that would make you re-think solar energy.

Another approach in a networking setting that is quite effective is storytelling because stories are about people! An adult version of “once upon a time.” For example, “In September last year, I was in this room with 150 people, and we were having a little conversation with one of the leading world experts on computer science. He said something to me that has me thinking ever since. He said something to me that changed what I think about what I think would be the future of the human race.” Suppose you can tell a story from your own life that connects you to why a particular topic is important to you. In business, how do you affect the quality of life of a customer? That’s what would make them trust you.

Recommendations

  • Use Graphics (Board):
    Gives a target to draw audience’s attention back to you if they have got out of the track on what you have been saying.
  • Use Props:
    Right props really carve a long lasting image on our memory. Remember Walter Lewin’s video from MIT?
  • Inspire audience:
    Exhibit passion about what you are doing.

Presentation

How many times have you seen a too busy presentation or the presenter is reading the slides? As a reminder, humans have only one language processor. So when the slide is too busy, the audience is likely to ignore what you are saying. Try to avoid distractions (funky backgrounds, etc.). Engaging with an audience and maintaining eye contact is far more important than making them watch the back of your head.

Slides should be condiments of what you are saying, not the other way around.

Within the first five minutes, take an opportunity to explain your vision and show that you have done “something” relevant to the topic.

The last slide

Titles like “Questions?”, “Conclusions”, “Collaborators”, “The End”, “Thank you”, “For details, see {link}”are common examples for the last slide. They all are awful. I do not recommend using any of these! Saluting the audience or saying “Ite, missa est” are far better ways, comparatively. I want to let the audience remember me by what I have done: My Contributions, which allows me to come full circle on my vision slide in the beginning. Alternatively, my final words often are a joke. So, when I finish, the audience thinks they had fun the whole time. 😂

In the end, I’d leave you with a YouTube video [link to the video] if you do a lot of public speaking on technical demos, presentations, etc.

Migrate Perforce to git(hub) repo


Assumptions

  • You have done your due diligence to compare the two (from price, speed, workflow, onboarding etc. perspectives) and have concluded that reasons to migrate Perforce to git are beneficial for you.
  • Word of caution. Do you have “large files”? Well, define “large”! Some cloud vendors set some limit for what is the maximum limit of your file could you upload to the cloud. Check out this Powershell script: Powershell.P4Sizes · GitHub

Migration

To prepare for surprises, plan ahead on how would you verify if the migration has succeeded!

Author
Continue reading “Migrate Perforce to git(hub) repo”

Employer Handbook 0


Often, we have an employee handbook. We never have one for employers, though. In this article, I try to share a boiler plate employer handbook.

  1. Always encourage craftsmanship, and hire people smarter than you.
  2. Employees don’t leave their companies. They leave their manager.
  3. Whether you hire a CEO, CFO, or a developer, ask the new hire to Continue reading “Employer Handbook 0”

UI Path Task Capture in 1 minute


What is it?

  1. Screenshot and documentation tool on Steroids.
  2. It can take a series of screenshots and generate documentation in Microsoft Word template.
  3. Just like Windows’ built-in Snip and Sketch or Snipping tool but, with Microsoft Paint & OCR capabilities.
  4. Installs locally, just like Snappy.
  5. This tool can spit out a skeleton for RPA developers.
  6. This is to RPA developer, what Gherkin/Cucumber is to a C#/Java developer.

Benefit hypothesis

  1. Target audience:

How to deal with spammers?


So it finally happened. You went to a conference for your employer or visited a webinar or a website … somehow, you willingly and consciously shared your email address and/or phone – because they require you to “check-in.” Fast forward three months, and now you are getting phone calls after phone calls from their marketing and their newsletter, for which you never signed up! You can ever so politely say that you are not interested in their product and unsubscribe from their marketing emails on the phone call. These actions should be the end of it. What do you think?

No, they were just getting warmed up!

I started getting more and more imaginary “follow up” phone calls and then emails to schedule “appointments” with me & my manager to buy their product. Despite how many times I would unsubscribe from their emails, or I would tell them that I was not interested – on the phone, it did not stop. A new marketing associate would call me and then tell me that he/she did not know the conversation I had in the past with one of their own. This company kept cold calling me for a few months. Boy, they were persistent!

But then I realized, if they keep doing this, it must be fun! Why should they have all the fun? 😀

The time had come when their tactics backfire. I collected the email addresses and the phone numbers of each associate, ever to communicate with me. It took me just a few minutes to set up an outlook rule to forward spam emails from their own company back to them. The kind of IP phone I use comes with an SDK. (SDK is an acronym for Software Development Kit, a software company would give you with a digital device to integrate with your computer program.)

Let the hacking begin!

The Social Network (2010)

The SDK documentation was not even close to being well documented. With some tinkering, I could programmatically monitor the incoming phone calls and place the calls. I wrote a pretty simple C# .NET Core worker service to call my computer program if the incoming number was on my blacklist. My background service simply answers the phone, mutes me, and starts calling the rest of the spammers from my blacklist.

The next time a blacklisted spammer called, sure enough, my “smarter than before” phone answered the call, started calling the rest of the spammers in a conference call and muted myself. By the time the spammer was greeting me, some of their fellow spammers had joined the conference call. They got confused. For a few days, they seem to think their phone lines got crossed. Some would hang up the phone, try again, only to fall into my trap, yet again. All I had to do was to make sure that my blacklisted phone numbers were up to date. Come on, I do not want them to miss out on the fun.

“‘I felt a great disturbance in the Force, as if millions of voices suddenly cried out in terror and were suddenly silenced.”

Obi-Wan, Star Wars

Now, I never have to let them know that there is warm blood on the other side of the line. It took the spammers a few days to realize that I was up to no good. I was never this much proud of my IT skills. 😉

Best VS Code ext & themes


Extensions:

Themes:

I am generally High Contrast kind of guy, who prefers the same for OS theme as well (just me) … but I might be a little bit inclined towards dark themes:

After high contrast, I prefer Phœnix Dark in particular for dark theme and GitHub Plus Theme for light theme. Themes like Popping and Locking Theme, Dracula Official overwhelm me with their colors.

AngularJS Tools


According to a sendesignz.com post