How to exclude files from Explorer in VSCode

Visual Studio Code displays the files of the currently open workspace or folder in an Explorer on the left. Sometimes, you may want VSCode to exclude certain files from the Explorer.

To do that:

  • Go to File → Preferences → Settings.
  • If you want to exclude for all projects, open the User Settings. If you want to exclude only for the current project, open the Workspace Settings.
  • Add a files.exclude entry like this:
"files.exclude" : {
    "Makefile": true,
    "*.html": true,
    "build/*": true

As shown above, filenames and globbing are allowed.

Tried with: Visual Studio Code 1.25.1 and Windows 10


How to create or delete user in Linux

  • To create a new user named joe:
$ sudo useradd joe

The above command does not create a home directory for the new user.

  • To create a new user named joe and create a home directory for him:
$ sudo useradd -m joe
  • To delete a user named joe:
$ sudo userdel joe

The above command does not remove the files owned by the user.

  • To delete a user named joe and remove all the files owned by him:
$ sudo userdel -r joe

Tried with: Ubuntu 16.04

Microsoft Outlook 2016 for Dummies

For most of my life, email was managed in either one of the free email providers (Yahoo and later Gmail) or POP/IMAP that I pulled into a simple email client. So, when I had to work with Microsoft Outlook recently, I was completely lost. Outlook when combined with Exchange is a powerful tool that handles email, calendars, meetings, tasks and notes for individuals and organizations. Quite frankly I was lost in the complex GUI of Outlook and all its features.

To get a quick idea of what is possible in Outlook and how to use it I turned to a familiar friend: Microsoft Outlook 2016 for Dummies. People like to ridicule the Dummies series of books, but Dan Gookin and his kind made software accessible to a lot of people like me. Dummies books, especially by veteran Dummies authors, are funny and fun to read. Bill Dyszel thankfully is no different, having been the author of all editions of the Outlook Dummies books.

This book covered all the important applications of Outlook 2016, only missing out on the notes feature. Earlier chapters cover the basics of using a email client, which can be skipped. Later chapters got into what I was looking for: Outlook specific features, scheduling, tasks and features related to Exchange. On the way I learnt a lot of tips and tricks which I probably would not have discovered otherwise. The only gripe I have about this book are that there are no cartoons by Rich Tennant. This is an easy and fun read full of screenshots.

Rating: 4
ISBN: 9781119076889

Some of the Outlook features I learnt from this book:

  • You can drag and drop anything to anywhere in the UI. For example, drag an email into the calendar icon at the bottom-right to create a calendar event.
  • Clean Up feature on email conversations and email folders can be used to move out emails that repeat in conversations to a specific folder. Reduces the number of emails you need to read.
  • Quick Steps are actions that you can create and add to the ribbon or right-click menu. For example, move to a certain folder is a builtin Quick Step.
  • Quick Parts can be used to reinsert repeatedly used text into emails.
  • You can create your own groups in contacts.
  • Appointments and events are different when it comes to calendars.
  • You can add holidays calendar for any country into your calendar.
  • Regenerating task is a type of task that recur after a task is completed.
  • Items of any tabular view of data can be grouped by one of the fields. Right-click on the column header and choose Group by.
  • Default categories in emails have colors and color names. These color names can be renamed to something more meaningful.
  • Merge to email can be used to create email mailers addressed to the receiver.
  • Scheduling assistant can be used to compare schedules of attendees. Suggested times at the bottom-right shows open timeslots.
  • When responding to a meeting request, you can propose a new time.
  • Voting feature is similar to meeting request, but to take count from a group of people.
  • Use Tracking to check responses from folks on meeting requests and votes.
  • You can assign task to someone else.
  • Out of office message can be set for your vacations with a start and end date. You can have different message for folks inside and outside your organization.
  • MailTips shows by colors and tooltips if any of the folks being addressed in email are on vacation.
  • Quick Access toobar can be customized by adding any function you want.

How to build and use GDB

Ubuntu uses quite an old version of GDB. When I need to use an updated version of GDB, here is what I do:

  • Obtain the newer version of GDB by downloading its .tar.gz from here. Unzip it.
  • Configure and build it:
$ ./configure
$ make
  • The newly built GDB executable can be found at gdb/gdb in your current directory. You can copy it or invoke it directly to use it.

Tried with: GDB 8.1 and Ubuntu 16.04

How to skip stepping into files in GDB

Visual Studio C++ debugger has a feature called Just My Code which helps you to step over external code, like that in STL, and only step through the code of your own project. GDB does not have this feature at the time of this writing.

However, GDB has a skip -gfile feature that can be used in a similar way. You pass this command a glob pattern of files to ignore during stepping.

For example, to skip stepping into the source files of STL implementations on my system I use:

skip -gfile /usr/include/c++/5/bits/*

This works because the STL implementation files on my system are located at the above path.

Note that this feature requires GDB 7.12 or later.

Reference: GDB Skipping over files and functions

Tried with: GDB 8.1 and Ubuntu 16.04

makeinfo not found error


I was trying to build a tool from source. When I ran ./configure, it complained with this error:

makeinfo: not found


The confusing part here is that this makeinfo has nothing to do with make. I found that it belongs to the package texinfo. The error went away after I installed that package:

$ sudo apt install texinfo

Tried with: Ubuntu 16.04

How to create and use multiple P4 workspaces

It is sometimes useful to have more than one workspace in Perforce. I have found that this gives me more freedom to work on multiple bugs or features at the same time for the same branch.

  • To create a new workspace, we create a new P4 client. To do this, you need to provide a new client name:
$ p4 client my_client_2

This opens the configuration of a new client named my_client_2 in your favorite editor. Here you can provide the root directory for this client and mappings as your normally would. Save and exit the editor.

  • Create the root directory path you specified in the new client config:
$ mkdir -p /home/joe/p4_workspaces/my_workspace_2
  • You need to set this client name as the current client to inform P4 that its commands apply to this client. You do this by setting the P4CLIENT environment variable:
$ export P4CLIENT=my_client_2

Now you can run commands such as sync and they should work in this new workspace.

  • Switching between two or more P4 workspaces gets onerous if you need to set the above environment variable every time. One solution to overcome this is to create a P4 config file in the root directory of every workspace with the environment variables you want applied for that workspace.

Create a file named .p4config in the root directory of the new workspace, /home/joe/p4_workspaces/my_workspace_2 in this example, with the environment variables and their values you want to set:


Now when you are at any child directory of the new workspace, P4 will know that it has to use the above client config for its commands. You need to place such config files at the roots of all your workspaces to have a pleasant working experience when moving between workspaces.

Okular does not allow review on PDF


I sometimes use Okular to annotate a PDF using highlighting, drawing boxes, underlining or writing notes. This feature is called review in Okular. However, I noticed that this review feature is disabled on certain PDF files. I did check the filesystem and the file was not readonly.


Turns out that when a PDF has DRM options set in it, Okular obeys those limitations by default. Thankfully, this can be turned off easily. Go to Settings → Configure Okular → General and uncheck the Obey DRM limitations option. You will need to restart Okular after you apply this. You will now be able to review the PDF.

Tried with: Okular 0.24.2 and Ubuntu 16.04

JIRA 7 Essentials

JIRA seems like a great issue management system. However, I found myself terribly inept when it came to using its features, especially because I was not familiar with agile software development practices. Wanting to get a quick introduction to JIRA I read JIRA 7 Essentials by Patrick Li. This short read is in its 4th edition and this latest edition covers the latest JIRA 7.x, which is also what I wanted to learn about.

The book is written for JIRA administrators, project managers and normal users. Administrators are the folks who install JIRA and configure it. Managers create projects and control the permissions for normal users. About half the chapters in the book covers topics for these two categories of users and I could conveniently skip those cause I am neither. The chapters for normal users covered everything I was hoping it would.

Chapter 2 covered the main project interface and it features. I found Chapter 3 on Agile Projects very useful since it showed how to use JIRA for both SCRUM and Kanban style of working. Chapter 4 was the most important one for me because it covered issues which are what you primarily work with in JIRA. Finally, Chapter 10 explained how to use both the simple and advanced JQL methods to search for issues and save and use them across JIRA.

I learnt a lot of useful things from this book that I would not have in daily usage of JIRA. For example, JIRA has keyboard shortcuts in the issue UI for the most common actions. I was also not aware of the share, export, vote and time log features in issues. I also learnt how to create SCRUM and Kanban boards for my epics and sprints. Also useful was the addition of gadgets to my dashboard. I found myself comfortable creating boards, saved search filters and with JIRA jargon in general. All in all, I got a satisfying bang-for-buck for the half day I spent leisurely reading through this book. If you are new to JIRA, I highly recommend getting a book like this one to learn how to use it effectively. In case you have access to O’Reilly Safari, this book can be accessed there.

p4 changelist cheatsheet

A changelist in Perforce is identified by an unique number and contains a list of modified files and a description (among other things). When you inform Perforce that you have created a file, deleted a file or modified a file, such changed files are by default added to a default changelist that has no changelist number.

  • To create a changelist by grabbing the files in the current default changelist:
$ p4 change

This opens your default editor to a temporary text file showing an empty description and the list of files from the default changelist. You have to use the editor and provide a description. If you do not want some of the files to be in the changelist you are creating, you can delete those lines in the editor. Once you save the file, the changelist is created with a unique number identifying it. After this command ends, p4 prints out its changelist number, say 123456.

Note that this command moves all the files in the default changelist to the new changelist you created. That is, unless you removed a few of them while creating the changelist.

  • To view all the details of an existing changelist 123456:
$ p4 change -o 123456
  • To add a new file to an existing changelist 123456:
$ p4 reopen -c 123456 joe/foobar.cpp


  • To view the description of a changelist:
$ p4 describe 123456
  • To edit the description of an existing changelist 123456:
$ p4 change -u 123456


  • To shelve the files from a changelist 123456:
$ p4 shelve -c 123456
  • To list the files in a shelved changelist 123456:
$ p4 describe -s -S 123456
  • To update a shelved changelist 123456 with newly updated files from disk:
$ p4 shelve -f -c 123456
  • To update a shelved file with a particular changed file from disk:
$ p4 shelve -f -c 123456 foobar.cpp
  • To delete the shelved files of a changelist:
$ p4 shelve -d -c 123456
  • To delete a few files from a shelved changelist 123456:
$ p4 shelve -d -c 123456 joe/foo.cpp joe/foo.h


  • To unshelve the files that were shelved from a changelist 123456 back to the same changelist:
$ p4 unshelve -s 123456 -c 123456
  • To unshelve the files that were shelved from a changelist 123456 back to a different changelist 789012:
$ p4 unshelve -s 123456 -c 789012
  • To unshelve the files that were shelved from a changelist 123456 back to the default changelist:
$ p4 unshelve -s 123456


  • To create a changelist from the default changelist and submit it to your branch in the depot:
$ p4 submit
  • To submit a changelist 123456 to your branch in the depot:
$ p4 submit -c 123456