Skip to content

Instantly share code, notes, and snippets.

View Yloganathan's full-sized avatar
🏠
Working from home

Yuva Yloganathan

🏠
Working from home
  • Heroic
  • Denver
View GitHub Profile
@Yloganathan
Yloganathan / config.yml
Last active May 21, 2019 00:20
Sample circleci config
version: 2.1
executors:
python-executor:
docker:
- image: circleci/python:3.7.2
working_directory: /home/circleci/project
jobs:
test:
executor: python-executor
@Yloganathan
Yloganathan / serverless.yml
Last active May 20, 2019 18:25
Serverless Framework yml for simple app
service: idea-app-api
provider:
name: aws
runtime: python3.7
memorySize: 512
timeout: 30
iamRoleStatements:
- Effect: Allow
Action:
@Yloganathan
Yloganathan / ideas.py
Last active May 20, 2019 17:52
Example backend for AWS Lambda
import boto3
import time
import json
import random
import string
import decimal
print('Loading function')
dynamo = boto3.resource('dynamodb').Table('Ideas')
@Yloganathan
Yloganathan / get-aws-creds.sh
Created May 12, 2019 05:23
Extended https://github.com/sweharris/aws-cli-mfa/blob/master/get-aws-creds and pushed the token, access key and Id to credentials
#!/bin/bash
# This uses MFA devices to get temporary (eg 12 hour) credentials. Requires
# a TTY for user input.
#
# GPL 2 or higher
if [ ! -t 0 ]
then
echo Must be on a tty >&2