Skip to content

Instantly share code, notes, and snippets.

View edionmelarosa's full-sized avatar

Espiridion Larosa edionmelarosa

View GitHub Profile
@edionmelarosa
edionmelarosa / multiple-keys-gitlab.md
Last active July 13, 2020 10:16 — forked from dotspencer/multiple-keys-gitlab.md
Multiple Gitlab accounts with multiple ssh keys

Gitlab won't allow reuse of a public ssh key for multiple accounts. To get around this you need to create a second ssh key for the second account.

Create or modify your ~/.ssh/config file:

# normal                                                                                                                                                                  
Host gitlab.com-work_username
     HostName gitlab.com
     PreferredAuthentications publickey
 IdentityFile ~/.ssh/id_rsa
@edionmelarosa
edionmelarosa / functions.php
Last active June 11, 2020 11:46
Useful function for PHP/Laravel project
<?php
if (!function_exists('json_response')) {
function json_response($data, $status=200)
{
return response()
->json($data, $status);
}
}