Skip to content

Instantly share code, notes, and snippets.

@vladgolubev
vladgolubev / sls-install.sh
Last active Sep 15, 2021
Copy of script behind slss.io/install, but without logic for China region. This helps to avoid timeouts in CI environment, when originals script tries to install from China mirror by mistake.
View sls-install.sh
#!/usr/bin/env bash
#
# Download and install standalone binary.
# The binary version can be specified by setting a VERSION variable.
# e.g. VERSION=2.21.1 bash install.sh
# If VERSION is unspecified it will download the latest version.
set -e
reset="\033[0m"
View aws-get-api-key.sh
# usage get_api_key some-name
function get_api_key {
value=$(aws apigateway get-api-keys --query "items[?name=='${1}'].value" --include-values --output text);
echo "${value}";
}
View cw-log-groups-without-tags.ts
import {CloudWatchLogs} from 'aws-sdk';
const cw = new CloudWatchLogs({region: 'us-east-1'});
(async () => {
const results: CloudWatchLogs.LogGroup[] = [];
await getAllLogGroups(results, '');
for (const lg of results) {
View .yarnclean
# test directories
__tests__
^(?!@serverless/enterprise-plugin/).*test.*$ # fix for serverless-enterprise
tests
powered-test
*.test.js
*.tap.js
*.test.ts
*tests.html
View open-circleci-repo-on-branch.sh
function circl {
open "https://app.circleci.com/pipelines/github/ORG_NAME_HERE/$(basename $PWD)?branch=$(git rev-parse --abbrev-ref HEAD)"
}
View txt in the api gw root.yml
openapi: "3.0.1"
info:
title: "demo-test-verification"
version: "2019-12-27T23:52:02Z"
servers:
- url: "https://xxx.execute-api.us-east-1.amazonaws.com/{basePath}"
variables:
basePath:
default: "/prod"
paths:
@vladgolubev
vladgolubev / git-clean-branches.sh
Created Sep 17, 2018
git clean-branches - removes any local branch which is not master/develop(ment)
View git-clean-branches.sh
git config --global alias.clean-branches '!git branch | grep -v "master\|develop" | xargs git branch -D'
View aws-lambda-rpm-packages-amazon-linux-2018.03.txt
## This is a list of RPM packages available on AWS Lambda, Node.js 8.10 runtime, 22 May 2019, Amazon Linux 2018.03
## See https://github.com/claudiajs/lambda-vm-info for how this list was generated and to get an updated version
Installed Packages
ImageMagick.x86_64 6.7.8.9-15.21.amzn1 @amzn-main
alsa-lib.x86_64 1.0.22-3.9.amzn1 @amzn-main
audit-libs.x86_64 2.6.5-3.28.amzn1 @amzn-main
avahi-libs.x86_64 0.6.25-12.17.amzn1 @amzn-main
basesystem.noarch 10.0-4.9.amzn1 @amzn-main
View aws-lambda-libraries.txt
# AWS Lambda `ldconfig -p`, region `us-east-1`, nodejs 8.10 runtime, 22 May 2019, Amazon Linux 2018.03
# See https://github.com/claudiajs/lambda-vm-info for how this was generated and to create an updated version
241 libs found in cache `/etc/ld.so.cache'
libz.so.1 (libc6,x86-64) => /lib64/libz.so.1
libxslt.so.1 (libc6,x86-64) => /usr/lib64/libxslt.so.1
libxshmfence.so.1 (libc6,x86-64) => /usr/lib64/libxshmfence.so.1
libxml2.so.2 (libc6,x86-64) => /usr/lib64/libxml2.so.2
libxcb.so.1 (libc6,x86-64) => /usr/lib64/libxcb.so.1
libxcb-xvmc.so.0 (libc6,x86-64) => /usr/lib64/libxcb-xvmc.so.0
View visualize-ms-arch-step-2.dot
digraph architecture {
rankdir=LR;
// Storage - #303F9F (dark blue)
node[fillcolor="#303F9F" style="filled" fontcolor="white"];
database[label="DB"]; cache[label="Redis"];
// Client-side Apps - #FFEB3B (yellow)
node[fillcolor="#FFEB3B" style="filled" fontcolor="black"];
front_end[label="Front-end App"]; extension[label="Browser Extension"];