Skip to content

Instantly share code, notes, and snippets.

You should change it by running chsh -s /path/to/the/shell/that/you/like and then logging out and logging in again. You should NOT do it by configuring the "Shells open with: Command (complete path):" setting in settings.

If you attempt to change it by configuring the "Shells open with: Command (complete path):" setting in settings but leaving your default shell as is (that is, not running chsh -s /path/to/the/shell/that/you/like), you will be in a world of pain. You will keep having inconsistencies between the behavior that you get on vs. the behavior of the (other) apps that you use, since the (other) apps that you use will honor the default shell configuration that's set by running chsh -s /path/to/the/shell/that/you/like. The "Shells open with: Command (complete path):" setting in settings is completely irrelevant for the (other) apps that you use.

By the way, an alternative to running chsh -s /path/to/the/shell/that/you/like is to:

  • Open Sys

If you wished that you had the ability of declaring the response body's types for your fetch calls beforehand (where you made the call), you can use the following fetch wrapper:

interface GenericResponse<T> extends Response {
  clone(): GenericResponse<T>;
  json(): Promise<T>;

export default async function genericFetch<T>(
 input: RequestInfo | URL,

Most likely, the AWS user that is associated with the app does not have API execution permissions. To fix this, perform the following steps. If you already have an AWS user, you can skip the first two steps. Note that the steps here are not necessarily the "best practices" as suggested by Amazon. Nevertheless, they are the most straightforward ones and shouldn't cause any problems:

  • Create an (any) AWS account. Note that the AWS account does not necessarily need to have any relation whatsoever with the account that you used to create your Amazon Marketplace.

  • Go to AWS Identity and Access Management Console (IAM) and create a user without any group memberships or attached policies whatsoever. Give a name of your choosing to the user.

  • Select the user that you've just created and expand the "Add permissions" dropdown menu and select "Add inline policy". On the editor that's just been launched, select JSON and replace its contents with the following:



All the information that you need are in the following links, in the given order:

  • [typescript-eslint installation]
  • [typescript-eslint configuration]
  • [eslint-plugin-prettier installation]
  • [eslint-plugin-prettier recommended configuration]
  • [TypeScript configuration]

The exact steps that you need to follow are:

  • mkdir project

Python 2

sudo apt install python-svn 

Python 3

sudo apt install python3-svn

You can't. There is a --no-experiments command line option but it doesn't work, neither on Chrome, nor on Brave, at least on macOS. Hence, your only practical option is to use Safari for such situations. This means that it makes sense to keep Safari as the default browser on Mac.

  1. Navigate to the Search tab (SHIFTCMDF).
  2. Enter the text to search in the top box.
  3. In the box named "filed to include", enter the path of the Node.js module that you would like to perform the search on. For example: ./node_modules/jsdom.
  4. On the right of the box named "files to exclude", click on the gear icon to disable excluding ignored files. That is, deactivate the "Use Exclude Settings and Ignore Files" button.

That's it. The last step is frequently overlooked, so it is particularly important. If you do not deactivate it, then the search will be made only for files that are already open as a tab on your Visual Studio Code window, which would be misleading.

Making changes is easy. The important thing is to preserve the changes. A change to node_modules occurs any time we install or remove a package.

To preserve the changes, we can add the file to version control by running:

git add -f <path to the file in node_modules>

This way, the original version can be restored from Git.

The next step is automating this. To do so, we can define a wrapper shell function for the npm command. For example, in Bash:

ugultopu / SortedList.js
Last active April 29, 2022 12:17
An array based sorted list implementation in JavaScript. Compatible with array methods such as splice and slice.
class SortedList {
constructor(items, comparator, locator, itemsAreSorted = false) {
items = [...items];
if (!itemsAreSorted) items.sort(comparator);

All you need to do is to modify your PROMPT_COMMAND environment variable so that it will send an alert (bell). The value of PROMPT_COMMAND is evaluated before every command prompt, meaning that it is evaluated after the end of every command.

To do so, open the startup file of your shell and append ; tput bel (or ; echo -e '\a') to the value of PROMPT_COMMAND. If PROMPT_COMMAND isn't present, create it with the value:

PROMPT_COMMAND+='; tput bel'

Now, you will get an alert after the end of every command, unless the terminal tab is focused when the command is finished.

Terminal gives you a couple options for configuring the alert (bell) behavior. You can access these by: