Skip to main content

Posts

Showing posts from 2020

Latest Post

Fix Arch [Manjaro] GRUB Bootloader

 Boot to any [Manjaro] live GUI disk. Use manjaro-chroot 1. Start by identifying the partition where your Manjaro installation controlling the active Grub menu resides and needs repairing. If you are in Graphical mode you can use an application called GPartEd , which should be in Menu > System > GPartEd. This will provide a simple visual illustration of the partitions on your hard drive(s). To do the same thing from terminal or TTY you can use this command lsblk -f 2. manjaro-chroot is a tool to easily setup a functional chroot into an installed Linux installation from a live boot of a Manjaro Installation Media. To setup the chroot use the command sudo manjaro-chroot -a You will be presented with a terminal. Wait until it shows a list with the available system partitions on your computer and choose the one you want to repair.    1.) First of all check the partition for the ESP (EFI System Partition). An ESP is a fat32 partition and contains .efi ...

Enable Hibernate [Ubuntu]

 1. Install hibernate package. sudo apt-get install hibernate 2. add file "sudo -i nano /etc/polkit-1/localauthority/50-local.d/enable-hibernate.pkla" with content. [Re-enable hibernate by default in upower] Identity=unix-user:* Action=org.freedesktop.upower.hibernate ResultActive=yes [Re-enable hibernate by default in logind] Identity=unix-user:* Action=org.freedesktop.login1.hibernate;org.freedesktop.login1.handle-hibernate> ResultActive=yes 3.  Restart service "sudo systemctl restart polkit.service" or "sudo systemctl restart polkitd.service" 4. execute sudo hibernate-disk

Github asking for username/password when following the instructions on screen and pushing a new repo

If you want to disable the prompts for both the username and password then you can set the URL as follows - git remote set-url origin https://username:password@github.com/WEMP/project-slideshow.git Note that the URL has both the username and password. Also the .git/config the file should show your current settings. If you don't want to store the password in the config file, then you can generate your personal token and replace the password with the token Select the scopes, or permissions, you'd like to grant this token. To use your token to access repositories from the command line, select repo .  Developer settings -> Personal access tokens nano .git/config git remote set-url origin https://username:token@github.com/WEMP/project-slideshow.git  

Add Git Branch to Linux Terminal

# Git branch in prompt. git_branch() {   git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' } export PS1="\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\u@\h:\w$\[\033[32m\]\$(git_branch)\[\033[00m\]$ " o/p: shah@ubuntu:~/Desktop/folder$ (branch)$ *(branch) is of green color ---- export PS1="[\u@\h \W]\$(git_branch)\$ "   o/p: [shah@ubuntu folder] (branch)$  ---- export PS1="[\u@\h \W]\[\033[00;32m\]\$(git_branch)\[\033[00m\]\$ " o/p: [shah@ubuntu folder] (branch)$  *(branch) is of green color     export PS1="\[\e]0;\u@\h: \w\a\]\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\[\033[32m\]$(git_branch)\[\033[00m\]$ "