How to Push to a GitHub Repository in IntelliJ

Image
1. Initialize and Connect the Git Repository # Run in the terminal from the project root git init git remote add origin https://github.com/[user]/[repository].git 2. Configure Git in IntelliJ Select VCS → Enable Version Control Integration . Choose Git and click OK . 3. Connect Your GitHub Account Go to File → Settings (on Windows) or IntelliJ IDEA → Preferences (on macOS). Navigate to Version Control → GitHub . Click Add Account ( + ). Select Log In with Token... and enter your GitHub Personal Access Token. 4. Add and Commit Files Go to VCS → Git → Add (or use the shortcut Ctrl+Alt+A ). Select the files you want to commit. Go to VCS → Commit (or use the shortcut Ctrl+K ). Write a commit message and click Commit . 5. Push Go to VCS → Git → Push (or use the shortcut Ctrl+Shift+K ). Click the Push button. Simpler Method (Using IntelliJ's Built-in Feature) Go to VCS → Share Project on GitHub . Set the repository name to vita-user-...

How to Keep Ubuntu 24.04 Laptop Running with Lid Closed

laptop lid closed and suspend

By default, Ubuntu suspends your laptop when you close the lid. However, in some use cases, such as downloading files overnight, using external displays, or running services, you may want your laptop to stay awake. Here’s how to configure your system so it continues running even with the lid closed.

Step 1: Edit the logind.conf File

Open a terminal and run the following command to edit the systemd logind configuration file:

sudo vi /etc/systemd/logind.conf

Find the following lines (they may be commented out) and modify them as shown below:

HandleLidSwitch=ignore
HandleLidSwitchExternalPower=ignore
HandleLidSwitchDocked=ignore

If any of these lines are commented out with #, be sure to remove the comment symbol.

  • HandleLidSwitch=ignore: Prevents the system from suspending when the laptop lid is closed, regardless of whether it's on battery or AC power.
  • HandleLidSwitchExternalPower=ignore: Specifically ensures the system does not suspend when the lid is closed and the laptop is plugged into AC power.
  • HandleLidSwitchDocked=ignore: Prevents suspend when the laptop is docked (e.g., connected to an external display or docking station).

Step 2: Restart the Logind Service

After saving the file, apply the changes by restarting the systemd-logind service:

sudo systemctl restart systemd-logind

That’s it!

Your Ubuntu laptop will now keep running even when the lid is closed. Just be cautious about heat buildup if you leave your laptop running in a closed space like a backpack.

Comments

Popular posts from this blog

Resolving Key Exchange Failure When Connecting with SecureCRT to OpenSSH

SecureCRT] How to Back Up and Restore SecureCRT Settings on Windows

How to Set Up Vaultwarden (Bitwarden) on Synology NAS (Best Free Alternative to LastPass)