Skip to content

Instantly share code, notes, and snippets.

View abhisekp's full-sized avatar
🏠
Working from home

Abhisek Pattnaik abhisekp

🏠
Working from home
View GitHub Profile
@abhisekp
abhisekp / cashkaro007.js
Last active December 1, 2021 02:28
Cashkaro
/* eslint-disable no-unused-expressions */
// !function cashkaro007() {
if (String(window.location).includes('.amazon.')) {
var isProductURL = String(window.location).includes('product');
console.log({ isProductURL });
var productURL = isProductURL ? String(window.location) : sessionStorage.getItem('productURL');
if (isProductURL) {
sessionStorage.setItem('productURL', productURL);
isProductURL = !!productURL;
@abhisekp
abhisekp / no-npm-check.js
Last active May 23, 2019 06:18
No Yarn Check
#!/usr/bin/env node
const errorMessage = `
@abhisekp
abhisekp / check_node_version.js
Last active May 4, 2019 09:38
Node Version Checker
#!/usr/bin/env node
const path = require("path");
const { spawnSync } = require("child_process");
const { engines } = require(path.resolve(process.cwd(), "package.json"));
const requiredVersionRule = engines.node;
const version = process.version.replace("v", "");
try {
const checkNodeVersionProcess = spawnSync(
@abhisekp
abhisekp / # Sync Git Hosting Sites.md
Last active September 2, 2024 16:27 — forked from MoOx/README.md
How to keep in sync your Git repos on GitHub, GitLab & Bitbucket easily
title tags authors
How to keep in sync your Git repos on GitHub, GitLab & Bitbucket easily
git
github
gitlab
bitbucket
MoOx
@abhisekp
abhisekp / Question.md
Last active April 4, 2018 06:51
Package Problem from CodeEval

Package Problem

Package Problem

You want to send your friend a package with different things. Each thing you put inside the package has such parameters as index number, weight and cost. The package has a weight limit. Your goal is to determine which things to put into the package so that the total weight is less than or equal to the package limit and the total cost is as large as possible.

You would prefer to send a package which weights less in case there is more than one package with the same price.

@abhisekp
abhisekp / # Debug Node Apps.md
Last active October 7, 2017 05:40
Debug Node Apps
@abhisekp
abhisekp / # NPM Ecosystem.md
Last active September 24, 2017 11:21
NPM Ecosystem
@abhisekp
abhisekp / # Object Property Assignment.md
Last active March 16, 2018 02:55
Object Property Assignment in JavaScript — http://bit.ly/js-obj
@abhisekp
abhisekp / True Caller.md
Last active September 17, 2017 20:12
True Caller - A Menance to Society

True Caller - A Menance to Society

— by Abhisek Pattnaik <[email protected]>
Image of true caller showing 100s of millions of users at risk

Many people use True Caller without actually realizing the privacy concerns deeply associated with the service.

How True Caller works is by sharing or uploading all your contact information to their servers and if a person has opted for their service by installing the app, it shares the stored details with the person.