type FruitBasket struct {
Name string
Fruit []string
Id int64 `json:"ref"`
private string // An unexported field is not encoded.
Created time.Time
}
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - name: Check release type | |
| id: is-patch-release | |
| # The -u means 'unbuffered', so print() statements in your python code are output correctly | |
| # otherwise, they might be out of order with stdout from commands your code calls | |
| # {0} is replaced with the name of the temporary file GitHub Actions creates with | |
| # the contents of the run: | |
| shell: python -u {0} | |
| run: | | |
| import os | |
| import re |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # Use this script to: | |
| # - export a secure note | |
| # - sort it A-Z | |
| # - update the note with the sorted version | |
| # There isn't a lot of error checking, so be careful | |
| # Note use of gsed (GNU sed) -- which is not the BSD sed that Apple ships with OS/X | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Reveal a Secret | |
| # Set a secret from the command line: | |
| # | |
| # gh secret set TOP_SECRET -b"foobarbaz" -Rdexcom-inc/sre | |
| # | |
| on: | |
| push: | |
| branches: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: hello-world | |
| on: | |
| push: | |
| branches-ignore: | |
| - main | |
| workflow_dispatch: | |
| inputs: | |
| environment: | |
| description: 'To what environment?' | |
| type: choice |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # quick and dirty script to | |
| # - list buckets matching | |
| # - copy buckets matching | |
| # - remove buckets matching | |
| SEARCH=${1} | |
| ACTION=${2:-"ls"} | |
| if [ -z ${SEARCH} ]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| // Simple example of a lambda SQS processor | |
| import ( | |
| "context" | |
| "github.com/aws/aws-lambda-go/events" | |
| "github.com/aws/aws-lambda-go/lambda" | |
| "github.com/aws/aws-sdk-go-v2/service/cloudwatchevents" | |
| "github.com/rs/zerolog" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // You can edit this code! | |
| // Click here and start typing. | |
| package main | |
| import ( | |
| "fmt" | |
| "net/mail" | |
| "strings" | |
| ) |
This fast tutorial will teach you how to install redis-clion AWS EC2 without having to install the whole Redis Server. Firstly, SSH into your EC2 instance and run the following command:
$ sudo yum install gcc
This may return an "already installed" message, but that's OK. After that, just run:
$ wget http://download.redis.io/redis-stable.tar.gz && tar xvzf redis-stable.tar.gz && cd redis-stable && make && sudo cp src/redis-cli /usr/local/bin/ && sudo chmod 755 /usr/local/bin/redis-cli