Skip to content

Instantly share code, notes, and snippets.

View Mohamed-Ibrahim-01's full-sized avatar

Mohamed Ibrahim Mohamed-Ibrahim-01

  • Egypt
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.
@Mohamed-Ibrahim-01
Mohamed-Ibrahim-01 / matrix_flatten.cpp
Last active May 20, 2022 01:07
matrix_flatten.cpp
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
/*
* Returning the index in the flatten matrix for n by m by p matrix.
*
* @param n dimention 1 of 3d matrix
* @param m dimention 2 of 3d matrix