Skip to content

Instantly share code, notes, and snippets.

View SOG-web's full-sized avatar
🇳🇬
Technology in my veins

Olalekan Raheem SOG-web

🇳🇬
Technology in my veins
View GitHub Profile

Problem

I have two Github accounts: oanhnn (personal) and superman (for work). I want to use both accounts on same computer (without typing password everytime, when doing git push or pull).

Solution

Use ssh keys and define host aliases in ssh config file (each alias for an account).

How to?

  1. Generate ssh key pairs for accounts and add them to GitHub accounts.
@SOG-web
SOG-web / Uninstall.md
Created April 2, 2022 22:10 — forked from pokisin/Uninstall.md
Uninstall git, ubuntu

Uninstall git

To remove just git package itself from Ubuntu 14.04 execute on terminal:

$ sudo apt-get remove git

Uninstall git and it's dependent packages

To remove the git package and any other dependant package which are no longer needed from Ubuntu Trusty.

$ sudo apt-get remove --auto-remove git
@SOG-web
SOG-web / scrcpy-connect
Last active November 26, 2022 08:29
scrcpy-connect windows
stay connect via USB
connect to your WIFI network (computer and mobile device both)
adb kill-server
adb devices
adb tcpip 5555
using namespace System.Management.Automation
using namespace System.Management.Automation.Language
if ($host.Name -eq 'ConsoleHost')
{
Import-Module PSReadLine
}
#Import-Module PSColors
#Import-Module posh-git
Import-Module -Name Terminal-Icons
@SOG-web
SOG-web / ohmyposhv3-v2.json
Created November 10, 2022 16:00 — forked from shanselman/ohmyposhv3-v2.json
ohmyposhv3-v2
{
"final_space": true,
"console_title": true,
"console_title_style": "folder",
"blocks": [
{
"type": "prompt",
"alignment": "left",
"horizontal_offset": 0,
"vertical_offset": 0,
@SOG-web
SOG-web / menu.reg
Created March 8, 2023 22:14 — forked from scarpa27/menu.reg
add jetbrains context menu open folder as project toolbox ide subitem
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shell\JetBrains]
"Icon"="C:\\Users\\%username%\\AppData\\Local\\JetBrains\\Toolbox\\bin\\jetbrains-toolbox.exe"
"MUIVerb"="JetBrains"
"Position"="Top"
"SubCommands"="JBRIDER;JBIDEA;JBSTUDIO"
@SOG-web
SOG-web / work-with-multiple-github-accounts.md
Created June 28, 2023 18:16 — forked from Dmajor85/work-with-multiple-github-accounts.md
How To Work With Multiple Github Accounts on your PC

How To Work With Multiple Github Accounts on a single Machine

Let suppose I have two github accounts, https://github.com/rahul-office and https://github.com/rahul-personal. Now i want to setup my mac to easily talk to both the github accounts.

NOTE: This logic can be extended to more than two accounts also. :)

The setup can be done in 5 easy steps:

Steps:

  • Step 1 : Create SSH keys for all accounts
  • Step 2 : Add SSH keys to SSH Agent
@SOG-web
SOG-web / vscode-macos-context-menu.md
Created August 21, 2023 17:58 — forked from idleberg/vscode-macos-context-menu.md
“Open in Visual Studio Code” in macOS context-menu

Open in Visual Studio Code

  • Open Automator
  • Create a new document
  • Select Quick Action
  • Set “Service receives selected” to files or folders in any application
  • Add a Run Shell Script action
    • your default shell should already be selected, otherwise use /bin/zsh for macOS 10.15 (”Catalina”) or later
    • older versions of macOS use /bin/bash
  • if you're using something else, you probably know what to do 😉
@SOG-web
SOG-web / update-golang.md
Created August 25, 2024 12:18 — forked from nikhita/update-golang.md
How to update the Go version

How to update the Go version

System: Debian/Ubuntu/Fedora. Might work for others as well.

1. Uninstall the exisiting version

As mentioned here, to update a go version you will first need to uninstall the original version.

To uninstall, delete the /usr/local/go directory by: