Wednesday, January 24, 2018

Lost windows 10 menu item from dual boot with ubuntu

You can do that with one command simply in ubuntu:
sudo update grub


*it will bring your windows 10 menu in boot menu

Tuesday, January 23, 2018

Uninstall ubuntu from windows 10 dual boot

There are five to six steps to uninstall ubuntu from windows 10:
1. Open any partition magic software like aomei partition assistant or minitool partition tool.
2. Delete ext4, swap area or any other partitions those are related to that ubuntu OS.
3. Select the previous windows drive and resize it (take those free space to selected windows drive).
4. Then select full hard drive and click "Rebuid MBR"
5. And apply.
6. Reboot/Restart your windows.
Windows will enter straight to windows after booting.

Wednesday, January 10, 2018

Reset user password Drupal 7


  1. First go to drupal project's root directory and open command prompt
  2. Then paste the below command and press enter
    php ./scripts/password-hash.sh yourpassword
  3. It will generate a hash, copy the hash characters and go to database.
  4. Then if you are in phpmyadmin then in users table update the pass field with the hash characters Or you can run an update query.
  5. YOU ARE DONE. 😎

Wednesday, April 20, 2016

Vim command to exit after Git amend

In Vim, Press Esc then type :wq and Enter.
You are done and return to Git screen...

Monday, April 18, 2016

Setup SSH key pair for Git

1. After installing Git, open your terminal and type the following command to create SSH key pair:
ssh-keygen -t rsa -C "youremail@something.com"
2. then press enter
3. then press enter again
4. then put your password
5. then put your password again
And your key has been generated.

Now go to where is your id_rsa.pub is created and open it in word pad or text pad and copy all.

Then go to bitbucket -> settings -> SSH keys
Then type a level and paste your key and press add.
You are done.

Tuesday, March 29, 2016

Git fork sync

Git command to fork sync:

1. git fetch upstream
2. git merge upstream / branch_name
3. git push origin branch_name [optional, if you want to update your account remote]

Note : if you did not add upstream as remote then add by below command:
git remote add upstream(remote_name remote_url

Basic :  if you don't know, which one is origin and which one is upstream then read below:

After forking repo, that repo will come to your account and that is ORIGIN and UPSTREAM is which you have forked from. Like:

Another account / repo (upstream) => forked => your account / forked repo (origin)

Sunday, August 30, 2015

pass more than one value to next kendodropdownlist by filter

see the below code to do this:

var branch_dropdown_id = $("#branch_id").kendoDropDownList({
                optionLabel:"--Select Branch--",
                dataTextField:"name",
                dataValueField:"branch_id",
                dataSource:{
                    serverFiltering:true,
                    transport:{
                        read:{
                            dataType: "json",
                            type: "POST",
                            url: url
                        }
                    }
                },
                change:function(e){
                    $("#class_id").data("kendoDropDownList").enable();
                    $scope.branid = this.value();
                    var classid = $("#class_id").data("kendoDropDownList");
   
                    classid.dataSource.filter({
                        field: "branch_id",
                        value: this.value(),
                        operator: "eq"
                    });
                    classid.value(0);                                       
                }
            }).data("kendoDropDownList");


var class_id = $("#class_id").kendoDropDownList({
                autoBind:false,
                optionLabel:"--Select Class--",
                dataTextField:"class_name",
                dataValueField:"class_id",
                dataSource:{
                    serverFiltering:true,
                    transport:{
                        read:{
                            dataType: "json",
                            type: "POST",
                            url: url
                        }
                    }
                },
                change:function(e){
                    $("#section_id").data("kendoDropDownList").enable();                       
                    var sectionid = $("#section_id").data("kendoDropDownList");   
                    sectionid.dataSource.filter({
                        field: "classid",
                        value: this.value(),
                        operator: "eq",
                        field1: "bnid",
                        value1: branch_dropdown_id.value(),
                        operator1: "eq"
                    });                   
                    sectionid.value(0);
                }
            });

Workflow of WordPress project in a team with Git

1. We should not push any Wordpress core folders or files to github. 2. Only push custom theme and custom plugin into github. 3. So, in this...