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
import functools | |
class Hook(object): | |
def init(self, event, context): | |
print(f'hook init: {event} {context}') | |
def before(self, event, context, record): | |
print(f'hook before: {event} {context} {record}') |
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 python | |
# -*- coding: utf-8 -*- | |
import os | |
from dotenv import load_dotenv | |
from pathlib import Path | |
from botocore.exceptions import ClientError | |
import boto3 | |
import json |
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
AWSTemplateFormatVersion: "2010-09-09" | |
Description: The AWS CloudFormation template for this Serverless application | |
Resources: | |
# Application resource | |
MyQueue: | |
Type: AWS::SQS::Queue | |
Properties: | |
Tags: | |
- Key: Name |
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
# | |
# CC0 license | |
# | |
function make-pypkg-dir () { | |
curdir=$(pwd); | |
created_dir=$(dirname $1)/$(basename $1); | |
mkdir $1 \ | |
&& touch ${created_dir}/__init__.py \ | |
&& echo "${created_dir}/__init__.py is created." |
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
import os | |
import json | |
import logging | |
from unittest.mock import Mock | |
LOG_LEVEL = os.environ.get('LOG_LEVEL', 'DEBUG').upper() | |
if not (LOG_LEVEL in ('DEBUG', 'INFO', 'WARN', 'WARNING', 'ERROR', 'CRITICAL', 'FATAL')): |
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
# Welcome to Serverless! | |
# | |
# This file is the main config file for your service. | |
# It's very minimal at this point and uses default values. | |
# You can always add more config options for more control. | |
# We've included some commented out config examples here. | |
# Just uncomment any of them to get that config option. | |
# | |
# For full config options, check the docs: | |
# docs.serverless.com |
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 ( | |
"log" | |
"net/http" | |
"sync" | |
"text/template" | |
"path/filepath" | |
) |
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
syntax on | |
set ts=4 | |
set sm | |
set number | |
inoremap <silent> jj <ESC> |
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
<v-container fuild fill-height> | |
<v-layout justify-center> | |
<v-flex xs12 sm8 md4> | |
<!-- login view --> | |
<v-card> | |
<v-toolbar dark flat> | |
<v-toolbar-title>Login Form</v-toolbar-title> | |
</v-toolbar> | |
<v-card-text> | |
<!-- login form --> |
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
resources: | |
Resouces: | |
SmSubscription: | |
Type: AWS::Logs::SubscriptionFilter | |
Properties: | |
LogGroupName: !Ref StateMachineLogGroup | |
FilterPattern: ExecutionFailed | |
DestinationArn: !GetAtt [JobFailureEventStream, Arn] | |
RoleArn: !GetAtt [KinesisSubscriptionRole, Arn] | |
JobFailureEventStream: |