• Skip to main content

Uly.me

cloud engineer

  • Home
  • About
  • Archives

permanent

Set Vim Colors Permanently

August 12, 2022

Here’s how to set Vim colors permanently.

vi ~/.vimrc

vi ~/.vimrc

Add the following.

highlight Normal ctermfg=white ctermbg=black

highlight Normal ctermfg=white ctermbg=black

Filed Under: Linux Tagged With: background, colors, foreground, permanent, vim

Set Timezone Permanently

March 18, 2021

It’s recommended to set the clock to UTC. In rare occasions, local time may be needed.

Here’s how to set your server’s timezone permanently.

Check the date first.

date

date

Backup localtime. Set it to US Eastern Time.

mv /etc/localtime /etc/localtime.backup
ln -s /usr/share/zoneinfo/America/New_York /etc/localtime

mv /etc/localtime /etc/localtime.backup ln -s /usr/share/zoneinfo/America/New_York /etc/localtime

Backup clock. Set it to US Eastern Time.

cp -p /etc/sysconfig/clock /etc/sysconfig/clock.backup 
> /etc/sysconfig/clock
echo ZONE=\"America/New_York\" > /etc/sysconfig/clock

cp -p /etc/sysconfig/clock /etc/sysconfig/clock.backup > /etc/sysconfig/clock echo ZONE=\"America/New_York\" > /etc/sysconfig/clock

Run the date again to validate.

date

date

Filed Under: Linux Tagged With: permanent, redhat, set, timezone

Windows Route Add

January 14, 2020

Here’s how to add a route in Windows. Open CMD as Administrator.

route add 10.10.10.10 mask 255.255.255.0 10.10.10.254

route add 10.10.10.10 mask 255.255.255.0 10.10.10.254

To make it persistent, add -p.

route add 10.10.10.10 mask 255.255.255.0 10.10.10.254

route add 10.10.10.10 mask 255.255.255.0 10.10.10.254

To display. Specifies IP 4 only.

route print -4

route print -4

Filed Under: Windows Tagged With: add, display, permanent, persistence, print, route, server, windows

Storing Git Credentials

February 9, 2019

There are two ways to store git credentials. One is temporary and the other permanent. You can store your git credentials unencrypted on disk forever or in cache memory temporarily.

Temporary. Store for 15 minutes.

git config credential.helper 'cache --timeout=900'

git config credential.helper 'cache --timeout=900'

Permanent.

git config credential.helper store
git push http://example.com/repo.git
Username: <type your username>
Password: <type your password>

git config credential.helper store git push http://example.com/repo.git Username: <type your username> Password: <type your password>

Next time you use git, you will not be prompted for a password.

Filed Under: Git, Linux Tagged With: cache, credentials, disk, git, permanent, store, temporary

  • Home
  • About
  • Archives

Copyright © 2023