Skip to content

Instantly share code, notes, and snippets.

View sravanth-space's full-sized avatar
🎯
Focusing

Sravanth sravanth-space

🎯
Focusing
View GitHub Profile
@sindresorhus
sindresorhus / esm-package.md
Last active May 8, 2024 22:50
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.
name: Build and Deploy
on:
push:
branches:
- master
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
@wyllie
wyllie / awsLayer.yml
Last active March 6, 2024 12:34
GitHub Actions workflow to deploy code to AWS Lambda Layers
# This workflow will install dependencies and create a build suitable
# to be used in an AWS Lambda Layer. The build will then be uploaded
# to S3 and then can be accessed from any lambda that uses the layer.
#
# This build is only for dev builds. Releases will be built from a
# seperate action.
#
# A new version of the layer will be created for every branch when a
# pull request is intitiated. This allows us to test the layer in a
# dev environment on AWS BEFORE the code is merged into master.
@0xjac
0xjac / private_fork.md
Last active May 9, 2024 00:37
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare git@github.com:usi-systems/easytrace.git

@parmentf
parmentf / GitCommitEmoji.md
Last active May 9, 2024 03:31
Git Commit message Emoji
@millermedeiros
millermedeiros / osx_setup.md
Last active May 7, 2024 08:01
Mac OS X setup

Setup Mac OS X

I've done the same process every couple years since 2013 (Mountain Lion, Mavericks, High Sierra, Catalina) and I updated the Gist each time I've done it.

I kinda regret for not using something like Boxen (or anything similar) to automate the process, but TBH I only actually needed to these steps once every couple years...