Deep Dive into Web Dev

Web Dev

Installing ZSH and Oh-my-zsh on Linux

ZSH is one of the most powerful interactive UNIX shell Zsh was developed by ‘Paul Fastad’ since 1990, and the name ‘zsh’ comes from the Yale professor Zong Shao. Zsh is an extended Bourne shell with many improvements, including some features of Bash, ksh, and tcsh. Many of the useful features of Zsh were incorporated into Bash as well. Zsh is upward compatible with Bash scripts. Installing ZSH To install ZSH on Linux, you can use the following command:
2 min read
Installing ZSH and Oh-my-zsh on Linux
Web Dev

How to speed up your WP website

If you own a WordPress website, you’ll certainly want to have it running as efficiently as possible. Obviously, visitors have a strong dislike toward websites that take a long time to load. In fact, about half of all visitors will give up on your website if it takes more than just two seconds for the site to load. What’s more, Google’s search engine favors those websites with faster loading times, so if you decide to speed up your WP website, you’ll also be helping your SEO.
5 min read
How to speed up your WP website
Web Dev

How to customization ZSH theme and install helpful plugins.

Zsh Configurations For installing zsh download and configure visit here. Download iTerm Download the latest iTerm Install oh-my-zsh Open iTerm and run the command: sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh) Powerline fonts Clone, install and remove powerline fonts. # clone powerline font repo git clone https://github.com/powerline/fonts.git --depth=1 # install fonts cd fonts ./install.sh # cleanup cd .. rm -rf fonts Configure agnoster theme Source: Agnoster. Edit ~/.zshrc to add agnoster theme. # open zsh config file vim ~/.zshrc # update zsh theme section of code set ZSH_THEME="agnoster" Take backup of existing agnoster config file and replace it with agnoster.zsh-theme # backup cd .oh-my-zsh/themes mv agnoster.zsh-theme agnoster.zsh-theme_bkp # either create new or clone and move the above file mv ~/Downloads/agnoster.zsh-theme . Customise iTerm Different customisations for iterm Source: Jazz up zsh terminal
2 min read
How to customization ZSH theme and install helpful plugins.
Web Dev

Step by step guide for hosting static site in GitHub

GitHub allows us to host static sites in GitHub for free. It also supports static site builders like ` Jekyll``. But let’s limit this article to hosting a plain static site. Simple steps for hosting static sites. Create a GitHub account if you already don’t have one here". Advance user can use git & terminal to sync and push it to github Download either GitHub for Mac or GitHub for Windows, depending on your operating system. Open the app and log in using the account you just created. For the advanced user, you can use a terminal and ssh to clone the repository]. For Mac: After you log in, click advanced and make sure that your name and email are correct. Then, click “Install Command Line Tools”, just in case you want to start using the command line later in life. Create a new repository in your GitHub application. Name it your-username.github.io. The name is very important. Note the folder that GitHub is saving the repository to. Make sure the “Push to GitHub?” box is checked. Move your website’s files into the folder that GitHub just created when you made the repository. IMPORTANT: Your homepage HTML file must be called “index.html”, and it must exist in the top-level directory. Back in the GitHub application, you should see your files in the left column. Make sure they are all checked. If so, enter a message in the text box called “commit summary”, something like “initial commit.” Then, click the commit button. Click the “Publish repo” button in the top right corner. Give it about 10 minutes, then check your-username.github.io. Your website should be there! Using a custom domain name You can just leave your website at that address (it’ll give you some serious street cred in the developer world), but if you have a custom domain you would like to use, it is very simple to make GitHub redirect your page.
3 min read
Step by step guide for hosting static site in GitHub
Web Dev

Making system alert sound via Electron app

Electron export shell modules which help developers to interact with a desktop environment. Shell functions are available in both Main and Renderer processes but it is recommended to use it from the Main process so that we can better control its use. Let make a system alert sound using shell modules. In this article, we will use a shell.beep method which prompts the OS to make the system beep. Here is a simple code to make a beep in main.js file.
1 min read
Making system alert sound via Electron app
Web Dev

CSS centering [Simple Guide as Possible]

Vertical centering Translate is processed at the end, meaning it is based on the final element height. This means it works with any element, even dynamic heights. Of course it only works on relatively new browsers, but translate is well accepted and on the path to being ubiquitous. The style is also easy to understand and isn’t hacky. position: absolute; top: 50%; transform: translateY(-50%); Horizontal centering .center-div { margin: 0 auto; width: 100px; } The value auto in the margin property sets the left and right margins to the available space within the page. The thing to remember is your centered div must have a width property. Works on pretty much every browser.
2 min read
CSS centering [Simple Guide as Possible]
Web Dev

Understanding Cascade, Specificity in CSS

In css, the best way to accomplish something is often contingent on your particular constraints and how precisely you'll want to handle various edge cases. While there are some trick or useful recipes you can follow. Mastering CSS requires an understanding of the principle that makes those practices possible. In the first part of this blog, we will discuss about cascade in CSS. Though we have heard about fundamental of CSS i.e. the cascade, the box model but mastering them we must first know fundamental and know them deeply.
5 min read
Understanding Cascade, Specificity in CSS
Web Dev

Using yarn and npm for publishing npm packages

Setting up the pre-release version of the npm package NPM Registry allows developers to publish pre-release versions of the package. It is very useful for testing the package before publishing the final version. How to publish pre-release version of the package? ** 1. Using yarn** Yarn allows developers to publish pre-release version of the package using yarn publish --tag <tag-name> command. For example, if you want to publish the pre-release version of the package, you can use the following command.
2 min read
Using yarn and npm for publishing npm packages