Skip to content

Instantly share code, notes, and snippets.

View Mohit0233's full-sized avatar
🎯
Focusing

Mohit Kumar Mohit0233

🎯
Focusing
View GitHub Profile
@sindresorhus
sindresorhus / esm-package.md
Last active September 20, 2024 23:01
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@reegnz
reegnz / README.md
Last active September 9, 2024 07:16
The Terraform group_by you've been missing

The Terraform group_by you've been missing

I'm playing around a lot nowadays with Terraform 0.13 and I found a really interesting feature and that's the ... symbol (also called an ellipsis) to be used with for expressions.

The operator can be used for group_by operations.

Example

We have a list of entries. The list contains employee/manager/project triplets.

@Pulimet
Pulimet / AdbCommands
Last active September 22, 2024 07:13
Adb useful commands list
Hi All!
I've recently launched a tool that wraps many of the commands here with a user interface. This desktop application is currently available for macOS. There's a roadmap outlining planned features for the near future.
Feel free to request any features you'd like to see, and I'll prioritize them accordingly.
One of the most important aspects of this application is that every command executed behind the scenes is displayed in a special log section. This allows you to see exactly what’s happening and learn from it.
Here's the link to the repository: https://github.com/Pulimet/ADBugger
App Description:
ADBugger is a desktop tool designed for debugging and QA of Android devices and emulators. It simplifies testing, debugging, and performance analysis by offering device management, automated testing, log analysis, and remote control capabilities. This ensures smooth app performance across various setups.
@StuartGordonReid
StuartGordonReid / RiskAdjustedReturnMetrics.py
Last active June 9, 2024 23:00
Measured of Risk-adjusted Return
import math
import numpy
import numpy.random as nrand
"""
Note - for some of the metrics the absolute value is returns. This is because if the risk (loss) is higher we want to
discount the expected excess return from the portfolio by a higher amount. Therefore risk should be positive.
"""
@k2052
k2052 / emacsCoreCommands.md
Created November 16, 2012 18:45
Emacs Shortcuts + Commands

Emacs Commands

Text

  • C-f: move cursor forward one char
  • C-b: mover cursor back one chart
  • C-n: mover cursor to next line
  • C-p: go to previous line
  • M-f: forward one word
  • M-b: move backward one word