Skip to content

Instantly share code, notes, and snippets.

View ibayazit's full-sized avatar
🎯
Focusing

İbrahim Bayazit ibayazit

🎯
Focusing
View GitHub Profile
 public function render($request, Throwable $exception)
    {
        // is this request asks for json?
        if($request->is('api/*')){
            if ( !empty($exception) ) {
                $response = [
                    'error' => __('messages.request.response.execute')
                ];
                // If debug mode is enabled
@oanhnn
oanhnn / using-multiple-github-accounts-with-ssh-keys.md
Last active June 30, 2025 20:48
Using multiple github accounts with ssh keys

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.