Skip to content

Instantly share code, notes, and snippets.

View ishtiaque05's full-sized avatar
👨‍💻

Syed Ishtiaque Ahmad ishtiaque05

👨‍💻
View GitHub Profile
@ishtiaque05
ishtiaque05 / d2_faqs.md
Last active October 12, 2019 07:53
Contains helpful answers related to D2 tutorial

D2 FAQs

  1. How to parse the .htm file types inside rooms.zip folder?

    Ans: For D2 you have to use parse5 a html parsing library. It reads the .htm file types and output a tree which is nothing but a JSON object. FYI, you already know how to traverse a JSON file if you have implemented the requirements of D1.

  2. How to install parse5 in the project repository?

    Ans: You don't have to install anything. It's already present in the repository we have provided. Take a look at you package.json file. You will find parse5 listed as devDependencies

  3. How to find out the structure of .htm files?
@ishtiaque05
ishtiaque05 / install virtualenv ubuntu 16.04.md
Created March 20, 2018 09:58 — forked from Geoyi/install virtualenv ubuntu 16.04.md
How to install virtual environment on ubuntu 16.04

How to install virtualenv:

Install pip first

sudo apt-get install python3-pip

Then install virtualenv using pip3

sudo pip3 install virtualenv 
@ishtiaque05
ishtiaque05 / HTTP_STATUS_CODE
Created December 10, 2017 18:00
contains http status code to use in rails project
HTTP_STATUS_CODES = {
100 => 'Continue',
101 => 'Switching Protocols',
102 => 'Processing',
200 => 'OK',
201 => 'Created',
202 => 'Accepted',
203 => 'Non-Authoritative Information',
204 => 'No Content',
205 => 'Reset Content',
@ishtiaque05
ishtiaque05 / rvm_remove
Created October 11, 2017 16:56
Removing RVM from the system
There's a simple command built-in that will pull it:
rvm implode
This will remove the rvm/ directory and all the rubies built within it. In order to remove the final trace of rvm, you need to remove the rvm gem, too:
gem uninstall rvm
If you've made modifications to your PATH you might want to pull those, too. Check your .bashrc, .profile and .bash_profile files, among other things.
You may also have an /etc/rvmrc file, or one in your home directory ~/.rvmrc that may need to be removed as well.
@ishtiaque05
ishtiaque05 / Magento_after_setup
Last active October 16, 2017 04:57
Magento after setup for url not loading or frontend not loading solution
First of all, apply proper permissions, enable apache rewrite_module and refresh apache server.
chmod -R 777 /var/www/html/MAGENTO_2_ROOT_DIRECTORY/ sudo a2enmod rewrite sudo service apache2 restart
For messy frontend, run following command from Magento root:
php bin/magento setup:static-content:deploy
Now clear var directory except .htaccess file and check admin. If you get 404 page, there may be an issue of Symlink. Fot this, Edit apache config file
sudo gedit /etc/apache2/apache2.conf
and replace this code :
<Directory /var/www/>
@ishtiaque05
ishtiaque05 / Upgrade nodeJS
Created July 23, 2017 17:05
Upgrade nodeJS to latest version
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
n is a node package helper. To install other than stable version use:
sudo n 0.8.21
Once download is complete use:
node -v
to check the version
[alias]
# list all aliases
la = "!git config -l | grep alias | cut -c 7-"
lg = log --graph --pretty=format:'%Cred%h%Creset %C(bold blue)%an%C(reset) - %s - %Creset %C(yellow)%d%Creset %Cgreen(%cr)%Creset' --abbrev-commit --date=relative
ls = log --pretty=format:'%Cred%h%Creset %C(bold blue)%an%C(reset) - %s - %Creset %C(yellow)%d%Creset %Cgreen(%cr)%Creset' --abbrev-commit --date=relative
st = status
br = branch -v
co = checkout
cs = commit -S
[push]
@ishtiaque05
ishtiaque05 / zsh_config
Created July 8, 2017 08:13
Installing and setting up ZSH theme
## Install Terminator (shell)
```bash
sudo add-apt-repository ppa:gnome-terminator
sudo apt-get update
sudo apt-get install terminator
```
> Terminator should be setup as default now. Restart your terminal (shortcut: "Ctrl+Alt+T").
## Install ZSH