Skip to content

Instantly share code, notes, and snippets.

View pyadav's full-sized avatar
⛏️
learning new stuff

Praveen Yadav pyadav

⛏️
learning new stuff
View GitHub Profile
@pyadav
pyadav / bundlers.md
Created June 17, 2023 15:06 — forked from ivanbanov/bundlers.md
Bundlers comparison
Rollup SWC esbuild tsup Vite Parcel Webpack
Monorepo support ⛔️ ⛔️ ⛔️ ⛔️ ⛔️ ⛔️
Performance esbuid/swc esbuid/swc esbuid/swc esbuid/swc esbuid/swc
Type declaration (.d.ts) rollup-plugin-dts ⛔️ ⛔️ rollup-plugin-dts rollup-plugin-dts ts-loader
Declaration map (.d.ts.map) ⛔️ ⛔️ ⛔️ ⛔️ ⛔️ ts-loader
Treeshaking esbuild + rollup esbuild + rollup
Type-check
@pyadav
pyadav / bundlers.md
Created June 17, 2023 15:06 — forked from ivanbanov/bundlers.md
Bundlers comparison
Rollup SWC esbuild tsup Vite Parcel Webpack
Monorepo support ⛔️ ⛔️ ⛔️ ⛔️ ⛔️ ⛔️
Performance esbuid/swc esbuid/swc esbuid/swc esbuid/swc esbuid/swc
Type declaration (.d.ts) rollup-plugin-dts ⛔️ ⛔️ rollup-plugin-dts rollup-plugin-dts ts-loader
Declaration map (.d.ts.map) ⛔️ ⛔️ ⛔️ ⛔️ ⛔️ ts-loader
Treeshaking esbuild + rollup esbuild + rollup
Type-check
@pyadav
pyadav / compress-everything.md
Created October 28, 2022 09:00 — forked from lawrencejones/compress-everything.md
How we compress Pub/Sub messages and more, saving a load of money
@pyadav
pyadav / fix-dyld-missing-symbol-called-errors-on-m1-macs.md
Created July 12, 2022 00:39 — forked from adrienjoly/fix-dyld-missing-symbol-called-errors-on-m1-macs.md
Fix `dyld[]: missing symbol called` errors when running Node.js programs on M1 Macs

Problem

If you're getting this kind of error when running Node.js programs with binary dependencies that don't support M1 yet, e.g.:

$ yarn test
dyld[51175]: missing symbol called
dyld[51176]: missing symbol called
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Cookiecutter PyPackage development tasks
"""
# To add a task, create a function with name starting with 'do_' that
# receives one argument (the parsed cmdline arguments object).
# Use a short docstring to serve as help.
#
# Example:
#
@pyadav
pyadav / sketch-never-ending.md
Created January 24, 2020 05:23 — forked from ismailmechbal/sketch-never-ending.md
Modify Sketch to never ending trial

###Sketch trial non stop

Open hosts files:

$ open /private/etc/hosts

Edit the file adding:

127.0.0.1 backend.bohemiancoding.com

127.0.0.1 bohemiancoding.sketch.analytics.s3-website-us-east-1.amazonaws.com

@pyadav
pyadav / delete_git_submodule.md
Created October 15, 2019 12:55 — forked from myusuf3/delete_git_submodule.md
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@pyadav
pyadav / package.json
Created July 29, 2019 11:25 — forked from jayphelps/package.json
TypeScript output es2015, esm (ES Modules), CJS, UMD, UMD + Min + Gzip. Assumes you install typescript (tsc), rollup, uglifyjs either globally or included as devDependencies
{
"scripts": {
"build": "npm run build:es2015 && npm run build:esm && npm run build:cjs && npm run build:umd && npm run build:umd:min",
"build:es2015": "tsc --module es2015 --target es2015 --outDir dist/es2015",
"build:esm": "tsc --module es2015 --target es5 --outDir dist/esm",
"build:cjs": "tsc --module commonjs --target es5 --outDir dist/cjs",
"build:umd": "rollup dist/esm/index.js --format umd --name YourLibrary --sourceMap --output dist/umd/yourlibrary.js",
"build:umd:min": "cd dist/umd && uglifyjs --compress --mangle --source-map --screw-ie8 --comments --o yourlibrary.min.js -- yourlibrary.js && gzip yourlibrary.min.js -c > yourlibrary.min.js.gz",
}
}
@pyadav
pyadav / docker-compose.yml
Created June 6, 2019 12:15 — forked from mhowlett/docker-compose.yml
Brings up a kafka cluster using Docker for Mac. Usage: MY_IP=<your ip> docker-compose up
---
version: '2'
services:
zk1:
image: confluentinc/cp-zookeeper:3.0.1
ports:
- "22181:22181"
environment:
ZOOKEEPER_SERVER_ID: 1
ZOOKEEPER_CLIENT_PORT: 22181
@pyadav
pyadav / background.js
Created April 22, 2019 01:29 — forked from muralikg/background.js
puppeteer screen capture demo. Currently records 10 second video. Change the timeout in background.js with your own logic to stop the recording when necessary. Try with `node export.js`
/* global chrome, MediaRecorder, FileReader */
chrome.runtime.onConnect.addListener(port => {
let recorder = null
port.onMessage.addListener(msg => {
console.log(msg);
switch (msg.type) {
case 'REC_STOP':
console.log('Stopping recording')
if (!port.recorderPlaying || !recorder) {