This file contains 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
# If you come from bash you might have to change your $PATH. | |
# export PATH=$HOME/bin:/usr/local/bin:$PATH | |
# Path to your oh-my-zsh installation. | |
export ZSH="/home/peter/.oh-my-zsh" | |
# Set name of the theme to load --- if set to "random", it will | |
# load a random theme each time oh-my-zsh is loaded, in which case, | |
# to know which specific one was loaded, run: echo $RANDOM_THEME |
This file contains 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 node | |
/* | |
This will disable all EventBridge rules for a given prefix | |
Steps: | |
- lists all rules for a given prefix | |
- for all rules found, disables it | |
example: |
This file contains 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 node | |
/* | |
This will migrate all tables of a database to a new S3 Bucket | |
Steps: | |
- lists all tables of a database, performs the following for each: | |
- list all objects at the table's storage location (S3 path) | |
- copies all objects found to new bucket | |
- updates table config with new S3 path |
This file contains 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 | |
# to make this blubage easier to read ... | |
WHITE="97" | |
BOLDWHITE="\e[1;${WHITE}m" | |
ENDCOLOR="\e[0m" | |
# list buckets and loop | |
aws s3api list-buckets --query 'Buckets[].[Name]' --output text | while read bucket ; do | |
echo "${BOLDWHITE}${bucket}${ENDCOLOR}" |
This file contains 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
/* @theme versent */ | |
@import 'default'; | |
:root { | |
color: #FFFFFF; | |
background: #11333F; | |
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAfcAAAB2CAMAAADiMCrcAAAAqFBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////8j1z1tAAAAN3RSTlMAR5/4uCgD/PXpFdAkbKzGj3pTLpzxaQkG4w3s2BEYG01fiXTeH8qywZiEQjbUp1hkfzM6vJM+mREr6wAADLhJREFUeNrs3OmSmkAUBeALqIC4IyIoI+K+7573f7MoJo4CipKRkKK/f6NTlFXHvngalP6tbJOY9NnNiUmf+TRHTOoUxgViUievNIhJHX08ZlM+fZpLQSUmdQ7YEJM6UygmMWnTg8gRkzZdETwxaVMTYHSISRlOA9bEpMyxBWRYdU+brQxorLqnjWoAmBKTLtk+gAWr7imTbQOsuqdO4Rw7q+5pU1gAYNU9bdzYWXVPm+wl9j2r7qmi9nEmbYlJkbkBgFX3xGhSLGYyAFbdk2PVjSN5W4NLtIlJBLM97Or0YV0JAKvuiWIDSjFPn9QTcSEPiEmKEQDDydKnNCv4g90wnyCqhBOpVDPpE6wS/hizb0EmSQUXbWebo5+WHeKEVfcE+jLwm1juZelH2QauHGISpYFvUrm6bdJP6Qk4YdU9mZpD3BKVg/1FUZnH68jIL3HGqntSzUR4tPYbLkL2nVo9c90O2C1wY0lM4iwRQB5XVqpFL8oN7Olew7Lw5++ |
This file contains 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
/* | |
Deletes all SSM Parameters with the given prefix. | |
Example usage: | |
$ npm i @aws-sdk/client-ssm | |
$ AWS_PROFILE=nbos-ris-np-admin AWS_REGION=us-west-2 SSM_PATH_PREFIX=/ris/dev/1/wombatch/ npx ts-node . | |
*/ | |
import { SSMClient, DeleteParametersCommand, GetParametersByPathCommand } from "@aws-sdk/client-ssm" | |
const Path = process.env["SSM_PATH_PREFIX"] |
This file contains 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
// usage: | |
// $ AWS_PROFILE=foo AWS_REGION=us-east-1 go run . example-bucket 3 | |
package main | |
import ( | |
"context" | |
"fmt" | |
"log" | |
"os" | |
"strconv" |
This file contains 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 | |
import ( | |
"fmt" | |
"io/ioutil" | |
"log" | |
"strconv" | |
"github.com/apache/arrow/go/v7/arrow" | |
"github.com/apache/arrow/go/v7/arrow/array" |
This file contains 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
// Example usage: | |
// $ npm i @aws-sdk/client-glue | |
// $ DATABASE_NAME=example-database npx ts-node ./purge.ts | |
import * as AWS from "@aws-sdk/client-glue" | |
const client = new AWS.Glue({}) | |
const DatabaseName = process.env['DATABASE_NAME'] | |
// begin async |
This file contains 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 equal_test | |
import ( | |
"testing" | |
) | |
func TestMapOrder(t *testing.T) { | |
for i := 0; i < 100; i++ { | |
a := map[string]interface{}{ |
NewerOlder