Skip to content

Instantly share code, notes, and snippets.

View pradhumnsharma's full-sized avatar

pradhumnsharma

View GitHub Profile
@pradhumnsharma
pradhumnsharma / set_1.go
Created August 10, 2024 01:39
Interview Golang: Passing data that is coming from go routines to main method
Questions: https://docs.google.com/document/d/1R_mOM1W_v-yNxRW30Yfx_pILPjAuTUWp/edit?usp=drive_link&ouid=112036395083803415170&rtpof=true&sd=true
// Below Program is for Question 1- Variant 1
package main
import (
"fmt"
"net/http"
"sync"
)
Ques 1: Create a function named `customObjFlatten` which will take an pure nested object and return single level key value pair such as
INPUT
{
a: 12,
b: 15,
c: {
d: 31,
e: {
f:51,
g: {
@pradhumnsharma
pradhumnsharma / Rails Installation commands
Created April 19, 2018 09:59
How to install rails on localhost?
Step 1:- Login as super user using command
=> sudo su
Step 2:- The ROR installation begins with installing RVM on the server. It is important to install the latest version of RVM on the system, this requires an installation of the CURL command. The following command does the job.
=> apt-get install curl
Step 3:- To proceed with the RVM installation, import the rvm.io public key in the server system using this command.
=> curl -#LO https://rvm.io/mpapis.asc
=> gpg --import mpapis.asc