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 ( | |
"github.com/aws/aws-sdk-go/aws" | |
"github.com/aws/aws-sdk-go/aws/session" | |
"github.com/aws/aws-sdk-go/service/lambda" | |
"github.com/aws/aws-sdk-go/service/sts" | |
) | |
func main() { |
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
from enum import Enum | |
from functools import wraps | |
def assert_simgle_char(f): | |
@wraps(f) | |
def inner(c: str): | |
if len(c) != 1: | |
raise ValueError(c) | |
return f(c) |
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" | |
"time" | |
) | |
func main() { | |
typeSwitch := func(v interface{}) { | |
switch v.(type) { |
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 ( | |
"encoding/json" | |
"fmt" | |
"log" | |
"sort" | |
) | |
type Person struct { |
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
use std::fmt; | |
struct Circle { | |
radius: u32 | |
} | |
impl Circle { | |
fn diameter(&self) -> u32 { | |
self.radius * 2 | |
} |
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 json | |
import gzip | |
import logging | |
from base64 import b64decode | |
log = logging.getLogger(__name__) | |
def handler(event, context): |
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: |
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
aws_region='ap-northeast-1' | |
endpoint="https://DOMAIN_NAME.${aws_region}.es.amazonaws.com/" | |
AWS_ACCESS_KEY_ID='foo' | |
AWS_SECRET_ACCESS_KEY='bar' | |
curl $endpoint --verbose --aws-sigv4 "aws:amz:${aws_region}:es" --user "${AWS_ACCESS_KEY_ID}:${AWS_SECRET_ACCESS_KEY}" |
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
package main | |
import ( | |
"log" | |
"net/http" | |
"sync" | |
"text/template" | |
"path/filepath" | |
) |