How to set Git to ignore chmod changes
Type this command inside git repository: $ git config core.filemode false
Type this command inside git repository: $ git config core.filemode false
Redshift is a tool to reduce the brightness and make your display more redness to protect your eyes when you working for too long. Install redshift on ubuntu : $ sudo apt-get install redshift redshift-gtk afterwards, open up redshift (Alt+F2) : redshift-gtk
$ ssh -f -N -v -t -L 5433:target_host:5432 user@jump_server target_host is the host/database_server/RDS that you want to access that only can be accessed from jump _server or bastion if you’re using AWS jump_server is the host that accessible from you and the only host that can access target_host 5432 is local port (postgresql default) 5433 is the … Read more
Install parted: sudo apt-get install parted Use parted to create partition: parted /dev/sdb Inside parted cli, follow these steps: (parted) mklabel gpt Warning: The existing disk label on /dev/sdb will be destroyed and all data on this disk will be lost. Do you want to continue? Yes/No? yes (parted) unit GB (parted) mkpart primary 0.0GB … Read more
Add your mount point and swap permanently, so they will automatically mounted when you reboot. $ sudo vim /etc/fstab /swapfile swap swap sw 0 0 /dev/sdb1 /test1 ext3 defaults 0 0 /dev/sdb2 /test2 ext3 defaults 0 0 /dev/sdb3 /test3 ext3 defaults 0 0
This is a quick guide will show you how to open ssh tunnel to ssh into your target server that can only be accessed from jump server. So this is how to do it: ssh -v -t -L 10443:localhost:20443 <jump_server> ssh -t -L 20443:localhost:443 user@<target_server> jump_server is the host that accessible from you and the … Read more
If your VPN client office using forticlient, you might want to run your VPN client with only command line, so you don’t have to see the small window just for connect your servers from home. With this bash script you can run your forclient VPN client only with CLI. Install expect first if you’re using … Read more