Posts

Architecture domain

Since Stephen Spewak’s Enterprise Architecture Planning (EAP) in 1993, and perhaps before then, it has been normal to divide enterprises architecture into four architecture domains.

  • Business architecture,
  • Data architecture,
  • Applications architecture,
  • Technology architecture.

Layers of the enterprise architecture

set registry npm config set registry=http://registry.npm.taobao.org npm config ls -l userconfig = "C:\\Users\\Administrator\\.npmrc" declare variables ES6 comes with two more options to declare your variables: const and let. In JavaScript ES6, you will rarely find var anymore. A variable declared with const cannot be re-assigned or re-declared. It cannot get mutated (changed, modified) Immutability is embraced in React and its ecosystem. That’s why const should be your default

Machine Learning 101 slidedeck

https://docs.google.com/presentation/d/1kSuQyW5DTnkVaZEjGYCkfOxvzCqGEFzWBy4e9Uedd9k/preview?imm_mid=0f9b7e&cmp=em-data-na-na-newsltr_20171213&slide=id.g183f28bdc3_0_90

AWS免费类型 首次注册后的12个月免费 永久免费 试用 aws永久免费的服务 计算服务 Lambda 1百万请求/月 400,000 GB-seconds of compute time per month Step 4000/月 存储 DynamoDB 25GB S3 The S3 free tier allows users to store 5 GB of data with standard storage, issue 20,000 GET requests and 2,000 PUT requests, and transfer 15 GB of data out each month Glacier 10GB

create rest api resource

awslocal apigateway create-rest-api --name 'My First API' --description 'This is my first API'
awslocal apigateway get-rest-apis                                         {
    "items": [
        {
            "createdDate": 1574513755,
            "id": "tjc336382o",
            "name": "hello_api2"
        },
        {
            "description": "This is my first API",
            "createdDate": 1574513755,
            "id": "foyylqv018",
            "name": "My First API"
        }
    ]
}

查看本月费用 The Cost Explorer API enables you to programmatically query your cost and usage data. You can query for aggregated data such as total monthly costs or total daily usage. You can also query for granular data, such as the number of daily write operations for Amazon DynamoDB database tables in your production environment Linux aws ce get-cost-and-usage --time-period Start=$(date -u -d "$TODAY" '+%Y-%m-01'),End=$(date -u +"%Y-%m-%d" --date="+1 day") --granularity MONTHLY --metrics UnblendedCost --output text 注意:CE服务是按api调用次数收费

前提条件 配置AWS aws configure list Name Value Type Location ---- ----- ---- -------- profile <not set> None None access_key ****************s-ok shared-credentials-file secret_key ****************-key shared-credentials-file region local config-file ~/.aws/config ~/.aws/config [default] output = json region = local ~/.aws/credentials [default] aws_access_key_id = any-id-is-ok aws_secret_access_key = fake-key 启动aws本地服务 localstack start 创建EC2 配置 mkdir ec2 cd ec2 touch ec2.tf ec2.tf provider "aws" { profile = "default" region = "us-east-1" endpoints { ec2 = "http://localhost:4597" sts = "http://localhost:4592" } } resource "aws_instance" "example" { ami = "ami-2757f631" instance_type = "t2.

标准设备 Bridge: A Linux bridge behaves like a network switch. It forwards packets between interfaces that are connected to it. It’s usually used for forwarding packets on routers, on gateways, or between VMs and network namespaces on a host. It also supports STP, VLAN filter, and multicast snooping. TUN: TUN (network Tunnel) devices work at the IP level or layer three level of the network stack and are usually point-to-point connections.

disable Taskbar thumbnail preview on Windows

https://www.windowscentral.com/how-disable-taskbar-thumbnail-preview-windows-10

最近在做智慧工地的项目,“智慧工地”的建设很大一部分信息主要是来自于工程BIM模型。 大部分情况下,BIM模型的精确度决定了“智慧工地”的开展程度。 “智慧工地”建设中,BIM模型的应用主要集中在以下几个方面:

  • 工程量的统计:分析各施工流水段各材料的工程量,如混凝土的工程量。

  • 施工模拟:施工进度计划与BIM模型相关联,对施工过程进行模拟。将实际工程进度与模拟进度进行对比,可以直观的看出工程是否滞后。

  • 可视化交底:通过BIM的可视化特点,对施工方案进行模拟,对施工人员进行3D动画交底,提高了交底的可行性。

  • 节点分析: 对复杂节点进行BIM建模,通过模型对复杂节点进行分析。

  • 综合管线碰撞检测: 检测预留孔洞、机电、设备管线安装碰撞。

从具体实现的角度对BIM和CAD做个比较

CAD BIM
工具集 2D(3D通过划线) 3D
连接过程 直接(2D对象直接连接) 间接(3D对象通过参数装配)
视图 高度具体的可视化视图 动态流线型视图,可随意放大,缩小
知识复用 MODEL(部件从MODEL抽取,而且部件的修改同时同步到MODEL)

基于WEB的3D建模工具

On the other hand, convolution is most typically done with 3x3 windows and no stride (stride 1). MATPLOTLIB Matplot is a python library that help us to plot data. The easiest and basic plots are line, scatter and histogram plots. Line plot is better when x axis is time. Scatter is better when there is correlation between two variables Histogram is better when we need to see distribution of numerical data.

Overlay vs underlay in summary

An Underlay network is the physical network responsible for the delivery of packets like DWDM, L2, L3, MPLS, or internet, etc. while an overlay is a logical network that uses network virtualization to built connectivity on top of physical infrastructure using tunneling encapsulations such as VXLAN, GRE, IPSec.

https://telcocloudbridge.com/blog/overlay-vs-underlay-networks/

Some things worth noting in br_add_if:

  • Only ethernet like devices can be added to bridge, as bridge is a layer 2 device.
  • Bridges cannot be added to a bridge.
  • New interface is set to promiscuous mode: dev_set_promiscuity(dev, 1)

https://goyalankit.com/blog/linux-bridge

节点维护 kubectl drain <node name> 维护有DaemonSet-managed pod的节点 kubectl drain <node name> --delete-local-data --force --ignore-daemonsets kubectl delete node <node name> sudo iptables -F sudo iptables -S create a regular pod 必须使用–restart=Never kubectl run -it curl --image=curlimages/curl:7.72.0 --restart=Never -- sh Never acts like a cronjob which is scheduled immediately. Always creates a deployment and the deployment monitors the pod and restarts in case of failure. kubeadm install mirror in china apt-get update && apt-get install -y apt-transport-https curl https://mirrors.

proxy config for Windows

   ~/.atom/.apmrc
   https-proxy = http://192.168.0.119:3128/
   http-proxy = http://192.168.0.119:3128/

Set Up & Use Atom as a Markdown Editor

https://www.portent.com/blog/content-strategy/atom-markdown.htm

# side car proxy 方法1 Namespace labels kubectl label ns servicea istio-injection=enabled Istio watches over all the deployments and adds the side car container to our pods.This is achieved by leveraging what is called MutatingAdmissionWebhooks, this feature was introduced in Kubernetes 1.9. So before the resources get created, the web hook intercepts the requests, checks if “Istio injection” is enabled for that namespace, and then adds the side car container to the pod

特性 与hadoop集成,支持MR数据读取 二级索引 支持长行(最多20亿的列) 动态schema更改 bulk load 其他数据源如hadoop with sstableloader, CSV importing with cqlsh DTCS优化时序数据性能 DB CATEGORY BY CAP CA To primarily support consistency and availability means that you’re likely using two-phase commit for distributed transactions. It means that the system will block when a network partition occurs, so it may be that your system is limited to a single data center cluster in an attempt to mitigate this.

<dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-zuul</artifactId> </dependency> gateway with routing @EnableZuulServer is used when you want to build your own routing service and not use any Zuul prebuilt capabilities. An example of this would be if you wanted to use Zuul to integrate with a service discovery engine other than Eureka (for example, Consul). We’ll only use the @EnableZuulServer annotation in this book. The Zuul proxy server is designed by default to work on the Spring products.

为什么要使用OIDC

只使用基本OAUTH2认证是不安全因为无法保证与用户的访问令牌是真实的。使用 OIDC可以做到这一点

https://security.stackexchange.com/questions/37818/why-use-openid-connect-instead-of-plain-oauth2/260519#260519

hasRole

a role is just an authority with a special ROLE_ prefix. So in Spring security 3 @PreAuthorize(“hasRole(‘ROLE_XYZ’)“) is the same as @PreAuthorize(“hasAuthority(‘ROLE_XYZ’)“) and in Spring security 4 @PreAuthorize(“hasRole(‘XYZ’)”) is the same as @PreAuthorize(“hasAuthority(‘ROLE_XYZ’)“).

http://localhost:8080/oauth/token

curl -u eagleeye:thisissecret -i -H ‘Accept:application/json’ -d “grant_type=password&scope=webclient&username=will&password=pass” -H “Content-Type: application/x-www-form-urlencoded” -X POST http://localhost:8080/oauth/token

access protected resource

机器学习是统计模型 对文本标签配对进行统计模型训练,使模型能够使用代表消息意图的预定义标签对未知输入文本进行分类 a statistical model is trained on text-label pairings, enabling the model to classify unknown input text with a pre-defined label representing the intention of the message Early neural networks Although the core ideas of neural networks were investigated in toy forms as early as the 1950s, the approach took decades to really get started. For a long time, the missing piece was a lack of an efficient way to train large neural networks.