Skip to content

Instantly share code, notes, and snippets.

View babhishek21's full-sized avatar
:shipit:
Ship it!

Abhishek Bhattacharya babhishek21

:shipit:
Ship it!
View GitHub Profile
@neuralline
neuralline / promise-allSettled-async-loop.ts
Created April 19, 2020 11:26
Promise.allSettled async await loop with map
//Promise.allSettled() vs Promise.all()
//allSettled: returns when all promises have either resolved or rejected
const getGitHubUser = async (usernames: []) => {
const result = await Promise.allSettled(
usernames.map(async (name: string) => {
try {
const response = await fetch(
`https://api.github.com/users/${name}`
)
@csereno
csereno / CloudWatchAgentConfig.json
Created October 1, 2018 20:35
AWS CloudWatch Agent configuration file example for Linux with standard /var/log/messages, secure, and yum logs
{
"agent": {
"metrics_collection_interval": 10,
"logfile": "/opt/aws/amazon-cloudwatch-agent/logs/amazon-cloudwatch-agent.log"
},
"metrics": {
"metrics_collected": {
"cpu": {
"resources": [
"*"
@zthxxx
zthxxx / Activate Office 2019 for macOS VoL.md
Last active July 23, 2024 12:16
crack activate Office on mac with license file
@babhishek21
babhishek21 / xclip.cpp
Created March 21, 2018 20:57
xClip (Reverse Clip) for Windows - Simulate reverse process of the clip command on Windows
/**
* xClip (Reverse Clip) for Windows
* Author: Abhishek Bhattacharya <babhishek21@yahoo.co.in>
*
* Build Environment:
* Windows 10 Version 1607 (Windows 7 or above should work fine)
* MinGW g++ (GCC) 5.3.0 or above (with flag --std=c++11)
* UPX x3.91 or above
* Runtime Environment:
* Windows 7 or above
@tegansnyder
tegansnyder / Preventing-Puppeteer-Detection.md
Created February 23, 2018 02:41
Preventing Puppeteer Detection

I’m looking for any tips or tricks for making chrome headless mode less detectable. Here is what I’ve done so far:

Set my args as follows:

const run = (async () => {

    const args = [
        '--no-sandbox',
        '--disable-setuid-sandbox',
        '--disable-infobars',
@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active July 23, 2024 08:15 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy
@abe312
abe312 / stdc++.h for mac users with clang
Created April 18, 2017 18:49
paste this in /usr/local/include/bits/
// C++ includes used for precompiling -*- C++ -*-
// Copyright (C) 2003-2013 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
@myshov
myshov / function_invocation.js
Last active January 21, 2024 15:14
11 Ways to Invoke a Function
console.log(1);
(_ => console.log(2))();
eval('console.log(3);');
console.log.call(null, 4);
console.log.apply(null, [5]);
new Function('console.log(6)')();
Reflect.apply(console.log, null, [7])
Reflect.construct(function(){console.log(8)}, []);
Function.prototype.apply.call(console.log, null, [9]);
Function.prototype.call.call(console.log, null, 10);
@guycalledseven
guycalledseven / manual-uninstall-paragon-ntfs.sh
Last active July 10, 2024 21:30
Manually remove Paragon NTFS v15 leftovers MacOS
# after appcleaner does his magic, do this
sudo rm -rf "/Library/Application Support/Paragon Software/"
sudo rm /Library/LaunchDaemons/com.paragon-software.installer.plist
sudo rm /Library/LaunchDaemons/com.paragon-software.ntfs.loader.plist
sudo rm /Library/LaunchDaemons/com.paragon-software.ntfsd.plist
sudo rm /Library/LaunchAgents/com.paragon-software.ntfs.notification-agent.plist
sudo rm -rf /Library/Filesystems/ufsd_NTFS.fs/
sudo rm -rf /Library/PrivilegedHelperTools/com.paragon-software.installer
sudo rm -rf /Library/Extensions/ufsd_NTFS.kext/
@GLMeece
GLMeece / latency_numbers.md
Last active May 22, 2024 15:57
Latency Numbers Every Programmer Should Know - MarkDown Fork

Latency Comparison Numbers

Note: "Forked" from Latency Numbers Every Programmer Should Know

Event Nanoseconds Microseconds Milliseconds Comparison
L1 cache reference 0.5 - - -
Branch mispredict 5.0 - - -
L2 cache reference 7.0 - - 14x L1 cache
Mutex lock/unlock 25.0 - - -