Skip to content

Instantly share code, notes, and snippets.

View gcnit's full-sized avatar

Gaurav Chandak gcnit

View GitHub Profile
# Install eslint and prettier by running this on terminal in your project folder
npm install --save-dev babel-eslint css-loader eslint eslint-config-airbnb-base eslint-config-airbnb eslint-config-prettier eslint-plugin-import eslint-plugin-jsx-a11y eslint-plugin-prettier eslint-plugin-react eslint-plugin-react-hooks prettier style-loader
# Add .eslintrc.json to project folder. Make sure that the file that gets downloaded contains the '.' prefix.
https://raw.githubusercontent.com/workattech/ern-app/master/.eslintrc.json
# Add .prettierrc to project folder. Make sure that the file that gets downloaded contains the '.' prefix.
https://raw.githubusercontent.com/workattech/ern-app/master/.prettierrc
# Verify that both the files are in the project folder. Also verify if package.json and package-lock.json are updated.
@gcnit
gcnit / Intellij-Google-Style-Guide.md
Created May 31, 2021 21:27
Add Google Style Guide to Intellij

The google-java-format plugin is the preferred way to format the code. As it only kicks in on demand, it’s also recommended to have code style settings which help to create properly formatted code as-you-go. Those settings can’t completely mimic the format enforced by the google-java-format plugin but try to be as close as possible. So before submitting code, please make sure to run Reformat Code.

  • Download intellij-java-google-style.xml.
  • Open Intellij
  • Go to File → Settings → Editor → Code Style.
  • Click on Manage.
  • Click on Import.
  • Choose IntelliJ IDEA Code Style XML.
  • Select the previously downloaded file intellij-java-google-style.xml.
  • Make sure that Google Style is chosen as Scheme.
@gcnit
gcnit / Linting
Last active March 13, 2022 06:47
#Add stylelint, eslint and prettier config file
git clone https://github.com/gcnit/code-template.git
#Rename folder to your project name
mv code-template <folder-name>
#Go to folder
cd <folder-name>
#Remove .git folder

Windows

  • Download git from https://gitforwindows.org/
  • When you've successfully started the installer, you should see the Git Setup wizard screen. Follow the Next and Finish prompts to complete the installation. The default options are pretty sensible for most users.
  • Open a Command Prompt (or Git Bash if during installation you elected not to use Git from the Windows Command Prompt).
  • Run the following commands to configure your Git username and email using the following commands, replacing Emma's name and email with your own. These details will be associated with any commits that you create:
git config --global user.name "Emma Paris"
git config --global user.email "[email protected]"
for (const button of document.getElementsByClassName('artdeco-button--secondary')) button.click();

How to prepare for technical interviews at companies like Amazon, Flipkart, Google, Microsoft, Swiggy, Uber, etc?

Interview Rounds

Generally, there are two major types of technical interviews that companies have in India:

  • Problem Solving & Data Structures Round
  • Machine Coding Round

If you're aiming the traditional giants like Google, Microsoft, Amazon, etc, then you should focus solely on problem-solving & data structures (PS/DS).

Fruit Yellow Long Sweet
_________________________________
Mango true false true
Apple false false false
Mango false false true
Banana true true false
.
.
.
.
@gcnit
gcnit / Fruits_Probability.txt
Last active March 13, 2018 09:18
Fruits Probability
Fruit Yellow Long Sweet Total Pieces
_____________________________________________________________
Mango 200/300 0/300 250/300 300/1000
Banana 350/400 350/400 200/400 400/1000
Others 150/300 100/300 150/300 300/1000
_____________________________________________________________
Total 700 450 600 1000
@gcnit
gcnit / Fruits.txt
Last active March 13, 2018 09:19
Fruits
Fruit Yellow Long Sweet Total Pieces
_______________________________________________
Mango 200 0 250 300
Banana 350 350 200 400
Others 150 100 150 300
_______________________________________________
Total 700 450 600 1000
@gcnit
gcnit / BinaryClassification.txt
Last active August 29, 2017 14:41
Binary Classification Example
Sample Values:
Actual Predicted
1 1
0 0
0 1
1 0
1 1
0 0
0 0