The procedure below has been tested on a Digital Ocean VM with CentOS 7.4
# Install docker from RHEL’s standard repos
yum install -y docker
#
# We’ll activate the ‘user namespaces’ feature that defends against
/** | |
* Will generate versionCode from versionName that follows Semantic Versioning | |
*/ | |
ext { | |
/** | |
* Application version is located version variable. | |
* And should follow next policy: | |
* X1.X2.X3-type-flavor, where X - any digits and type is optional alphabetical suffix. | |
* X1 - major version | |
* X2 - minor version |
service: service-name | |
provider: | |
name: aws | |
runtime: nodejs6.10 | |
functions: | |
myfunc: | |
handler: handler.myfunc |
# Export as Text Table | |
aws --region XXXXXXXXX cognito-idp list-users --user-pool-id XXXXXXXXXXXXX --output table > ~/users.txt | |
# Export as JSON | |
aws --region XXXXXXXXX cognito-idp list-users --user-pool-id XXXXXXXXXXXXX --output json > ~/users.json | |
# Export User Pool with more than 60 users (pagination) | |
aws --region XXXXXXXXX cognito-idp list-users --user-pool-id XXXXXXXXXXXXX --pagination-token INCREDIBLYLONGSTRINGHERE --output json > ~/users-2.json |
# Welcome to Serverless! | |
# | |
# Happy Coding! | |
service: cross-region-sns-subscriber | |
# Keep environment specific configurations in separate files | |
custom: ${file(config/${env:STAGE}.json)} | |
provider: |
/** | |
* ANY | |
*/ | |
fun Any.toJson(): String = GsonInitializer.toJson(this) | |
/** | |
* VIEW | |
*/ | |
fun View.toggleVisibility(setAsVisible: Boolean) = if (setAsVisible) this.visible() else this.gone() |
interface ApiService { | |
@GET("api") | |
fun getUsers(@Query("result") result: Int): Observable<RandomUserResponse> | |
} |
sealed class Event { | |
object One : Event() | |
object Two : Event() | |
data class Three(val int: Int) : Event() | |
} | |
inline fun <reified T : Any> T.ordinal() = | |
T::class.java.superclass.classes.indexOfFirst { sub -> sub == this@ordinal::class.java } | |
fun testOrdinal() { |
var AWS = require('aws-sdk') | |
AWS.config.update({region: 'us-east-1'}) | |
const uuidV4 = require('uuid/v4') | |
var translate = new AWS.Translate(); | |
var polly = new AWS.Polly(); | |
var s3 = new AWS.S3({ | |
params: { | |
Bucket: 'YOURBUCKETNAME', | |
} | |
}) |
package com.your.package | |
import android.app.Dialog | |
import android.os.Bundle | |
import com.your.package.R | |
import com.google.android.material.bottomsheet.BottomSheetDialog | |
import com.google.android.material.bottomsheet.BottomSheetDialogFragment | |
/** | |
* BottomSheetDialog fragment that uses a custom |