#!/bin/bash | |
function check_root() { | |
if [ "$(id -u)" != "0" ]; then | |
echo "This script must be run as root!" 1>&2 | |
exit 1 | |
fi | |
} | |
function help_menu() { |
<> | |
<div className='absolute top-0 left-0 w-full h-full flex items-center justify-center bg-black bg-opacity-60'></div> | |
<div className='w-full sm:w-[450px] absolute top-[50%] left-[50%] translate-x-[-50%] translate-y-[-50%] flex justify-center items-center'> | |
<div className='relative w-full h-full mx-auto flex items-center justify-center'> | |
<div className='bg-white rounded-lg shadow relative w-full bg-gradient-to-b from-brand-orange to-slate-900 mx-6'> | |
<div className='flex justify-end p-2'> | |
<button | |
type='button' | |
className='bg-transparent rounded-lg text-sm p-1.5 ml-auto inline-flex items-center hover:bg-gray-800 hover:text-white text-white' | |
> |
There are numerous reasons you may need to use multiple SSH keys for accessing GitHub and BitBucket
You may use the same computer for work and personal development and need to separate your work.
When acting as a consultant, it is common to have multiple GitHub and/or BitBucket accounts depending on which client you may be working for.
You may have different projects you're working on where you would like to segregate your access.
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:
I liked the way Grokking the coding interview organized problems into learnable patterns. However, the course is expensive and the majority of the time the problems are copy-pasted from leetcode. As the explanations on leetcode are usually just as good, the course really boils down to being a glorified curated list of leetcode problems.
So below I made a list of leetcode problems that are as close to grokking problems as possible.
import org.json.JSONArray; | |
import org.json.JSONException; | |
import org.json.JSONObject; | |
import java.util.*; | |
public class JsonHelper { | |
public static Object toJSON(Object object) throws JSONException { | |
if (object instanceof Map) { | |
JSONObject json = new JSONObject(); |
server { | |
listen 80; | |
root /var/www/html; | |
index index.php index.html index.htm index.nginx-debian.html; | |
server_name example.com; | |
location / { | |
try_files $uri $uri/ =404; | |
} |