I hereby claim:
- I am revmischa on github.
- I am cybermischa (https://keybase.io/cybermischa) on keybase.
- I have a public key ASA2gwimJ5iuAryMq_bkJ9OECR-6vpSHXoeCAGg_-GlY-Ao
To claim this, I am signing this object:
FROM lambci/lambda:build-python3.8 | |
# ref: https://chromium.googlesource.com/chromium/src.git/+refs | |
ARG VERSION | |
ENV VERSION ${VERSION:-master} | |
LABEL maintainer="Mischa Spiegelmock <me@mish.dev>" | |
LABEL chromium="${VERSION}" | |
WORKDIR / |
Mappings: | |
AWSAMIRegionMap: | |
# https://aws.amazon.com/amazon-linux-2/release-notes/ | |
AMI: | |
AMZNLINUXHVM: amzn2-ami-hvm-2.0.20200207.1-x86_64-gp2 | |
ap-east-1: | |
AMZNLINUXHVM: ami-47e4a036 | |
eu-central-1: | |
AMZNLINUXHVM: ami-0df0e7600ad0913a9 | |
us-west-2: |
I hereby claim:
To claim this, I am signing this object:
from random import uniform, randint | |
from locust import TaskSequence, HttpLocust | |
from locust import seq_task | |
import random | |
import string | |
import os | |
def randomStringDigits(stringLength=6): | |
"""Generate a random string of letters and digits """ |
plugins: | |
- serverless-pseudo-parameters | |
provider: | |
name: aws | |
runtime: python3.7 | |
stage: ${opt:stage, 'dev'} | |
environment: | |
SQLALCHEMY_DATABASE_URI: # DB DSN |
// for parsing "data" out of every response object | |
// https://stackoverflow.com/questions/23070298/get-nested-json-object-with-gson-using-retrofit/40691739#40691739 | |
class ItemTypeAdapterFactory : TypeAdapterFactory { | |
override fun <T> create(gson: Gson, type: TypeToken<T>): TypeAdapter<T> { | |
val delegate = gson.getDelegateAdapter(this, type) | |
val elementAdapter = gson.getAdapter(JsonElement::class.java) | |
return object : TypeAdapter<T>() { | |
override fun write(out: JsonWriter, value: T) { |
# SDL | |
AC_ARG_ENABLE([sdl], AS_HELP_STRING([--enable-sdl], [Build SDL2 application]), [], [enable_sdl=check]) | |
AS_IF([test "$enable_sdl" != "no"], [ | |
m4_include([m4/sdl2.m4]) | |
SDL_VERSION="2.0.5" | |
AS_IF([test "$TRAVIS"], [SDL_VERSION=2.0.2]) # travis has old SDL, we don't care | |
AS_IF([test "$EMSCRIPTEN"], [SDL_VERSION=2.0.0]) # emscripten has old SDL, we don't care | |
# Check for libSDL >= $SDL_VERSION | |
found_sdl=no |
from twilio.twiml.voice_response import VoiceResponse, Dial | |
from twilio.rest import Client | |
from urllib.parse import parse_qsl | |
import requests | |
import json | |
from pprint import pprint | |
import boto3 | |
session = boto3.session.Session() |
if [[ `whoami` == "root" ]]; then | |
ISROOT=1 | |
fi | |
# Git branch in prompt. | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(❲.*\)/ ❲\1❳/' | |
} | |
# git status | |
parse_git_dirty() { |
"""Sample handler for parsing Heroku logplex drain events (https://devcenter.heroku.com/articles/log-drains#https-drains). | |
Expects messages to be framed with the syslog TCP octet counting method (https://tools.ietf.org/html/rfc6587#section-3.4.1). | |
This is designed to be run as a Python3.6 lambda. | |
""" | |
import json | |
import boto3 | |
import logging | |
import iso8601 |