Posts

心理学家:21世纪最重要的工作技能

专注是21世纪最重要的工作技能,

可是很多人没有意识到这一点。

1971年的时候心理学家西蒙就说过:“大量的信息

意味着另一种东西变得很稀缺:注意力”。 几十年之前这是个事实,

在21世纪,注意力变的更加珍贵。

工作环境正在发生快速的变化,在不远的将来,

在这个世界只存在两种人:

  • 一种注意力被别人完全控制和操纵的人

  • 一种注意力不可被打扰的人

研究人员告诉我们专注和注意力人们创新发展的原材料

下面是一些常见的工作干扰:

  • 聊天群

  • 会议

  • 电话

  • 邮件

  • 同事

uaa-on-serverless

在windows中使用docker有多种方式: docker WIN10 desktop WSL 本文主要介绍在WSL中使用docker 前提条件 Windows 10 Version 1803以上(支持cgroups) Ubuntu for WSL 16.0.4 LTS(WSL支持的最新版本) Docker 17.09 安装WSL install WSL WSL 命令行和默认 shell cmd:\>wsl wubigo:/tmp/docker-desktop-root/mnt/host/d/code#/etc# cat /etc/wsl.conf [automount] root = /mnt/host crossDistro = true options = "metadata" WSL DOCKER磁盘卷路径 cmd:\>docker volume inspect edgex_consul-config [ { "CreatedAt": "2022-03-07T08:04:34Z", "Driver": "local", "Labels": { "com.docker.compose.project": "edgex", "com.docker.compose.version": "2.2.3", "com.docker.compose.volume": "consul-config" }, "Mountpoint": "/var/lib/docker/volumes/edgex_consul-config/_data", "Name": "edgex_consul-config", "Options": null, "Scope": "local" } ] \\wsl$\docker-desktop-data\version-pack-data\community\docker\volumes\

昨天看到AWS STEP FUNCTIONS支持嵌套的工作流 ,当时就被震惊了。 AWS早些年推出SWF框架提供工作流服务, 后来工作流服务就没有大的工作,SWF框架的核心开发者一部分 离职去了UBER开发Cadence。没想到沉寂了多年的AWS会在STEP FUNCTIONS 支持工作流,看来这个千亿规模的市场又快被颠覆了。 20多年来,工作流都是超大型企业的配置专利,而STEP function的推出 可以预计,高大上的工作流服务会很快走进很多中小企业工作台并被普及应用。 回顾一下自己的工作历史: 从以前的数据中心服务器SA(2006), 到虚拟主机ESX, 再到OPENSTACK(2010)搭建混合云, 然后利用K8S(2014)搭建PaaS,现在SERVERLESS, 计算架构正在发生快速的演进。本文梳理了算力演进历史和未来 内容 从虚拟主机到容器 从容器到unikernel 函数计算的蓬勃发展 什么是虚拟计算 hypervisor分类 Type-1 裸机 KVM, QEMU, VMWare, Virtualbox Type-2 托管 XenServer, Hyper-v, KVM, ESX, Xen 虚拟机的问题 贵 一台云主机(8G/4Core/500MBps)在2017年的超过6000元/年 操作慢 一个普通的镜像在2G左右,再加上JAVA应用,一个镜像需要10G. 启动,备份非常不便。 容器计算 |虚拟机| 容器 |:—|:—|:—| 构件| 完整的操作系统和应用| 微内核和应用 虚拟技术| 硬件虚拟化| 操作系统虚拟化 容器计算带来什么好处 容器镜像小 alpine的容量是2M

AWS Step Functions VS

Adds Support for Nested Workflows

https://news.ycombinator.com/item?id=20726906

ISP Starter Kit

http://www.wispa.org/Resources/HOW-TO-START-A-WISP

wireless fiber

5G mobile broadband

https://www.huawei.com/en/press-events/news/2019/1/huawei-releases-wireless-fiber-solution

https://www.techdirt.com/articles/20190904/08392642916/colorado-town-offers-1-gbps-60-after-years-battling-comcast.shtml

DOCKER DEAMON PROXY

  • systemd level

/etc/systemd/system/docker.service.d/https-proxy.conf

[Service]
Environment="http_proxy=http://127.0.0.1:8123" "https_proxy=https://127.0.0.1:8123" "NO_PROXY=registry-1.docker.io"
sudo systemctl daemon-reload
sudo systemctl restart docker
  • service level

/etc/default/docker

export http_proxy="http://127.0.0.1:3128/"
  • daemon level

/etc/docker/daemon

DOCKER CLIENT PROXY

~/.docker/config.json

       "proxies":{
                "default":{}
        }

[TOC] AWS领先的设计理念和强大的技术生态 使你身陷其中,学习你要用它,开发你要 用它,上线还要用它。 一年下来项目还没有 正式商用,已经有十几万的研发费用。 今天向你推荐 localstack(与openstack啥关系?私有云+公有云), 让你使用AWS免费,至少在项目POC或开发测试阶段免费。 有了它, 你不用再焦急的等待老板审批公有云的 计算,存储,数据库资源开发申请。 是不是这个项目听起来很激动? 那如何使用localstack呢? 安装localstack localstack是一个非常活跃的正在快速成长中的项目, 建议通过源代码安装 下载源代码 git clone [email protected]:localstack/localstack.git git fetch --all git checkout tags/v0.10.3 -b v0.10.3 启用需要使用的AWS服务 修改配置文件,启用你需要使用的AWS服务:ec2,s3,iot,kafka等。 注意服务的名字必须来自服务名字列表, 否则不识别 启用服务就是修改下边的配置文件 localstack\docker-compose.yml SERVICES=${SERVICES-ec2,ecs,stepfunctions,iam,lambda,dynamodb,apigateway,s3,sns} DATA_DIR=${DATA_DIR-/tmp/localstack/data } volumes: - "${TMPDIR:-d:/tmp/localstack}:/tmp/localstack" make sure driver D is shared in docker desktop daemon docker-compose up localstack_1 | Starting mock S3 (http port 4572)... localstack_1 | Starting mock SNS (http port 4575).

工业物联网OSI参考模型

软件接口	            OPC
应用层	              ModBus
数据链路层	          CAN,ProfiBus
物理层	              RS232,RS485

OPC服务器

OPC SERVER = OPC驱动器

OPC

简单来说,OPC是一套标准,其目的是把PLC特定的协议(如Modbus,Profibus等)抽象成为标准化的接口,作为“中间人”的角色把通用的OPC“读写”请求转换成具体的设备协议来与HMI/SCADA系统直接对接

When the standard was first released in 1996, its purpose was to abstract PLC specific protocols (such as Modbus, Profibus, etc.) into a standardized interface allowing HMI/SCADA systems to interface with a “middle-man” who would convert generic-OPC read/write requests into device-specific requests and vice-versa.

注册用户 /etc/matrix-synapse/homeserver.yaml registration_shared_secret: sudo systemctl restart matrix-synapse 配置代理 sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/nginx-selfsigned.key -out /etc/ssl/certs/nginx-selfsigned.crt server { listen 443 ssl http2; listen [::]:443 ssl http2; # For the federation port listen 8448 ssl http2 default_server; listen [::]:8448 ssl http2 default_server; ssl_certificate /etc/ssl/certs/nginx-selfsigned.crt; ssl_certificate_key /etc/ssl/private/nginx-selfsigned.key; location ~* ^(\/_matrix|\/_synapse\/client) { proxy_pass http://localhost:8008; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header Host $host; # Nginx by default only allows file uploads up to 1M in size # Increase client_max_body_size to match max_upload_size defined in homeserver.

配置

  • 下载B2 TLS安全证书

    openssl s_client -showcerts -connect api.backblazeb2.com:443 > b2.crt
    
    mv b2.crt .minio/certs/CAs/
    
    set MINIO_ACCESS_KEY=B2_keyID
    set MINIO_SECRET_KEY=B2_applicationKey
    minio gateway b2
    

deploy VUE app under myweb context path server { listen 80; server_name 127.0.0.1; #listen 443 ssl; location /ibms/api/ { proxy_pass http://127.0.0.1:8080/; #proxy_set_header Host $http_host; add_header Cache-Control no-cache; add_header Pragma no-cache; add_header Expires 0; proxy_connect_timeout 200s; proxy_send_timeout 200s; proxy_read_timeout 200s; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header sn $http_sn; #405 重新代理 error_page 405 =200 http://$host$request_uri; } location /ibms { root /var/www/html; add_header Cache-Control no-cache; add_header Pragma no-cache; add_header Expires 0; #try_files $uri $uri/ @router; try_files $uri $uri/ /ibms/index.

https://www.sdxcentral.com/networking/virtualization/definitions/how-does-micro-segmentation-help-security-explanation/

give the wireless network higher priority than the wired WIRELESS CONNECTION > "Internet Protocol Version 4 (TCP/IPv4) Properties" > advanced TCP/IP setting > Automatic metric Uncheck it. That will enable a text box named “Interface metric”. Fill in a number. It needs to be larger than 1 (reserved for loopback) and the number(30) you choose for the wired network. WIRED CONNECTION > "Internet Protocol Version 4 (TCP/IPv4) Properties" > advanced TCP/IP setting > Automatic metric Again Uncheck “Automatic metric”, and fill in a number in the “Interface metric” box.

AppInfo 启动类型必须是自动或手动, 否则,msinstaller, services.msc, regedit 等都会报错: The Service command cannot be started, either because it is disabled or because it has no enabled devices associated with it AppInfo svchost.exe Facilitates the running of interactive applications with additional administrative privileges. Users will be unable to launch applications with the additional administrative privileges they may require to perform desired user tasks. These tools include regedit. Although safe to disable, this is not recommended since you need to boot into safe mode to enable again.

微服务认证和授权有很多方案, 这里比较各种主流方案的优缺点, 为你的业务系统选择MAA方案提供指南 方案 优点 缺点 分布式会话管理 简单,成熟,服务器统一管理 扩展性比较差 客户令牌 单点登录 API网关令牌管理 第三方应用授权 SSL/TLS 双向认证 方案 分布式会话管理 会话信息由服务器存储 实现方式: Sticky session Session replication Centralized session storage 客户令牌 令牌由客户持有 JWT: 头,负载和签名 头 { "typ": "JWT", "alg": "HS256" } 负载

之前一直用pycharm,今天把code升级到1.3.2的时候, 突然提示我安装python扩展,决定试试。 结果发现python的解释器设置有问题, 总是设置为系统的解释器, 而虚拟环境的解释器不起作用。

apt remove --purge python3.5
reboot

结果ubuntu桌面启动不了。好多应用程序例如chrome,virtualbox都消失了, 造成了很大的麻烦。

Ctrl+Alt+F1进入虚拟控制台登录

apt install python3.5
apt install ubuntu-desktop

重新安装chrome和virtualbox

cd /etc/apt/sources.list.d
sudo mv google-chrome.list.save google-chrome.list
apt update
apt install google-chrome-stable

本地流线型开发

本地流线型开发

集成开发,测试部署

IDE

K8S POD Command Override OCR docker Entrypoint vs k8s command docker k8s entry ENTRYPOINT command arguments CMD args k8s command and args override the default OCR Entrypoint and Cmd Dockerfile FROM alpine:3.8 RUN apk add --no-cache curl ethtool && rm -rf /var/cache/apk/* CMD ["--version"] ENTRYPOINT ["curl"] cmd-override-pod.yaml apiVersion: v1 kind: Pod metadata: name: command-override labels: purpose: override-command spec: containers: - name: command-override-container image: bigo/curl:v1 command: ["curl"] args: ["--help"] restartPolicy: Never docker run -it bigo/curl:v1 curl 7.

Node-level Logging System component logs RUN IN CONTAINER(Y/N) Systemd(W/WO) LOGGER LOCATION kubelet and container runtime W/O /var/log kubelet and container runtime W journald scheduler Y /var/log kube-proxy Y /var/log /var/lib/kubelet/pods/<PodUID>/ /var/log/pods/<PodUID>/<container_name> ls -l /var/log/pods/<PodUID>/<container_name>/ lrwxrwxrwx 1 root root 165 3月 30 06:52 0.log -> /var/lib/docker/containers/e74eafc4b3f0cfe2e4e0462c93101244414eb3048732f409c29cc54527b4a021/e74eafc4b3f0cfe2e4e0462c93101244414eb3048732f409c29cc54527b4a021-json.log Cluster-level logging Use a node-level logging agent that runs on every node.