All posts by Pramod T P

Compress an Entire Directory or a Single File

Run the following command to compress an entire directory or a single file on Linux. It’ll also compress every other directory inside a directory you specify–in other words, it works recursively.

tar -czvf name-of-archive.tar.gz /path/to/directory-or-file

Here’s what those switches actually mean:

-c: Create an archive.
-z: Compress the archive with gzip.
-v: Display progress in the terminal while creating the archive, also known as “verbose” mode. The v is always optional in these commands, but it’s helpful.
-f: Allows you to specify the filename of the archive.

Share

scp

scp allows files to be copied to, from, or between different hosts. It uses ssh for data transfer and provides the same authentication and same level of security as ssh.

$ scp your_username@remotehost.edu:FILENAME.txt /some/local/directory
Share

sublime increase tab font size

  • Navigate to Sublime Text -> Preferences -> Browse Packages
  • Open the User directory
  • Create a file named Default.sublime-theme (if you’re using the default theme) and add the following text
vi /root/.config/sublime-text-3/Packages/User/Default.sublime-theme
[     {
"class": "tab_label",
"font.size": 13
},
]
Share

Something went wrong while saving this configuration: Area is already set

This is a known issue in magento 2.2.4. It can be fixed by modifying the function setForcedArea() in Magento\Email\Model\AbstractTemplate.php

Update

public function setForcedArea($templateId)
{ if ($this->area) {
throw new \LogicException(__('Area is already set'));
}
$this->area = $this->emailConfig->getTemplateArea($templateId);
return $this;
}

To

public function setForcedArea($templateId)
{ if (!isset($this->area)) {
$this->area = $this->emailConfig->getTemplateArea($templateId);
}
return $this;
}
Share