Skip to content

Instantly share code, notes, and snippets.

View arashout's full-sized avatar

Arash Outadi arashout

View GitHub Profile
@arashout
arashout / before_after_func.go
Last active February 27, 2022 14:26
Inject Context Code
func changedFn() {
fmt.Println("Nothing to do here")
}
// TODO: Change this function to make a downstream call which needs a context.Context.
// func changedFn(ctx context.Context) {
// fmt.Println("Do some important work...")
// // Now also make a DB call
// makeDBCall(ctx, "Some important data!")
// }
// NOTE:
title layout
Documentation
doc

We have a few good resources for you to get started with Nu.

At the bottom of this page you can also find quick references to the commands provided by Nu Shell if you need quick support.

Books

<!doctype html>
<html lang="en-US">
<link rel="icon" type="image/png" href="https://www.nushell.sh/images/link.png">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- Begin Jekyll SEO tag v2.5.0 -->
<title>Documentation | Nushell</title>

Keybase proof

I hereby claim:

  • I am arashout on github.
  • I am arashoutadi (https://keybase.io/arashoutadi) on keybase.
  • I have a public key ASBoNS4gr-X983wcrhxa3Yz1RtMhFQ2_x2hNXr1qEWnq8Qo

To claim this, I am signing this object:

@arashout
arashout / lamba-test-function-preview.yaml
Created January 28, 2022 02:54
An example manifest for our LambdaDeployment Custom Resource Definition
apiVersion: lambda-deployment.keeptruckin.com/v1
kind: LambdaDeployment
metadata:
name: lambda-deployment-test-function-preview
spec:
# We control the lambda environment using the ARN
functionARN: arn:aws:lambda:us-east-1:123:function:test-function-preview
# These will be used to construct the key for the zip file uploaded to S3
functionName: test-function
# The SHA of the current HEAD commit
@arashout
arashout / example_ci.sh
Created January 28, 2022 03:25
A simple bash script to demonstrate the steps required in the CI
# 1. Build zip file of compiled source code
zip_path="PATH_TO_COMPILED_ZIPFILE"
# 2. Upload zip file to AWS S3 so that we can point to it when calling `update-function-code`
bucket="lambda-zips"
function_name="test-function"
commit=(git rev-parse HEAD)
# This destination key is important because it will determine where we look for code when calling `update-function-code`
# You want to include this information about the current state of the code in it. a git SHA isn't a bad idea
dst_key="${function_name}/${commit}.zip"