let requestData = {
"email": "",
"name": "",
"userID": ""
}
function validateRequest(reqData) {
return new Promise((resolve, reject) => {
if (reqData.email == "") {
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
Description: (SO0062) - Distributed Load Testing on AWS is a reference architecture to perform application load testing at scale. Version v2.0.1 | |
AWSTemplateFormatVersion: "2010-09-09" | |
Metadata: | |
AWS::CloudFormation::Interface: | |
ParameterGroups: | |
- Label: | |
default: Console access | |
Parameters: | |
- AdminName | |
- AdminEmail |
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
Description: (SO0062) - Distributed Load Testing on AWS is a reference architecture to perform application load testing at scale. Version v2.0.1 | |
AWSTemplateFormatVersion: "2010-09-09" | |
Metadata: | |
AWS::CloudFormation::Interface: | |
ParameterGroups: | |
- Label: | |
default: Console access | |
Parameters: | |
- AdminName | |
- AdminEmail |
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
# sh export_log.sh db_identifier | |
# If any of this commands fail, stop script. | |
set -e | |
db_identifier=$1 | |
date=$(date -v-7H +'%Y-%m-%d-%H') | |
log_file=~/Desktop/postgresql.log.$date | |
report_file=~/Desktop/out.$date.html | |
page_size=100000 |
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
# Docker postgres backup data | |
docker exec -t -e PGPASSWORD={password} {container_name} pg_dump -U {username} --column-inserts --data-only --schema={schema} {database_name} > /path/to/exported/file.sql | |
# Docker postgres run script from outside | |
docker cp /host_path.sql captrondb:/container_inside.sql | |
docker exec -u {login_user} {container_name} psql {database_name} {db_username} -f /container_inside.sql # with continer username | |
docker exec {container_name} psql {database_name} {db_username} -f /container_inside.sql # without continer username |
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
defmodule App do | |
@x "123" | |
@y "456" | |
@z "789" | |
def fx1 do | |
for _ <- 1..100_000 do | |
"#{@x}#{@y}#{@z}" | |
end | |
end |
Chắc bạn đang nghĩ tới One time Password. Nhưng không phải, OTP là cụm từ viết tắt của Open Telecom Platform. Đây có thể xem như là 1 framework dùng để thiết kế ứng dụng mà cấu thành bới những phần nhỏ của ứng dụng có thể chạy trên 1 process riêng. Nó bao gồm:
- an Erlang interpreter (which is called BEAM)
- an Erlang compiler
- a protocol for communication between servers (nodes)
- a CORBA Object Request Broker
- a static analysis tool called Dialyzer
- a distributed database server (Mnesia)
Mục đích bài viết này để
- Giới thiệu về phương pháp lập trình bất đồng bộ với cách tiếp cận khác những ngôn ngữ như Java hoặc C#.
- Những bước đầu tiên để viết 1 chương trình chạy bất đồng bộ bằng Elixir
- Hi vọng sẽ lôi kéo được thêm người học Elixir :)
Concurrent Programming hiểu đơn giản là việc lập trình cho phần mềm có thể chia nhỏ tác vụ và chạy đồng thời, độc lập với nhau. Elixir là ngôn ngữ lập trình đượ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" | |
"runtime" | |
"time" | |
) | |
var ( | |
INTERVAL_SEC = 10 |
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
#!/bin/bash | |
##################################################### | |
# Name: Bash CheatSheet for Mac OSX | |
# | |
# A little overlook of the Bash basics | |
# | |
# Usage: | |
# | |
# Author: J. Le Coupanec | |
# Date: 2014/11/04 |
NewerOlder