Skip to content

Instantly share code, notes, and snippets.

View vvsevolodovich's full-sized avatar

Vladimir Ivanov vvsevolodovich

View GitHub Profile
@vvsevolodovich
vvsevolodovich / gist:7bed408ed6b404c768e75c4219b65e5a
Created July 24, 2024 14:47
Terraform Load Balancing Example
provider "aws" {
alias = "us-east-1"
region = "us-east-1"
}
provider "aws" {
alias = "us-west-2"
region = "us-west-2"
}
@vvsevolodovich
vvsevolodovich / .sh
Created October 12, 2020 13:21
Openapi Automation with Github
#!/bin/bash
if [ $# -eq 0 ]
then
echo "usage: ./tools/openapi-generate <your_service> <project_id> <token>"
exit
fi
BASE_PATH=`pwd`"/$1/lib"
BASE_MODEL_PATH="$BASE_PATH/model"
GENERATED_PATH="$BASE_PATH/newversion/lib"
@vvsevolodovich
vvsevolodovich / BottomSheet.js
Created July 17, 2020 18:40
BottomSheet reference implementation
// @flow
import * as React from 'react'
import { Animated, StyleSheet, Text, View, Dimensions, TouchableWithoutFeedback } from 'react-native'
import {
PanGestureHandler,
NativeViewGestureHandler,
State,
TapGestureHandler
} from 'react-native-gesture-handler'
data class Movie(
var title: String,
var year: int,
var Description: String
) {
public constructor() : this("", 0, "")
}
class MovieService(private val iDataStore: IDataStore<Movie> =
Backendless.Data.of(Movie::class.java)) : IBackendlessService
public fun <R, T> (suspend R.() -> T).startCoroutine(
receiver: R,
completion: Continuation<T>
) {
createCoroutineUnchecked(receiver, completion).resume(Unit)
}
public actual override fun <T> interceptContinuation(continuation: Continuation<T>): Continuation<T> =
DispatchedContinuation(this, continuation)
_pool.execute(timeSource.trackTask(block))
IntStream
.range(1, 1_000_000)
.parallel()
.sum()
public actual val DefaultDispatcher: CoroutineDispatcher = CommonPool