Skip to content

Instantly share code, notes, and snippets.

View ps0305's full-sized avatar
👋

Pankaj Singh ps0305

👋
View GitHub Profile
#!/bin/bash
rm -rf node_modules
rm -rf package.json.lock
npm install
npx jetify
npx patch-package
cd android && ./gradlew clean && cd ..
cd android && ./gradlew assembleRelease && cd ..
#!/bin/bash
rm -rf node_modules
rm -rf ios/Podfile.lock
rm -rf package.json.lock
npm install
npx jetify
npx patch-package
cd ios && pod install && cd ..
cd android && ./gradlew clean && cd ..
@ps0305
ps0305 / updateSonarProps.sh
Created November 6, 2020 03:07 — forked from giehlman/updateSonarProps.sh
Update SonarQube properties file with project name and version from package.json
#!/usr/bin/env bash
#title : updateSonarProps.sh
#description :
# This script parses the project's name and version from its package.json and automagically
# updates the version and package name in the SonarQube configuration properties file.
# It can be used as a pre step before running the sonar-scanner command
# It also creates a backup of the props file with suffix *.bak
#prerequisites : NodeJS based project with package.json, sonar*.properties file in the cwd
#author : Christian-André Giehl <christian@emailbrief.de>
#date : 20180220
@ps0305
ps0305 / countries.js
Created August 24, 2020 16:58
Hacker Rank exercise- Get countries with population greater than p using http get
// TODO: Add pagination
function getCountries(str, p) {
let accum = 0;
https.get(`https://jsonmock.hackerrank.com/api/countries/search?name=${str}`, (resp) => {
let data = '';
resp.on('data', (chunk) => {
data += chunk;
});
@ps0305
ps0305 / web-performance.md
Created January 23, 2020 19:07 — forked from stevekinney/web-performance.md
Web Performance Workshop

Web Performance

Requirements

Repositories

@ps0305
ps0305 / monolithic-vs-modular.md
Last active January 10, 2020 19:50 — forked from joepie91/monolithic-vs-modular.md
Monolithic vs. modular - what's the difference?

When you're developing in Node.js, you're likely to run into these terms - "monolithic" and "modular". They're usually used to describe the different types of frameworks and libraries; not just HTTP frameworks, but modules in general.

At a glance

  • Monolithic: "Batteries-included" and typically tightly coupled, it tries to include all the stuff that's needed for common usecases. An example of a monolithic web framework would be Sails.js.
  • Modular: "Minimal" and loosely coupled. Only includes the bare minimum of functionality and structure, and the rest is a plugin. Fundamentally, it generally only has a single 'responsibility'. An example of a modular web framework would be Express.

Coupled?

In software development, the terms "tightly coupled" and "loosely coupled" are used to indicate how much components rely on each other; or more specifically, how many assumptions they make about each other. This directly translates to how easy it is to repla

@ps0305
ps0305 / System Design.md
Created January 2, 2020 20:44 — forked from vasanthk/System Design.md
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@ps0305
ps0305 / Promises.md
Created November 5, 2019 20:21 — forked from aegorenkov/iterators.js
HardParts Promises and Iterators
Promises
Challenge 1
Let's start by reviewing asynchronous functions! Using setTimeout, print the string 'Hello!' after 1000ms.
Challenge 2
Create a promise. Have it resolve with a value of 'Resolved!' in resolve after a delay of 1000ms, using setTimeout. Print the contents of the promise after it has been resolved by passing console.log to .then
Challenge 3
Create another promise. Now have it reject with a value of "Rejected!" without using setTimeout. Print the contents of the promise after it has been rejected by passing console.log to .catch
Challenge 4

Promises are asynchronous and we're now going to prove that they indeed are! Create a promise and have it resolve with the value of "Promise has been resolved!" Then uncomment the code at bottom of Challenge 4. What order do we expect "Promise has been resolved!" and "I'm not the promise!" to print? Why?

@ps0305
ps0305 / resume.json
Last active December 2, 2022 16:41
resume.json
{
"basics": {
"name": "Pankaj Kumar Singh",
"label": "Senior Software Engineer",
"summary": "Functional Programming Enthusiast, Skilled in JavaScript, Proficient in ES6. Specialties: Javascript, React, Redux, React-Native, Angular.",
"website": "https://ps0305.github.io/",
"phone": "(+91) 7355-445-118",
"email": "pankajsingh0305@gmail.com",
"location": {
"city": "Remote",