Skip to content

Instantly share code, notes, and snippets.

@lmiguelmh
lmiguelmh / Docker logs for sam local invoke
Created May 21, 2019 22:57
Docker logs for sam local invoke
-- Reboot --
may 21 16:59:47 desktop systemd[1]: Starting Docker Application Container Engine...
may 21 16:59:48 desktop dockerd[1300]: time="2019-05-21T16:59:48.068753765-05:00" level=info msg="systemd-resolved is running, so using resolvconf: /run/systemd/resolve/resolv.conf"
may 21 16:59:48 desktop dockerd[1300]: time="2019-05-21T16:59:48.099138143-05:00" level=info msg="parsed scheme: \"unix\"" module=grpc
may 21 16:59:48 desktop dockerd[1300]: time="2019-05-21T16:59:48.099158867-05:00" level=info msg="scheme \"unix\" not registered, fallback to default scheme" module=grpc
may 21 16:59:48 desktop dockerd[1300]: time="2019-05-21T16:59:48.099337708-05:00" level=info msg="parsed scheme: \"unix\"" module=grpc
may 21 16:59:48 desktop dockerd[1300]: time="2019-05-21T16:59:48.099354685-05:00" level=info msg="scheme \"unix\" not registered, fallback to default scheme" module=grpc
may 21 16:59:48 desktop dockerd[1300]: time="2019-05-21T16:59:48.099513707-05:00" level=info msg="ccResolverWrapper: sending new addres
@lmiguelmh
lmiguelmh / enable_api_gateway_api_key_for_methods.sh
Created December 9, 2021 20:09
Enable API Key for all methods on API Gateway API
#!/bin/bash
api_gateway_method_enable_api_key() {
local api_id=$1
local method_id=$2
local method=$3
aws --profile "$profile" --region "$region" \
apigateway update-method \
--rest-api-id "$api_id" \
--resource-id "$method_id" \
@lmiguelmh
lmiguelmh / klaviyo_api_client.py
Created March 3, 2022 14:06
klaviyo_api_client.py
# coding: utf-8
# This file is a copy from Klaviyo's api_client.py without the multiprocessing module
# that means you have to use async_req=False as the argument for each call to the API
#
# For more information see the next issue posted on klaviyo's repo:
# https://github.com/klaviyo/klaviyo-python-sdk/issues/3
"""
Klaviyo API