Skip to content

Instantly share code, notes, and snippets.

@silver-xu
silver-xu / aws-cloudtrail-events.md
Last active July 22, 2024 12:59
AWS Cloudtrail Events unofficial document

CloudTrail Event Lists

Service Event Names Description
accessanalyzer ApplyArchiveRule  
  CancelPolicyGeneration

Cancels the requested policy generation.

  CreateAccessPreview

Creates an access preview that allows you to preview IAM Access Analyzer findings for your resource before deploying resource permissions.

  CreateAnalyzer

Creates an analyzer for your account.

  CreateArchiveRule  
  DeleteAnalyzer  
  DeleteArchiveRule  

Enforcing the use of Yarn or NPM in a team

Leading a software development team and sick of telling everyone to yarn install instead of npm install everytime? Annoyed by someone checking in package-lock.json? All these issue could have been avoided by using one-package-manager.

One-package-manager is an un-opinionated script for Javascript Projects to help enforcing the use of Yarn or NPM consistently within a software development team that requires no installation and minimal configuration.

To enable one-package-manager, simply adding the following to your package.json:

{
@silver-xu
silver-xu / ts-boilerplate.md
Last active October 31, 2024 12:16
Setup a Node.js project with Typescript, ESLint, Prettier, Husky

Setup a Node.js project with Typescript, ESLint, Prettier, Husky

1_D8Wwwce8wS3auLAiM3BQKA

Starting a personal node project could be easy; starting a team node project could be challenging.

I am a developer currently working in SEEK Australia.

In my experience, common mistakes developer make when starting a projects are:

  • No Linting
@silver-xu
silver-xu / .profile
Created September 3, 2019 09:28
Adding git branch name to terminal
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
export PS1="\u@\h \[\033[32m\]\w\[\033[33m\]\$(parse_git_branch)\[\033[00m\] $ "