Posts

Showing posts with the label Linux

Save Username and Password of Git Credentials in Storage

Linux To prevent the git password prompt in each git pull request can be prevented by storing the password in the local disk. To keep the credentials on disk. git config credential.helper store To enable credentials storage globally, run: git config --global credential.helper store When credentials storage is enabled, the first time you pull or push from the remote Git repository, you will be asked for a username and password, and they will be saved in ~/.git-credentials file.

Useful Git Terminal Commands

Delete git local branch https://www.freecodecamp.org/news/how-to-delete-a-git-branch-both-locally-and-remotely/ Switch branch using git checkout git checkout <existing_branch_name> if the branch does not exist, -b option will create a new branch for the same. git checkout -b <new_branch-name> Git pull till a particular commit git pull is nothing but git fetch followed by git merge . So what you can do is git fetch remote example_branch git merge <commit_hash> https://stackoverflow.com/questions/31462683/git-pull-till-a-particular-commit/48728993 https://www.freecodecamp.org/news/git-checkout-remote-branch-tutorial/

MySQL Database Backup Using CLI

 Backup MySQL using terminal mysqldump -u [user name] –p [password] [options] [database_name]  > [dumpfilename.sql] mysqldump -v -u appuser–p  mydb > mydbbackup.sql

Time Server List

List of time server can be used to configure gadgets and desktops. NIST Sever Name  time.nist.gov Supported Protocols Network Time Protocol (RFC-1305) Daytime Protocol (RFC-867) Time Protocol (RFC-868) Ref: https://tf.nist.gov/tf-cgi/servers.cgi     NTP.ORG Server Names The NTP Pool DNS system automatically picks time servers which are geographically close for you, but if you want to choose explicitly, there are sub-zones of pool.ntp.org. The "continent" ones are: Area: HostName: Worldwide pool.ntp.org Asia asia.pool.ntp.org Europe europe.pool.ntp.org North America north-america.pool.ntp.org Oceania oceania.pool.ntp.org South America south-america.pool.ntp.org Supported Protocols Network Time Protocol ( RFC 5905 , RFC 5906 , RFC 5907 , RFC 5908 ) Simple NTP [SNTP] ( RFC 5905 ) Ref: http://ntp.org

Check Bind / named Version - Linux - CentOS

Once the bind package installed in a linux system to serve as DNS/ name server, the version can be identified with following command named -v output BIND 9.9.4-RedHat-9.9.4-74.el7_6.2 (Extended Support Version)

Set proxy for linux terminal connection

Cent OS HTTP proxy can be configured in different ways 1. Terminal Session Configuring HTTP proxy for terminal can be achieved by setting proxy values using terminal. These will be application for a particular session. Setting will be cleared once the session closed from client Export the below variables in terminal for setting proxy with out authentication export http_proxy = 'http://proxyserveraddress:port' export https_proxy = 'https://proxyserveraddress:port' Common port number used for HTTP proxy is 3128.  User can give either proxy ip address or fully qualified domain name. Disable proxy: Unset the variables, we can remove proxy configuration for session. unset http_proxy unset https_proxy