Skip to content

Instantly share code, notes, and snippets.

View Phathdt's full-sized avatar
😆
there is always a reason to smile

Phathdt Phathdt

😆
there is always a reason to smile
  • Caliber Venture Builder
  • Ho Chi Minh city
View GitHub Profile
@Phathdt
Phathdt / eks.yml
Last active November 10, 2023 09:42
eks
module "vpc" {
source = "terraform-aws-modules/vpc/aws"
version = "~> 4.0"
name = "${var.project} EKS VPC"
cidr = var.vpc_cidr
azs = var.azs
private_subnets = [for k, v in var.azs : cidrsubnet(var.vpc_cidr, 4, k)]
public_subnets = [for k, v in var.azs : cidrsubnet(var.vpc_cidr, 8, k + 48)]
apiVersion: apps/v1
kind: Deployment
metadata:
name: my-app
spec:
replicas: 2
selector:
matchLabels:
app: my-app
template:
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-demo
namespace: demo-gateway
spec:
replicas: 3
selector:
matchLabels:
app: nginx-demo
source ~/.zplug/init.zsh
export ZSH=/Users/Phathdt/.oh-my-zsh
export HOMEBREW_NO_AUTO_UPDATE=1
source $ZSH/oh-my-zsh.sh
zplug "zplug/zplug", hook-build:'zplug --self-manage'
zplug "mdumitru/git-aliases"
zplug "zsh-users/zsh-autosuggestions"
zplug "zsh-users/zsh-syntax-highlighting"
z.;A$\^C}5Dq!4jR
defmodule OpolloBackgroundJob.Shopee.V2.PullingInRangeSKURatingTask do
require Logger
@delay_next_shop 15
# "2021-11-05T00:00:00Z", "2021-11-0T00:00:00Z"
def perform(start_time, end_time) do
Logger.warn(
"---------- STARTING Shopee PullingInRangeSKURatingTask start_time = #{start_time} end_time = #{end_time} ----------"
)
ErrClearCache = sdkcm.CustomError("ErrClearCache", "error when clear cache")
//org
ErrFindOrganization = sdkcm.CustomError("ErrFindOrganization", "error when find organization")
//app
ErrUpdateApp = sdkcm.CustomError("ErrUpdateApp", "error when update app")
ErrFindApp = sdkcm.CustomError("ErrFindApp", "error when find app")
//channel
{
"billing_address": {
"address_line_1": "27B Nguyễn Đình Chiểu",
"address_line_2": null,
"city": null,
"district": "Quận 1",
"email": "phat@onpoint.vn",
"first_name": "phat",
"last_name": "hoang",
"note": "gần cty",
version: "3.7"
services:
zoo:
image: confluentinc/cp-zookeeper:7.0.1
ports:
- "2181:2181"
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_SERVER_ID: 1
ZOOKEEPER_SERVERS: zoo:2888:3888
@Phathdt
Phathdt / main.go
Last active February 16, 2022 14:44
hmac sha256
package main
import (
"crypto/sha256"
"encoding/hex"
"fmt"
"strings"
)
func main() {