Skip to content

Instantly share code, notes, and snippets.

View louislarry's full-sized avatar

Louis Larry louislarry

  • Indonesia
  • 15:33 (UTC +07:00)
View GitHub Profile
@louislarry
louislarry / delete_all_awslogs.sh.md
Created October 18, 2023 09:13 — forked from pahud/delete_all_awslogs.sh.md
delete all aws log groups

specify the region

export AWS_DEFAULT_REGION=ap-northeast-1
aws logs describe-log-groups --query 'logGroups[*].logGroupName' --output table | \
awk '{print $2}' | grep -v ^$ | while read x; do  echo "deleting $x" ; aws logs delete-log-group --log-group-name $x; done

only delete loggroup name starting with /aws/lambda

@louislarry
louislarry / angular-cheatsheet.md
Last active May 25, 2019 08:18
Angular Cheatsheet

Keybase proof

I hereby claim:

  • I am louislarry on github.
  • I am louislarry (https://keybase.io/louislarry) on keybase.
  • I have a public key ASCU40lrKeIxy_TYLaHl-teeEhRxxMYunksqfZ_mfJrXdwo

To claim this, I am signing this object:

@louislarry
louislarry / generate-pushid.js
Created February 27, 2017 07:06 — forked from mikelehen/generate-pushid.js
JavaScript code for generating Firebase Push IDs
/**
* Fancy ID generator that creates 20-character string identifiers with the following properties:
*
* 1. They're based on timestamp so that they sort *after* any existing ids.
* 2. They contain 72-bits of random data after the timestamp so that IDs won't collide with other clients' IDs.
* 3. They sort *lexicographically* (so the timestamp is converted to characters that will sort properly).
* 4. They're monotonically increasing. Even if you generate more than one in the same timestamp, the
* latter ones will sort after the former ones. We do this by using the previous random bits
* but "incrementing" them by 1 (only in the case of a timestamp collision).
*/