Sunday, July 19, 2015

post installation ubuntu 14.04

#!/bin/bash
#Post Installation Script for kubuntu
# install text editor, music player, video player, browser

sudo apt-get install --assume-yes openssh*
sudo apt-get install --assume-yes geany gcc g++ vim pidgin clementine vlc


Bugs in Wifi connectivity:

If you leave your wifi for few minutes of inactivity then your network becomes very slow. To rectify this you need to disable the power management .

Add the below entry to the file ->  /etc/pm/power.d/wireless

#!/bin/sh
/sbin/iwconfig wlan0 power off

Add with sudo command and reboot your system.

To install java-plugin in browser.

Install openjdk via apt-get.

Then install

sudo apt-get install icedtea-7-plugin icedtea-6-plugin




Monday, February 9, 2015

Configure Git for daily usage


sudo <packagemanager> install git
eg: sudo yum install git

git config --global user.name "John Doe"
git config --global user.email johndoe@example.com
git config --global core.editor vim
 
git config --global diff.tool kdiff3
git config --global merge.tool kdiff3
git config --global --add difftool.prompt false 
 

More aliases

git diff <path to file> 
This will show the diff between the uncommited file and the one that was present after checkout
git diff --cached 
This will show the diff between the committed file and the checkout one.
git pull 
 

Workflow

Usual:
 git checkout -b <branchname>
      work on stuffs 
 
 git add <file1>
 git add <file2>
 
 git commit -m "commit message -- description of what the commit is about"
 
 git push -u origin branch
 
  
Before doing a git push,
 
 git stash -- this will stash all the tracked files to your local directory.
 
 git pull -- this pull will not have any merge conflicts.
 
 git stash apply
 
 git difftool <filenames> 
 
 verify your changes
 
 Now follow the usual procedure
 
 

Git FAQs:

1) How to pick a commit from one git repo to other.
 
 git --git-dir=../some_other_repo/.git \
format-patch -k -1 --stdout <commit SHA> | \
git am -3 -k