mirror of
https://github.com/wahyd4/one-knowledge.git
synced 2026-08-08 20:59:08 +10:00
Initial import: links posts + github knowledge
This commit is contained in:
@@ -0,0 +1,7 @@
|
|||||||
|
# Generated Indexes
|
||||||
|
|
||||||
|
This directory contains auto-generated index files for quick navigation.
|
||||||
|
|
||||||
|
## Purpose
|
||||||
|
|
||||||
|
Indexes help you quickly find content across the knowledge base.
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
# Concepts
|
||||||
|
|
||||||
|
This directory contains concept pages and explanatory documents.
|
||||||
|
|
||||||
|
Concept pages provide deeper explanations of key ideas and topics.
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
# GitHub Knowledge
|
||||||
|
|
||||||
|
Technical notes and reference materials from the [wahyd4/knowledge](https://github.com/wahyd4/knowledge) repository.
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
- **Total Files**: 31 markdown files
|
||||||
|
- **Source**: [github.com/wahyd4/knowledge](https://github.com/wahyd4/knowledge)
|
||||||
|
- **Location**: [./github-knowledge/](./github-knowledge/)
|
||||||
|
|
||||||
|
## Categories
|
||||||
|
|
||||||
|
### Development
|
||||||
|
|
||||||
|
| File | Description |
|
||||||
|
|------|-------------|
|
||||||
|
| [application.md](./github-knowledge/application.md) | Application development |
|
||||||
|
| [database.md](./github-knowledge/database.md) | Database concepts and queries |
|
||||||
|
| [devops.md](./github-knowledge/devops.md) | DevOps overview |
|
||||||
|
| [software-design.md](./github-knowledge/software-design.md) | Software design patterns |
|
||||||
|
| [web.md](./github-knowledge/web.md) | Web development |
|
||||||
|
|
||||||
|
### Programming Languages
|
||||||
|
|
||||||
|
| File | Description |
|
||||||
|
|------|-------------|
|
||||||
|
| [go.md](./github-knowledge/go.md) | Go programming |
|
||||||
|
| [java.md](./github-knowledge/java.md) | Java programming |
|
||||||
|
| [javascript.md](./github-knowledge/javascript.md) | JavaScript/Node.js |
|
||||||
|
| [kotlin.md](./github-knowledge/kotlin.md) | Kotlin programming |
|
||||||
|
| [ruby.md](./github-knowledge/ruby.md) | Ruby programming |
|
||||||
|
|
||||||
|
### Tools & Infrastructure
|
||||||
|
|
||||||
|
| File | Description |
|
||||||
|
|------|-------------|
|
||||||
|
| [devops/aws.md](./github-knowledge/devops/aws.md) | AWS |
|
||||||
|
| [devops/docker.md](./github-knowledge/devops/docker.md) | Docker |
|
||||||
|
| [devops/gcp.md](./github-knowledge/devops/gcp.md) | Google Cloud Platform |
|
||||||
|
| [devops/kubernetes.md](./github-knowledge/devops/kubernetes.md) | Kubernetes |
|
||||||
|
| [devops/linux.md](./github-knowledge/devops/linux.md) | Linux |
|
||||||
|
| [apps/elasticsearch.md](./github-knowledge/apps/elasticsearch.md) | Elasticsearch |
|
||||||
|
| [apps/etcd.md](./github-knowledge/apps/etcd.md) | etcd |
|
||||||
|
| [apps/kafka.md](./github-knowledge/apps/kafka.md) | Apache Kafka |
|
||||||
|
| [apps/mqtt.md](./github-knowledge/apps/mqtt.md) | MQTT |
|
||||||
|
|
||||||
|
### Other Topics
|
||||||
|
|
||||||
|
| File | Description |
|
||||||
|
|------|-------------|
|
||||||
|
| [apps.md](./github-knowledge/apps.md) | Applications overview |
|
||||||
|
| [devops/incident.md](./github-knowledge/devops/incident.md) | Incident management |
|
||||||
|
| [devops/more-tools.md](./github-knowledge/devops/more-tools.md) | More DevOps tools |
|
||||||
|
| [english/business-spoken-english.md](./github-knowledge/english/business-spoken-english.md) | Business English |
|
||||||
|
| [fintech.md](./github-knowledge/fintech.md) | Financial technology |
|
||||||
|
| [interviews/interview.md](./github-knowledge/interviews/interview.md) | Interview tips |
|
||||||
|
| [iot.md](./github-knowledge/iot.md) | Internet of Things |
|
||||||
|
| [microservice.md](./github-knowledge/microservice.md) | Microservices |
|
||||||
|
| [team-work.md](./github-knowledge/team-work.md) | Team collaboration |
|
||||||
|
| [testing.md](./github-knowledge/testing.md) | Testing strategies |
|
||||||
|
| [uncategorised.md](./github-knowledge/uncategorised.md) | Miscellaneous |
|
||||||
|
| [web-scraping.md](./github-knowledge/web-scraping.md) | Web scraping |
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
# GitHub Knowledge
|
||||||
|
|
||||||
|
Technical notes and reference materials ingested from [github.com/wahyd4/knowledge](https://github.com/wahyd4/knowledge).
|
||||||
|
|
||||||
|
## Structure
|
||||||
|
|
||||||
|
```
|
||||||
|
github-knowledge/
|
||||||
|
├── application.md
|
||||||
|
├── apps.md
|
||||||
|
├── database.md
|
||||||
|
├── devops.md
|
||||||
|
├── fintech.md
|
||||||
|
├── go.md
|
||||||
|
├── iot.md
|
||||||
|
├── java.md
|
||||||
|
├── javascript.md
|
||||||
|
├── kotlin.md
|
||||||
|
├── microservice.md
|
||||||
|
├── ruby.md
|
||||||
|
├── software-design.md
|
||||||
|
├── team-work.md
|
||||||
|
├── testing.md
|
||||||
|
├── uncategorised.md
|
||||||
|
├── web.md
|
||||||
|
├── web-scraping.md
|
||||||
|
├── apps/
|
||||||
|
│ ├── elasticsearch.md
|
||||||
|
│ ├── etcd.md
|
||||||
|
│ ├── kafka.md
|
||||||
|
│ └── mqtt.md
|
||||||
|
├── devops/
|
||||||
|
│ ├── aws.md
|
||||||
|
│ ├── docker.md
|
||||||
|
│ ├── gcp.md
|
||||||
|
│ ├── incident.md
|
||||||
|
│ ├── kubernetes.md
|
||||||
|
│ ├── linux.md
|
||||||
|
│ └── more-tools.md
|
||||||
|
├── english/
|
||||||
|
│ └── business-spoken-english.md
|
||||||
|
└── interviews/
|
||||||
|
└── interview.md
|
||||||
|
```
|
||||||
|
|
||||||
|
## Format
|
||||||
|
|
||||||
|
Each file includes YAML frontmatter with:
|
||||||
|
- Title
|
||||||
|
- Created date (from git history)
|
||||||
|
- Updated date (from git history)
|
||||||
|
- Type: summary
|
||||||
|
- Tags: tech, reference
|
||||||
|
- External link to original source on GitHub
|
||||||
@@ -0,0 +1,162 @@
|
|||||||
|
---
|
||||||
|
title: Application
|
||||||
|
created: 2019-05-13
|
||||||
|
updated: 2019-05-13
|
||||||
|
type: summary
|
||||||
|
tags: [tech, reference]
|
||||||
|
external: https://github.com/wahyd4/knowledge/blob/master/categories/application.md
|
||||||
|
---
|
||||||
|
|
||||||
|
# Search
|
||||||
|
|
||||||
|
- ElasticSearch
|
||||||
|
- Logstash
|
||||||
|
- Kibana
|
||||||
|
|
||||||
|
# APM
|
||||||
|
|
||||||
|
## Newrelic
|
||||||
|
|
||||||
|
The famous APM service provider, it support multiple languages, it requires you install agent to the application.
|
||||||
|
## Datadog
|
||||||
|
|
||||||
|
Another alternative APM service provider
|
||||||
|
## Pinpoint
|
||||||
|
|
||||||
|
The Java based open source APM.
|
||||||
|
|
||||||
|
# Ping check service
|
||||||
|
|
||||||
|
## Pingdom
|
||||||
|
It's a online web services, it gives you ability to do ping to your website from different regions, web servers.
|
||||||
|
|
||||||
|
# Monitoring
|
||||||
|
|
||||||
|
## Bosun
|
||||||
|
|
||||||
|
## Prometheus
|
||||||
|
|
||||||
|
### Prometheus Metric types
|
||||||
|
|
||||||
|
* Counter, A counter is a cumulative metric that represents a single monotonically increasing counter whose value can only increase or be reset to zero on restart. For example, you can use a counter to represent the number of requests served, tasks completed, or errors. Do not use a counter to expose a value that can decrease.
|
||||||
|
* A gauge is a metric that represents a single numerical value that can arbitrarily go up and down.
|
||||||
|
Gauges are typically used for measured values like temperatures or current memory usage, but also "counts" that can go up and down, like the number of running goroutines.
|
||||||
|
* A histogram samples observations (usually things like request durations or response sizes) and counts them in configurable buckets. It also provides a sum of all observed values.
|
||||||
|
* Summary, Similar to a histogram, a summary samples observations (usually things like request durations and response sizes). While it also provides a total count of observations and a sum of all observed values, it calculates configurable quantiles over a sliding time window.
|
||||||
|
|
||||||
|
|
||||||
|
# API
|
||||||
|
|
||||||
|
## RPC(remote procedure call)
|
||||||
|
- disadvantages
|
||||||
|
- coupling
|
||||||
|
- clients needs to know the request procedure names
|
||||||
|
- advantages
|
||||||
|
- more freedoms to define any requests.
|
||||||
|
- examples: <https://api.slack.com/methods>
|
||||||
|
|
||||||
|
## Restful /Representational State Transfer
|
||||||
|
- Easy to cache
|
||||||
|
- every url represent a resource
|
||||||
|
- disadvantages some special method is hard to use restful to name it. like /login, /resetpassword
|
||||||
|
- examples [https://developer.github.com/v3/](https://developer.github.com/v3/)
|
||||||
|
- methods
|
||||||
|
- GET
|
||||||
|
- POST
|
||||||
|
- PUT
|
||||||
|
- DELETE
|
||||||
|
|
||||||
|
## GraphQL
|
||||||
|
|
||||||
|
It Can allows you to define fields you want to have.
|
||||||
|
|
||||||
|
## gRPC
|
||||||
|
- protocol buffers
|
||||||
|
|
||||||
|
```go
|
||||||
|
// The greeter service definition.
|
||||||
|
service Greeter {
|
||||||
|
// Sends a greeting
|
||||||
|
rpc SayHello (HelloRequest) returns (HelloReply) {}
|
||||||
|
}
|
||||||
|
// The request message containing the user's name.
|
||||||
|
message HelloRequest {
|
||||||
|
string name = 1;
|
||||||
|
}
|
||||||
|
// The response message containing the greetings
|
||||||
|
message HelloReply {
|
||||||
|
string message = 1;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
- A opensource remote procedure call framework based on HTTP2 and protobuf
|
||||||
|
- advantages
|
||||||
|
- baed on HTTP2, better performance
|
||||||
|
- call remote like local method, and support multiple language
|
||||||
|
- protobuf serialization and deserialization is faster than JSON
|
||||||
|
|
||||||
|
## JSON-RPC
|
||||||
|
|
||||||
|
It's a little bit similar with gRPC one, but you define the action method in the JSON request body.
|
||||||
|
|
||||||
|
POST /api
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"jsonrpc": "2.0",
|
||||||
|
"method": "subtract",
|
||||||
|
"params": [42, 23],
|
||||||
|
"id": 1
|
||||||
|
}
|
||||||
|
```
|
||||||
|
Links:
|
||||||
|
* JSON-RPC specification: <http://www.jsonrpc.org/specification>
|
||||||
|
* O API - an alternative to REST APIs
|
||||||
|
: <https://hackernoon.com/o-api-an-alternative-to-rest-apis-e9a2ed53b93c>
|
||||||
|
|
||||||
|
## Open API
|
||||||
|
|
||||||
|
The OpenAPI Specification (OAS) defines a standard, programming language-agnostic interface description for REST APIs, which allows both humans and computers to discover and understand the capabilities of a service without requiring access to source code, additional documentation, or inspection of network traffic. When properly defined via OpenAPI, a consumer can understand and interact with the remote service with a minimal amount of implementation logic. Similar to what interface descriptions have done for lower-level programming, the OpenAPI Specification removes guesswork in calling a service. Open API can be described in `yaml` or `json`
|
||||||
|
|
||||||
|
### Use cases
|
||||||
|
|
||||||
|
* Interactive documentation
|
||||||
|
* Mock server generation
|
||||||
|
* Client code generation
|
||||||
|
* Automation testing
|
||||||
|
|
||||||
|
### Implementation
|
||||||
|
|
||||||
|
* [Swagger](http://swagger.io)
|
||||||
|
|
||||||
|
### Tools
|
||||||
|
|
||||||
|
[Redoc](https://github.com/Rebilly/ReDoc) OpenAPI/Swagger-generated API Reference Documentation, which gives you beautiful interface to the API spec file.
|
||||||
|
|
||||||
|
`redoc-cli` is a command line tool to generate a single HTML version of API Spec file.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
redoc-cli bundle swagger.json
|
||||||
|
```
|
||||||
|
Some sample swagger files: <http://rackerlabs.github.io/wadl2swagger/openstack.html>
|
||||||
|
|
||||||
|
## Versioning
|
||||||
|
|
||||||
|
### Proper define the version of your application
|
||||||
|
|
||||||
|
According to [semver](https://semver.org/), the following is the general guideline.
|
||||||
|
|
||||||
|
> Given a version number MAJOR.MINOR.PATCH, increment the:
|
||||||
|
>
|
||||||
|
> 1. MAJOR version when you make incompatible API changes,
|
||||||
|
> 2. MINOR version when you add functionality in a backwards-compatible manner, and
|
||||||
|
> 3. PATCH version when you make backwards-compatible bug fixes.
|
||||||
|
> Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format.
|
||||||
|
|
||||||
|
# Log and Error
|
||||||
|
|
||||||
|
## Sentry
|
||||||
|
|
||||||
|
Within Sentry, you can view all your errors, and also do filtering and grouping things.
|
||||||
|
|
||||||
|
## ELK
|
||||||
|
|
||||||
|
Elasticsearch + Logstash + Kibana
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
---
|
||||||
|
title: Apps
|
||||||
|
created: 2022-04-24
|
||||||
|
updated: 2022-04-24
|
||||||
|
type: summary
|
||||||
|
tags: [tech, reference]
|
||||||
|
external: https://github.com/wahyd4/knowledge/blob/master/categories/apps.md
|
||||||
|
---
|
||||||
|
|
||||||
|
# Some apps and tools
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
---
|
||||||
|
title: Elasticsearch
|
||||||
|
created: 2022-04-30
|
||||||
|
updated: 2022-04-30
|
||||||
|
type: summary
|
||||||
|
tags: [tech, reference]
|
||||||
|
external: https://github.com/wahyd4/knowledge/blob/master/categories/apps/elasticsearch.md
|
||||||
|
---
|
||||||
|
|
||||||
|
# Elasticsearch
|
||||||
|
|
||||||
|
Elasticsearch is a search engine based on the Lucene library. It provides a distributed, multitenant-capable full-text search engine with an HTTP web interface and schema-free JSON documents.
|
||||||
|
|
||||||
|
|
||||||
|
## Tips
|
||||||
|
|
||||||
|
## Calculate number of replicas
|
||||||
|
|
||||||
|
> N >= R + 1
|
||||||
|
|
||||||
|
N : number of nodes
|
||||||
|
R: Number of replicas
|
||||||
|
|
||||||
|
### How to resolve unassigned shards
|
||||||
|
|
||||||
|
https://www.datadoghq.com/blog/elasticsearch-unassigned-shards/#reason-3-you-need-to-reenable-shard-allocation
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
---
|
||||||
|
title: Etcd
|
||||||
|
created: 2022-06-10
|
||||||
|
updated: 2022-06-10
|
||||||
|
type: summary
|
||||||
|
tags: [tech, reference]
|
||||||
|
external: https://github.com/wahyd4/knowledge/blob/master/categories/apps/etcd.md
|
||||||
|
---
|
||||||
|
|
||||||
|
# etcd
|
||||||
|
|
||||||
|
etcd is a strongly consistent, distributed key-value store that provides a reliable way to store data that needs to be accessed by a distributed system or cluster of machines. It gracefully handles leader elections during network partitions and can tolerate machine failure, even in the leader node.
|
||||||
|
|
||||||
|
## Set up a ETCD cluster
|
||||||
|
|
||||||
|
https://github.com/kelseyhightower/kubernetes-the-hard-way/blob/master/docs/07-bootstrapping-etcd.md
|
||||||
|
|
||||||
|
## Tips
|
||||||
|
|
||||||
|
### Make the k8s embedded single etcd to be a cluster
|
||||||
|
|
||||||
|
Unfortunately, there is no straightfoward way to change the existing embedded etcd to a cluster.
|
||||||
|
But we can leverage etcd `make-mirror` command to replicate the existing etcd to a new cluster.
|
||||||
|
The steps are:
|
||||||
|
|
||||||
|
1. Follow the guide to setup a new etcd cluster
|
||||||
|
2. Run the following command to replicate k8s emmbedded etcd data to the new cluster
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo ETCDCTL_API=3 etcdctl make-mirror https://new_etcd_node:2379 --endpoints=https://192.168.1.2:2379 --cacert=/k8s_etcd/ca.crt --cert=/k8s_etcd/server.crt --key=/k8s_etcd/server.key --dest-cacert=/new_etcd/ca.pem --dest-cert=/new_etcd/etcd.pem --dest-key=/new_etcd/etcd-key.pem
|
||||||
|
```
|
||||||
|
3. On one of the new cluster node, to verify the data
|
||||||
|
```
|
||||||
|
sudo ETCDCTL_API=3 etcdctl get --prefix=true "" -w json --endpoints=https://127.0.0.1:2379 --cacert=/new_etcd/ca.pem --cert=/new_etcd/etcd.pem --key=/new_etcd/etcd-key.pem
|
||||||
|
```
|
||||||
|
|
||||||
|
### Join another existing cluster
|
||||||
|
|
||||||
|
1. Run the join command on an existing node, for instnace
|
||||||
|
```
|
||||||
|
sudo ETCDCTL_API=3 etcdctl member add server-2 --peer-urls=https://192.168.1.xxx:2380 --endpoints=https://192.168.1.xxx:2379,https://192.168.1.xxx:2379 --cacert=/etc/etcd/ca.pem --cert=/etc/etcd/etcd.pem --key=/etc/etcd/etcd-key.pem
|
||||||
|
```
|
||||||
|
2. Prepare for the configursations for the new node, and remember to set `--initial-cluster-state` to existing, add put all the existing nodes to `--initial-cluster` field
|
||||||
|
3. Start the etcd service of the new node
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
---
|
||||||
|
title: Kafka
|
||||||
|
created: 2022-04-24
|
||||||
|
updated: 2022-04-24
|
||||||
|
type: summary
|
||||||
|
tags: [tech, reference]
|
||||||
|
external: https://github.com/wahyd4/knowledge/blob/master/categories/apps/kafka.md
|
||||||
|
---
|
||||||
|
|
||||||
|
# Kafka
|
||||||
|
|
||||||
|
# What is Kafka
|
||||||
|
|
||||||
|
<iframe width="560" height="315" src="https://www.youtube.com/embed/FKgi3n-FyNU" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
|
||||||
|
|
||||||
|
Apache Kafka is an open-source distributed event streaming platform
|
||||||
|
|
||||||
|
## How to migrate self hosted Kafka to Some hosting vendor
|
||||||
|
|
||||||
|
1. Setup target Kafka cluster
|
||||||
|
2. Setup various replicators to replicate schemas and events in kafka. Before replicate schemas, make sure the schema registry in target cluster is empty and in `IMPORT_ONLY` mode.
|
||||||
|
3. Setup users, roles for applications in the target clusters
|
||||||
|
4. Start migrate consumers including apps and sink connectors
|
||||||
|
1. Reset consumer offset in the target Kafka cluster for a consumer(As the offsert will be different in most cases, unless the no events from the source cluster ever been deleted.)
|
||||||
|
2. Update Kafka configurations and scema registries for the consumer to the new cluster
|
||||||
|
3. Restarted consumer to consume events from the new cluster
|
||||||
|
5. Stop schema replicator before migrating publisher, otherwise new publisher won't be able to publish schemas as the schema registry is in IMPORT mode. Once updating target schema registry to `READ_WRITE` mode, then schema replicator won't work anymore.
|
||||||
|
6. Once all the consumers migerated, then migrated publichers (apps and source connectors)
|
||||||
|
1. Update Kafka configurations for Kafka clusters and shema registries
|
||||||
|
2. Restart publishers
|
||||||
|
7. Stop replcators and source Kafka clusters
|
||||||
|
|
||||||
|
## A typical Kafka workflow with schema registry
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Note: image from https://docs.confluent.io/platform/current/schema-registry/index.html
|
||||||
|
|
||||||
|
|
||||||
|
## Some facts and best practices
|
||||||
|
|
||||||
|
* Set proper partitions for topics, would be better to start with 3 or more depends on the numbers of events and type of events in the topic
|
||||||
|
* Enable RBAC for topics, which means a Kafka user/service account can only access what he supposed to access. Minimal access scope
|
||||||
|
* Use Debezium related source connnectors to achieve at least once delivery guarantee.
|
||||||
|
* Use various sink connectors to export data via Restful API/S3 bucket and so on.
|
||||||
|
* Set proper schema compatibility levels and tests to make sure existing events can be still consumed by new version of consumers.
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
---
|
||||||
|
title: Mqtt
|
||||||
|
created: 2022-04-24
|
||||||
|
updated: 2022-04-24
|
||||||
|
type: summary
|
||||||
|
tags: [tech, reference]
|
||||||
|
external: https://github.com/wahyd4/knowledge/blob/master/categories/apps/mqtt.md
|
||||||
|
---
|
||||||
|
|
||||||
|
## MQTT
|
||||||
|
|
||||||
|
A lightweight messaging protocol for small sensors and mobile devices, optimized for high-latency or unreliable networks. It's basically a machine-to-machine `protocol`
|
||||||
@@ -0,0 +1,186 @@
|
|||||||
|
---
|
||||||
|
title: Database
|
||||||
|
created: 2021-01-26
|
||||||
|
updated: 2021-01-26
|
||||||
|
type: summary
|
||||||
|
tags: [tech, reference]
|
||||||
|
external: https://github.com/wahyd4/knowledge/blob/master/categories/database.md
|
||||||
|
---
|
||||||
|
|
||||||
|
# Relation
|
||||||
|
- Mysql
|
||||||
|
- Postgres
|
||||||
|
- Microsoft SQL Server
|
||||||
|
- Oracle
|
||||||
|
- Sqlite
|
||||||
|
|
||||||
|
# NoSql
|
||||||
|
- Monodb
|
||||||
|
- Replica Set
|
||||||
|
- Primary
|
||||||
|
- Secondary
|
||||||
|
- Hidden
|
||||||
|
- Redis
|
||||||
|
- Cluster
|
||||||
|
- Strong recommend 3 masters and 3 slaves
|
||||||
|
- Hbase
|
||||||
|
- Cassendra
|
||||||
|
|
||||||
|
# SQL
|
||||||
|
|
||||||
|
## Index
|
||||||
|
- Index is unique but not mandatory
|
||||||
|
## join
|
||||||
|
|
||||||
|
## MYSQL
|
||||||
|
|
||||||
|
### Tips
|
||||||
|
- datetime
|
||||||
|
- 8 bytes
|
||||||
|
`1000-01-01 00:00:00 ~ 9999-12-31 23:59:59`
|
||||||
|
- store a absolute value
|
||||||
|
- timestamp
|
||||||
|
- 4 bytes `1970-01-01 08:00:01 ~ 2038-01-19 11:14:07`
|
||||||
|
- will impacted by time zone
|
||||||
|
- index by timestamp will be faster than datetime due to 4 bytes.
|
||||||
|
|
||||||
|
## Postgres
|
||||||
|
|
||||||
|
### Commands
|
||||||
|
|
||||||
|
```bash
|
||||||
|
\list # list databases
|
||||||
|
\c one # switch to datebase one
|
||||||
|
\dt list all the tables
|
||||||
|
```
|
||||||
|
|
||||||
|
### Create a table
|
||||||
|
|
||||||
|
```sql
|
||||||
|
CREATE TABLE pm25
|
||||||
|
(
|
||||||
|
id SERIAL, -- id with auto increment
|
||||||
|
time TIMESTAMP not NULL,
|
||||||
|
pm25 integer DEFAULT 0,
|
||||||
|
concentration integer DEFAULT 0,
|
||||||
|
city VARCHAR not NULL
|
||||||
|
);
|
||||||
|
|
||||||
|
```
|
||||||
|
### Import data from CSV
|
||||||
|
```sql
|
||||||
|
COPY persons(first_name,last_name,dob,email)
|
||||||
|
FROM 'C:\tmp\persons.csv' DELIMITER ',' CSV HEADER;
|
||||||
|
```
|
||||||
|
### Import data with SQL
|
||||||
|
```bash
|
||||||
|
psql -U postgres -W -p 5432 -d somename -h 127.0.0.1 -f ~/somefile.sql
|
||||||
|
```
|
||||||
|
|
||||||
|
### Create user
|
||||||
|
```sql
|
||||||
|
CREATE DATABASE yourdbname;
|
||||||
|
CREATE USER youruser WITH ENCRYPTED PASSWORD 'yourpass';
|
||||||
|
GRANT ALL PRIVILEGES ON DATABASE yourdbname TO youruser;
|
||||||
|
```
|
||||||
|
|
||||||
|
### Update
|
||||||
|
|
||||||
|
```sql
|
||||||
|
UPDATE badges set type = 'onetype' where label != ''
|
||||||
|
```
|
||||||
|
|
||||||
|
### Queries
|
||||||
|
|
||||||
|
#### Query with json field
|
||||||
|
|
||||||
|
```sql
|
||||||
|
select count(*), arguments ->> 'SomeProp', arguments -> 'FirstLevel' ->> 'SecondLevel' from jobs group by arguments ->> 'SomeProp', arguments -> 'FirstLevel' ->> 'SecondLevel'
|
||||||
|
```
|
||||||
|
### Group by
|
||||||
|
|
||||||
|
```sql
|
||||||
|
select job_ids from (
|
||||||
|
select count(*) as c, string_agg(cast(job_id as varchar),',') as job_ids, args ->> 'ResourceID' args -> 'Measurement' ->> 'Property'
|
||||||
|
from jobs
|
||||||
|
group by args ->> 'ResourceID', args -> 'Measurement' ->> 'Property'
|
||||||
|
) as f1 where c > 1;
|
||||||
|
```
|
||||||
|
#### Group by time
|
||||||
|
|
||||||
|
To get data entries grouped by time (minute/hour/day/month)
|
||||||
|
|
||||||
|
```sql
|
||||||
|
select
|
||||||
|
date_trunc('day', created_at), -- or hour, day, week, month, year
|
||||||
|
count(1)
|
||||||
|
from view_records
|
||||||
|
group by 1
|
||||||
|
```
|
||||||
|
|
||||||
|
If you want to group time base on a specific timezone and the timestamp field you choose contains that information.
|
||||||
|
|
||||||
|
```sql
|
||||||
|
select
|
||||||
|
date_trunc('day', created_at AT TIME ZONE 'Australia/Melbourne'), -- or hour, day, week, month, year
|
||||||
|
count(1)
|
||||||
|
from view_records
|
||||||
|
group by 1
|
||||||
|
```
|
||||||
|
|
||||||
|
If the time field doesn't have timezone information, we will need to ask postgres to intercept the time to the timezone we would like to use
|
||||||
|
|
||||||
|
```sql
|
||||||
|
select
|
||||||
|
date_trunc('day', created_at AT TIME ZONE 'Australia/Melbourne') AT TIME ZONE 'China/Beijing')
|
||||||
|
count(1)
|
||||||
|
from view_records
|
||||||
|
group by 1
|
||||||
|
```
|
||||||
|
|
||||||
|
### Postgres trigger example
|
||||||
|
|
||||||
|
Giving we have a table called users, and the columns are:
|
||||||
|
```bash
|
||||||
|
id name age
|
||||||
|
1 tom 10
|
||||||
|
2 Dave 17
|
||||||
|
```
|
||||||
|
there is a requirement which is when some user's age turn to `18` move that person to `adults` table.
|
||||||
|
The adults table have the same fields with `users`.
|
||||||
|
|
||||||
|
The potential trigger implementation can be
|
||||||
|
|
||||||
|
```sql
|
||||||
|
|
||||||
|
CREATE OR REPLACE FUNCTION to_adults ()
|
||||||
|
RETURNS TRIGGER
|
||||||
|
AS $$
|
||||||
|
BEGIN
|
||||||
|
INSERT INTO adults VALUES (new.*);
|
||||||
|
DELETE FROM users WHERE age >= 18;
|
||||||
|
RETURN NEW;
|
||||||
|
END;
|
||||||
|
$$
|
||||||
|
LANGUAGE plpgsql;
|
||||||
|
|
||||||
|
CREATE TRIGGER to_adults_trigger
|
||||||
|
AFTER UPDATE ON users
|
||||||
|
FOR EACH ROW
|
||||||
|
WHEN (NEW.age >= 18)
|
||||||
|
EXECUTE PROCEDURE to_adults();
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## SQL join diagram
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
# Message Queue
|
||||||
|
|
||||||
|
# Rabbitmq
|
||||||
|
|
||||||
|
# activeMQ
|
||||||
|
|
||||||
|
# Redis
|
||||||
@@ -0,0 +1,353 @@
|
|||||||
|
---
|
||||||
|
title: Devops
|
||||||
|
created: 2020-02-17
|
||||||
|
updated: 2020-02-17
|
||||||
|
type: summary
|
||||||
|
tags: [tech, reference]
|
||||||
|
external: https://github.com/wahyd4/knowledge/blob/master/categories/devops.md
|
||||||
|
---
|
||||||
|
|
||||||
|
## CI
|
||||||
|
|
||||||
|
### Platforms
|
||||||
|
- Jenkins
|
||||||
|
- Gitlab CI
|
||||||
|
- Travis
|
||||||
|
- Buildkite
|
||||||
|
|
||||||
|
### Scaleable Jenkins architecture
|
||||||
|
|
||||||
|

|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
|
- Use external storage plugin to host artifacts
|
||||||
|
- Store job/pipeline configurations in code repository
|
||||||
|
- Use Docker container for each stage, which means to need to install various dependencies on agents
|
||||||
|
- Scale up/down(On-demand) agents when needed to save costs.
|
||||||
|
|
||||||
|
### A simple jenkins job configuration file
|
||||||
|
|
||||||
|
```
|
||||||
|
pipeline {
|
||||||
|
agent none
|
||||||
|
stages {
|
||||||
|
stage('Back-end') {
|
||||||
|
agent {
|
||||||
|
docker { image 'maven:3-alpine' }
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
sh 'mvn --version'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Front-end') {
|
||||||
|
agent {
|
||||||
|
docker { image 'node:7-alpine' }
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
sh 'node --version'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
### A more comprehensive jenkins pipeline
|
||||||
|
|
||||||
|
From <https://github.com/GoogleCloudPlatform/continuous-deployment-on-kubernetes/blob/master/sample-app/Jenkinsfile>
|
||||||
|
|
||||||
|
```
|
||||||
|
pipeline {
|
||||||
|
|
||||||
|
environment {
|
||||||
|
PROJECT = "REPLACE_WITH_YOUR_PROJECT_ID"
|
||||||
|
APP_NAME = "gceme"
|
||||||
|
FE_SVC_NAME = "${APP_NAME}-frontend"
|
||||||
|
CLUSTER = "jenkins-cd"
|
||||||
|
CLUSTER_ZONE = "us-east1-d"
|
||||||
|
IMAGE_TAG = "gcr.io/${PROJECT}/${APP_NAME}:${env.BRANCH_NAME}.${env.BUILD_NUMBER}"
|
||||||
|
JENKINS_CRED = "${PROJECT}"
|
||||||
|
}
|
||||||
|
|
||||||
|
agent {
|
||||||
|
kubernetes {
|
||||||
|
label 'sample-app'
|
||||||
|
defaultContainer 'jnlp'
|
||||||
|
yaml """
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Pod
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
component: ci
|
||||||
|
spec:
|
||||||
|
# Use service account that can deploy to all namespaces
|
||||||
|
serviceAccountName: cd-jenkins
|
||||||
|
containers:
|
||||||
|
- name: golang
|
||||||
|
image: golang:1.10
|
||||||
|
command:
|
||||||
|
- cat
|
||||||
|
tty: true
|
||||||
|
- name: gcloud
|
||||||
|
image: gcr.io/cloud-builders/gcloud
|
||||||
|
command:
|
||||||
|
- cat
|
||||||
|
tty: true
|
||||||
|
- name: kubectl
|
||||||
|
image: gcr.io/cloud-builders/kubectl
|
||||||
|
command:
|
||||||
|
- cat
|
||||||
|
tty: true
|
||||||
|
"""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Test') {
|
||||||
|
steps {
|
||||||
|
container('golang') {
|
||||||
|
sh """
|
||||||
|
ln -s `pwd` /go/src/sample-app
|
||||||
|
cd /go/src/sample-app
|
||||||
|
go test
|
||||||
|
"""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Build and push image with Container Builder') {
|
||||||
|
steps {
|
||||||
|
container('gcloud') {
|
||||||
|
sh "PYTHONUNBUFFERED=1 gcloud builds submit -t ${IMAGE_TAG} ."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Deploy Canary') {
|
||||||
|
// Canary branch
|
||||||
|
when { branch 'canary' }
|
||||||
|
steps {
|
||||||
|
container('kubectl') {
|
||||||
|
// Change deployed image in canary to the one we just built
|
||||||
|
sh("sed -i.bak 's#gcr.io/cloud-solutions-images/gceme:1.0.0#${IMAGE_TAG}#' ./k8s/canary/*.yaml")
|
||||||
|
step([$class: 'KubernetesEngineBuilder',namespace:'production', projectId: env.PROJECT, clusterName: env.CLUSTER, zone: env.CLUSTER_ZONE, manifestPattern: 'k8s/services', credentialsId: env.JENKINS_CRED, verifyDeployments: false])
|
||||||
|
step([$class: 'KubernetesEngineBuilder',namespace:'production', projectId: env.PROJECT, clusterName: env.CLUSTER, zone: env.CLUSTER_ZONE, manifestPattern: 'k8s/canary', credentialsId: env.JENKINS_CRED, verifyDeployments: true])
|
||||||
|
sh("echo http://`kubectl --namespace=production get service/${FE_SVC_NAME} -o jsonpath='{.status.loadBalancer.ingress[0].ip}'` > ${FE_SVC_NAME}")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Deploy Production') {
|
||||||
|
// Production branch
|
||||||
|
when { branch 'master' }
|
||||||
|
steps{
|
||||||
|
container('kubectl') {
|
||||||
|
// Change deployed image in canary to the one we just built
|
||||||
|
sh("sed -i.bak 's#gcr.io/cloud-solutions-images/gceme:1.0.0#${IMAGE_TAG}#' ./k8s/production/*.yaml")
|
||||||
|
step([$class: 'KubernetesEngineBuilder',namespace:'production', projectId: env.PROJECT, clusterName: env.CLUSTER, zone: env.CLUSTER_ZONE, manifestPattern: 'k8s/services', credentialsId: env.JENKINS_CRED, verifyDeployments: false])
|
||||||
|
step([$class: 'KubernetesEngineBuilder',namespace:'production', projectId: env.PROJECT, clusterName: env.CLUSTER, zone: env.CLUSTER_ZONE, manifestPattern: 'k8s/production', credentialsId: env.JENKINS_CRED, verifyDeployments: true])
|
||||||
|
sh("echo http://`kubectl --namespace=production get service/${FE_SVC_NAME} -o jsonpath='{.status.loadBalancer.ingress[0].ip}'` > ${FE_SVC_NAME}")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Deploy Dev') {
|
||||||
|
// Developer Branches
|
||||||
|
when {
|
||||||
|
not { branch 'master' }
|
||||||
|
not { branch 'canary' }
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
container('kubectl') {
|
||||||
|
// Create namespace if it doesn't exist
|
||||||
|
sh("kubectl get ns ${env.BRANCH_NAME} || kubectl create ns ${env.BRANCH_NAME}")
|
||||||
|
// Don't use public load balancing for development branches
|
||||||
|
sh("sed -i.bak 's#LoadBalancer#ClusterIP#' ./k8s/services/frontend.yaml")
|
||||||
|
sh("sed -i.bak 's#gcr.io/cloud-solutions-images/gceme:1.0.0#${IMAGE_TAG}#' ./k8s/dev/*.yaml")
|
||||||
|
step([$class: 'KubernetesEngineBuilder',namespace: "${env.BRANCH_NAME}", projectId: env.PROJECT, clusterName: env.CLUSTER, zone: env.CLUSTER_ZONE, manifestPattern: 'k8s/services', credentialsId: env.JENKINS_CRED, verifyDeployments: false])
|
||||||
|
step([$class: 'KubernetesEngineBuilder',namespace: "${env.BRANCH_NAME}", projectId: env.PROJECT, clusterName: env.CLUSTER, zone: env.CLUSTER_ZONE, manifestPattern: 'k8s/dev', credentialsId: env.JENKINS_CRED, verifyDeployments: true])
|
||||||
|
echo 'To access your environment run `kubectl proxy`'
|
||||||
|
echo "Then access your service via http://localhost:8001/api/v1/proxy/namespaces/${env.BRANCH_NAME}/services/${FE_SVC_NAME}:80/"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## CD
|
||||||
|
|
||||||
|
### Tools Comparision
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
### An example CI/CD flow
|
||||||
|
|
||||||
|
```mermaid
|
||||||
|
graph TB
|
||||||
|
|
||||||
|
A(("Code commit")) -->B1["CI job"]
|
||||||
|
B1 -->C["New Docker Image"]
|
||||||
|
C --Update Kubernetes template--> D[New Kubernetes manifest Yaml]
|
||||||
|
D --Git commit-->E[Deployment Repo]
|
||||||
|
E --Self trigger--> F((Deploy to K8s))
|
||||||
|
F --Manual/Auto trigger--> G[Update manifest]
|
||||||
|
G --> H((Deploy to Next env))
|
||||||
|
```
|
||||||
|
|
||||||
|
### Spinnaker
|
||||||
|
|
||||||
|
Spinnaker is an open-source, multi-cloud continuous delivery platform that helps you release software changes with high velocity and confidence. Spinnaker provides two core sets of features:
|
||||||
|
|
||||||
|
application management
|
||||||
|
|
||||||
|
application deployment
|
||||||
|
|
||||||
|
## Everything is code
|
||||||
|
|
||||||
|
- Infrastructure as code
|
||||||
|
- CI config as code
|
||||||
|
- Dockerfile
|
||||||
|
|
||||||
|
## Automation tools
|
||||||
|
|
||||||
|
### Capistrano
|
||||||
|
A ruby tool for deploy applications
|
||||||
|
### Chef
|
||||||
|
|
||||||
|
#### What is chef
|
||||||
|
|
||||||
|
Chef enables you to manage and scale cloud infrastructure with no downtime or interruptions. Freely move applications and configurations from one cloud to another. Chef is integrated with all major cloud providers including Amazon EC2, VMWare, IBM Smartcloud, Rackspace, OpenStack, Windows Azure, HP Cloud, Google Compute Engine, Joyent Cloud and others.
|
||||||
|
|
||||||
|
Chef running a `chef-client` on each node to be a runner to install applications on remote server. The client can use both `pull` and `push` modes to to communication.
|
||||||
|
|
||||||
|
More:
|
||||||
|
|
||||||
|
- Chef vs ansible: <https://www.chef.io/ansible/>
|
||||||
|
|
||||||
|
### Ansible
|
||||||
|
|
||||||
|
#### What is Ansible
|
||||||
|
Ansible is an IT automation tool. It can configure systems, deploy software, and orchestrate more advanced IT tasks such as continuous deployments or zero downtime rolling updates. Ansible’s goals are foremost those of simplicity and maximum ease of use.
|
||||||
|
|
||||||
|
Ansible uses `SSH` to execute commands on remote server and use `RabbitMQ` at the transport level by `push` updates
|
||||||
|
|
||||||
|
### Puppet
|
||||||
|
|
||||||
|
Is also a configuration management tool for servers and designed to install and manage software on existing servers.
|
||||||
|
|
||||||
|
### Packer
|
||||||
|
|
||||||
|
Packer is a tool to allows you build a machine image which contains all preinstalled and configged applications.
|
||||||
|
|
||||||
|
### Terraform
|
||||||
|
|
||||||
|
#### What is Terraform
|
||||||
|
Terraform use a declarative language to describe the current state of infrastructure, and there is no server side agent installed.
|
||||||
|
|
||||||
|
Terraform is more about declare the resources/services requirements, rather than install softwares and libraries on remote server.
|
||||||
|
|
||||||
|
|
||||||
|
#### Basic steps
|
||||||
|
```bash
|
||||||
|
# go to the folder which stores the environment credentials
|
||||||
|
terraform init # Initialize a new or existing Terraform working directory by creating initial files, loading any remote state, downloading modules, etc.
|
||||||
|
terraform get # Downloads and installs modules that defined by configuration files
|
||||||
|
terraform plan # Kind of try run, you will what kind of changes you will have
|
||||||
|
terraform apply # Apply changes to cluster
|
||||||
|
```
|
||||||
|
|
||||||
|
## HA(High Availability)
|
||||||
|
- LB - haproxy
|
||||||
|
- Keepalived -- vrrp
|
||||||
|
- Nginx + Keepalived
|
||||||
|
- Heartbeat
|
||||||
|
|
||||||
|
## Network
|
||||||
|
- IP
|
||||||
|
- Private IP Addresses
|
||||||
|
- 10.0.0.0 – 10.255.255.255
|
||||||
|
- 172.16.0.0 – 172.31.255.255
|
||||||
|
- 192.168.0.0 – 192.168.255.255
|
||||||
|
|
||||||
|
### OSI Model( 7 layers network)
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
### CIDR blocks
|
||||||
|
|
||||||
|
[Wikipedia](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
|
||||||
|
|
||||||
|
|**Address**|**Difference**|**Mask**|**Addresses**|**2n**|**Relative**|**Restrictions**|**Typical use**|
|
||||||
|
| :----:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
|
||||||
|
|a.b.c.d/32|+0.0.0.0|255.255.255.255|1|20|1⁄256 C| |Host route
|
||||||
|
|a.b.c.d/31|+0.0.0.1|255.255.255.254|2|21|1⁄128 C|d = 0 ... (2n) ... 254|Point to point links (RFC 3021)
|
||||||
|
|a.b.c.d/30|+0.0.0.3|255.255.255.252|4|22|1⁄64 C|d = 0 ... (4n) ... 252|Point to point links (glue network)
|
||||||
|
|a.b.c.d/29|+0.0.0.7|255.255.255.248|8|23|1⁄32 C|d = 0 ... (8n) ... 248|Smallest multi-host network
|
||||||
|
|a.b.c.d/28|+0.0.0.15|255.255.255.240|16|24|1⁄16 C|d = 0 ... (16n) ... 240|Small LAN
|
||||||
|
|a.b.c.d/27|+0.0.0.31|255.255.255.224|32|25|⅛ C|d = 0 ... (32n) ... 224|
|
||||||
|
|a.b.c.d/26|+0.0.0.63|255.255.255.192|64|26|¼ C|d = 0, 64, 128, 192|
|
||||||
|
|a.b.c.d/25|+0.0.0.127|255.255.255.128|128|27|½ C|d = 0, 128|Large LAN
|
||||||
|
|a.b.c.0/24|+0.0.0.255|255.255.255.0|256|28|1 C| |
|
||||||
|
|a.b.c.0/23|+0.0.1.255|255.255.254.0|512|29|2 C|c = 0 ... (2n) ... 254|
|
||||||
|
|a.b.c.0/22|+0.0.3.255|255.255.252.0|1,024|210|4 C|c = 0 ... (4n) ... 252|Small business
|
||||||
|
|a.b.c.0/21|+0.0.7.255|255.255.248.0|2,048|211|8 C|c = 0 ... (8n) ... 248|Small ISP/ large business
|
||||||
|
|a.b.c.0/20|+0.0.15.255|255.255.240.0|4,096|212|16 C|c = 0 ... (16n) ... 240|
|
||||||
|
|a.b.c.0/19|+0.0.31.255|255.255.224.0|8,192|213|32 C|c = 0 ... (32n) ... 224|ISP/ large business
|
||||||
|
|a.b.c.0/18|+0.0.63.255|255.255.192.0|16,384|214|64 C|c = 0, 64, 128, 192|
|
||||||
|
|a.b.c.0/17|+0.0.127.255|255.255.128.0|32,768|215|128 C|c = 0, 128|
|
||||||
|
|a.b.0.0/16|+0.0.255.255|255.255.0.0|65,536|216|256 C = B| |
|
||||||
|
|a.b.0.0/15|+0.1.255.255|255.254.0.0|131,072|217|2 B|b = 0 ... (2n) ... 254|
|
||||||
|
|a.b.0.0/14|+0.3.255.255|255.252.0.0|262,144|218|4 B|b = 0 ... (4n) ... 252|
|
||||||
|
|a.b.0.0/13|+0.7.255.255|255.248.0.0|524,288|219|8 B|b = 0 ... (8n) ... 248|
|
||||||
|
|a.b.0.0/12|+0.15.255.255|255.240.0.0|1,048,576|220|16 B|b = 0 ... (16n) ... 240|
|
||||||
|
|a.b.0.0/11|+0.31.255.255|255.224.0.0|2,097,152|221|32 B|b = 0 ... (32n) ... 224|
|
||||||
|
|a.b.0.0/10|+0.63.255.255|255.192.0.0|4,194,304|222|64 B|b = 0, 64, 128, 192|
|
||||||
|
|a.b.0.0/9|+0.127.255.255|255.128.0.0|8,388,608|223|128 B|b = 0, 128|
|
||||||
|
|a.0.0.0/8|+0.255.255.255|255.0.0.0|16,777,216|224|256 B = A| |Largest IANA block allocation
|
||||||
|
|a.0.0.0/7|+1.255.255.255|254.0.0.0|33,554,432|225|2:00 am|a = 0 ... (2n) ... 254|
|
||||||
|
|a.0.0.0/6|+3.255.255.255|252.0.0.0|67,108,864|226|4:00 am|a = 0 ... (4n) ... 252|
|
||||||
|
|a.0.0.0/5|+7.255.255.255|248.0.0.0|134,217,728|227|8:00 am|a = 0 ... (8n) ... 248|
|
||||||
|
|a.0.0.0/4|+15.255.255.255|240.0.0.0|268,435,456|228|16 A|a = 0 ... (16n) ... 240|
|
||||||
|
|a.0.0.0/3|+31.255.255.255|224.0.0.0|536,870,912|229|32 A|a = 0 ... (32n) ... 224|
|
||||||
|
|a.0.0.0/2|+63.255.255.255|192.0.0.0|1,073,741,824|230|64 A|a = 0, 64, 128, 192|
|
||||||
|
|a.0.0.0/1|+127.255.255.255|128.0.0.0|2,147,483,648|231|128 A|a = 0, 128|
|
||||||
|
|0.0.0.0/0|+255.255.255.255|0.0.0.0|4,294,967,296|232|256 A| |
|
||||||
|
|
||||||
|
## tools
|
||||||
|
|
||||||
|
### git
|
||||||
|
- cherrypick
|
||||||
|
- rebase
|
||||||
|
- commit
|
||||||
|
- checkout
|
||||||
|
- checkout -b br com
|
||||||
|
- push
|
||||||
|
- --tags
|
||||||
|
- push tags
|
||||||
|
- —all
|
||||||
|
- push all branchs
|
||||||
|
- -f
|
||||||
|
- force push
|
||||||
|
- branch -d xx
|
||||||
|
- delete a local branch
|
||||||
|
- remote
|
||||||
|
- show xxx
|
||||||
|
- show info of a remote branch
|
||||||
|
- add xxx
|
||||||
|
- add a remote repo
|
||||||
|
- branch
|
||||||
|
- list all the branchs
|
||||||
|
- mv Rename/move files and folder with git history records
|
||||||
|
|
||||||
|
e.g. git mv -k ./a/b ./c/d option `k` would avoid the "can not move directory into itself" error.
|
||||||
|
### oh-my-zsh
|
||||||
|
|
||||||
|
### IDE/tools
|
||||||
|
|
||||||
|
- Intellij
|
||||||
|
- vscode
|
||||||
|
|
||||||
|
|
||||||
|
## Security
|
||||||
|
|
||||||
|
|
||||||
|
### Mutual TLS authentication
|
||||||
|
|
||||||
|

|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
---
|
||||||
|
title: Aws
|
||||||
|
created: 2020-01-06
|
||||||
|
updated: 2020-01-06
|
||||||
|
type: summary
|
||||||
|
tags: [tech, reference]
|
||||||
|
external: https://github.com/wahyd4/knowledge/blob/master/categories/devops/aws.md
|
||||||
|
---
|
||||||
|
|
||||||
|
## EC2
|
||||||
|
Virtual machines
|
||||||
|
|
||||||
|
## ECS
|
||||||
|
|
||||||
|
Running and managing containers without worry about infrastructure
|
||||||
|
|
||||||
|
## Cloudfront
|
||||||
|
|
||||||
|
## S3
|
||||||
|
|
||||||
|
## RDS
|
||||||
@@ -0,0 +1,219 @@
|
|||||||
|
---
|
||||||
|
title: Docker
|
||||||
|
created: 2021-02-08
|
||||||
|
updated: 2021-02-08
|
||||||
|
type: summary
|
||||||
|
tags: [tech, reference]
|
||||||
|
external: https://github.com/wahyd4/knowledge/blob/master/categories/devops/docker.md
|
||||||
|
---
|
||||||
|
|
||||||
|
# Docker
|
||||||
|
|
||||||
|
Easy to use, just drag and drop things.
|
||||||
|
|
||||||
|
## Benefits of using Docker
|
||||||
|
|
||||||
|
- Escape the app dependency matrix
|
||||||
|
- Solve the environment issue. it works on my machine.
|
||||||
|
- Very low resource allocation cost when compare with Virtual Machine. So on the same machine, you can run more containers and spend much less time.
|
||||||
|
|
||||||
|
## How Docker works
|
||||||
|
|
||||||
|
Very useful blog talking about how docker works internally: [Understanding the Docker Internals](https://medium.com/@nagarwal/understanding-the-docker-internals-7ccb052ce9fe)
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Docker use
|
||||||
|
|
||||||
|
* Namespaces
|
||||||
|
* Cgroups
|
||||||
|
* Network
|
||||||
|
* Union File Systems
|
||||||
|
|
||||||
|
to isolate all kinds of resources.
|
||||||
|
|
||||||
|
### Namespaces
|
||||||
|
|
||||||
|
Docker makes use of kernel namespaces to provide the isolated workspace called the container. When you run a container, Docker creates a set of namespaces for that container. These namespaces provide a layer of isolation. Each aspect of a container runs in a separate namespace and its access is limited to that namespace.
|
||||||
|
Docker Engine uses the following namespaces on Linux:
|
||||||
|
|
||||||
|
- `PID` namespace for process isolation.
|
||||||
|
- `NET` namespace for managing network interfaces.
|
||||||
|
- `IPC` namespace for managing access to IPC resources.
|
||||||
|
- `MNT` namespace for managing filesystem mount points.
|
||||||
|
- `UTS` namespace for isolating kernel and version identifiers.
|
||||||
|
- `USER` namespaces is a feature of Linux that can be used to separate the user IDs and group IDs between the host and containers. It can provide a better isolation and security: the privileged user root in the container can be mapped to a non-privileged user on the host.
|
||||||
|
|
||||||
|
#### How to see a docker container's namespaces
|
||||||
|
|
||||||
|
```bash
|
||||||
|
> docker inspect 195de1a4b33c | grep Pid
|
||||||
|
|
||||||
|
"Pid": 1496,
|
||||||
|
"PidMode": "",
|
||||||
|
"PidsLimit": null,
|
||||||
|
|
||||||
|
> cd /proc/1496
|
||||||
|
> ls
|
||||||
|
|
||||||
|
attr auxv clear_refs comm cpuset environ fd gid_map limits map_files mem mounts net numa_maps oom_score pagemap personality root schedstat setgroups smaps_rollup stat status task timerslack_ns wchan
|
||||||
|
autogroup cgroup cmdline coredump_filter cwd exe fdinfo io loginuid maps mountinfo mountstats ns oom_adj oom_score_adj patch_state projid_map sched sessionid smaps stack statm syscall timers uid_map
|
||||||
|
|
||||||
|
> cd ns
|
||||||
|
> ls
|
||||||
|
|
||||||
|
cgroup ipc mnt net pid pid_for_children user uts
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
### cgroups
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Control Groups are a Linux feature for organizing processes in hierarchical groups and applying resources limits to them. Docker also makes use of kernel control groups for resource allocation and isolation. A cgroup limits an application to a specific set of resources. Control groups allow Docker Engine to share available hardware resources to containers and optionally enforce limits and constraints.
|
||||||
|
Docker Engine uses the following cgroups:
|
||||||
|
|
||||||
|
- `Memory` cgroup for managing accounting, limits and notifications.
|
||||||
|
- `HugeTBL` cgroup for accounting usage of huge pages by process group.
|
||||||
|
- `CPU` cgroup for managing user / system CPU time and usage.
|
||||||
|
- `CPUSet` cgroup for binding a group to specific CPU. Useful for real time applications and NUMA systems with localized memory per CPU.
|
||||||
|
- `BlkIO` cgroup for measuring & limiting amount of blckIO by group.
|
||||||
|
- `net_cls` and net_prio cgroup for tagging the traffic control.
|
||||||
|
- `Devices` cgroup for reading / writing access devices.
|
||||||
|
- `Freezer` cgroup for freezing a group. Useful for cluster batch scheduling, process migration and debugging without affecting prtrace.
|
||||||
|
|
||||||
|
### Union File Systems
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
|
Union file systems operate by creating layers, making them very lightweight and fast. Docker Engine uses UnionFS to provide the building blocks for containers. Docker Engine can use multiple UnionFS variants, including AUFS, btrfs, vfs, and devicemapper.
|
||||||
|
|
||||||
|
### Container Format
|
||||||
|
|
||||||
|
Docker Engine combines the namespaces, control groups and UnionFS into a wrapper called a container format. The default container format is libcontainer.
|
||||||
|
### Security
|
||||||
|
|
||||||
|
Docker Engine makes use of `AppArmor`, `Seccomp`, `Capabilities` kernel features for security purposes.
|
||||||
|
|
||||||
|
- `AppArmor` allows to restrict programs capabilities with per-program profiles.
|
||||||
|
- `Seccomp` used for filtering syscalls issued by a program.
|
||||||
|
- `Capabilties` for performing permission checks.
|
||||||
|
|
||||||
|
|
||||||
|
### Docker VS VM
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Network
|
||||||
|
|
||||||
|
- Bridge
|
||||||
|
- Host
|
||||||
|
|
||||||
|
## CMD
|
||||||
|
|
||||||
|
- has three forms
|
||||||
|
- CMD ["executable","param1","param2"]
|
||||||
|
- exec form, preferred
|
||||||
|
- CMD ["param1","param2"]
|
||||||
|
- as default parameters to ENTRYPOINT
|
||||||
|
- CMD command param1 param2
|
||||||
|
- shell form
|
||||||
|
- The main purpose of a CMD is to provide defaults for an executing container. These defaults can include an executable, or they can omit the executable, in which case you must specify an ENTRYPOINT instruction as well.
|
||||||
|
- If CMD is used to provide default arguments for the ENTRYPOINT instruction, both the CMD and ENTRYPOINT instructions should be specified with the JSON array format.
|
||||||
|
- docker run could override the default specified in CMD.
|
||||||
|
|
||||||
|
## ENTRYPOINT
|
||||||
|
|
||||||
|
- docker run arguments will as the entrypoint’s parameters. not CMD’s override
|
||||||
|
- has two forms
|
||||||
|
- ENTRYPOINT ["executable", "param1", "param2"]
|
||||||
|
- exec form, preferred
|
||||||
|
- ENTRYPOINT command param1 param2
|
||||||
|
- shell form
|
||||||
|
- entrypoint setting can be override by docker run —entrypoint
|
||||||
|
|
||||||
|
## Security
|
||||||
|
- https://docs.docker.com/engine/security/security/
|
||||||
|
- use non root user
|
||||||
|
- docker daemon attack surface
|
||||||
|
- kernel security features
|
||||||
|
|
||||||
|
## Tips
|
||||||
|
|
||||||
|
### difference between `cmd` and `entrypoint`
|
||||||
|
|
||||||
|
`cmd` can be override but entrypoint can't.
|
||||||
|
|
||||||
|
### difference between `copy` and `add`
|
||||||
|
|
||||||
|
Basically they are similar, copy files and folder to destination. While ADD has some features (like local-only tar extraction and remote URL support) that are not immediately obvious. Consequently, the best use for ADD is local tar file auto-extraction into the image, as in ADD rootfs.tar.xz /.
|
||||||
|
|
||||||
|
### Reduce docker image size
|
||||||
|
|
||||||
|
- Use the small base docker image, e.g. `alpine`, `jessie` etc.
|
||||||
|
- Change docker image to multi stage, only copy the runtime files and dependencies to the final stage
|
||||||
|
|
||||||
|
A example of node js one
|
||||||
|
|
||||||
|
**Before**
|
||||||
|
|
||||||
|
```Dockerfile
|
||||||
|
FROM node:alpine as build FROM node as build
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# copy the app, note .dockerignore # copy the app, note .dockerignore
|
||||||
|
COPY . /app
|
||||||
|
|
||||||
|
RUN apk update \
|
||||||
|
&& apk add --no-cache git python alpine-sdk\
|
||||||
|
&& npm ci \
|
||||||
|
&& npm run build \
|
||||||
|
&& npm run generate
|
||||||
|
|
||||||
|
EXPOSE 3000
|
||||||
|
|
||||||
|
CMD [ "npm", "start" ]
|
||||||
|
|
||||||
|
```
|
||||||
|
**After**
|
||||||
|
|
||||||
|
```Dockerfile
|
||||||
|
|
||||||
|
FROM node as build
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# copy the app, note .dockerignore
|
||||||
|
COPY . /app
|
||||||
|
|
||||||
|
RUN npm ci \
|
||||||
|
&& npm run build \
|
||||||
|
&& npm run generate \
|
||||||
|
&& npm prune --production \
|
||||||
|
&& curl -sf https://gobinaries.com/tj/node-prune | sh \
|
||||||
|
&& node-prune
|
||||||
|
|
||||||
|
FROM node:alpine
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# copy from build image
|
||||||
|
COPY --from=build /app ./
|
||||||
|
|
||||||
|
EXPOSE 3000
|
||||||
|
|
||||||
|
CMD [ "npm", "start" ]
|
||||||
|
```
|
||||||
|
|
||||||
|
### Inspect image's files
|
||||||
|
|
||||||
|
First, just create a container instead of running a container.
|
||||||
|
Then export the entire container to a zip file.
|
||||||
|
|
||||||
|
```
|
||||||
|
docker create --name=some-name image:tag
|
||||||
|
docker export tmp_$$ > some-name.zip
|
||||||
|
docker rm some-name
|
||||||
|
```
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
---
|
||||||
|
title: Gcp
|
||||||
|
created: 2019-11-27
|
||||||
|
updated: 2019-11-27
|
||||||
|
type: summary
|
||||||
|
tags: [tech, reference]
|
||||||
|
external: https://github.com/wahyd4/knowledge/blob/master/categories/devops/gcp.md
|
||||||
|
---
|
||||||
|
|
||||||
|
# Google Compute Engine
|
||||||
|
|
||||||
|
# Kubernetes Engine
|
||||||
|
|
||||||
|
# Cloud Storage
|
||||||
|
|
||||||
|
# Cloud SQL
|
||||||
|
|
||||||
|
# IAM
|
||||||
|
|
||||||
|
# Stackdriver
|
||||||
|
|
||||||
|
## Logging
|
||||||
|
|
||||||
|
## Log based metrics
|
||||||
|
|
||||||
|
## Debug
|
||||||
|
|
||||||
|
## Trace
|
||||||
|
|
||||||
|
# App Engine
|
||||||
|
|
||||||
|
# Cloud Functions
|
||||||
|
|
||||||
|
# Cloud Run
|
||||||
|
|
||||||
|
Run Containers without caring about infrastructure
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
---
|
||||||
|
title: Incident
|
||||||
|
created: 2018-03-27
|
||||||
|
updated: 2018-03-27
|
||||||
|
type: summary
|
||||||
|
tags: [tech, reference]
|
||||||
|
external: https://github.com/wahyd4/knowledge/blob/master/categories/devops/incident.md
|
||||||
|
---
|
||||||
|
|
||||||
|
# Incident Management
|
||||||
|
|
||||||
|
## Incident dealing
|
||||||
|
|
||||||
|
It's important for a company to have a formal process about how do people dealing with those scenarios. There should some places to list all the common issues and its' solutions.
|
||||||
|
During the process, we should records the steps we have, so we can learn from this after the incident.
|
||||||
|
Company should have a on call rotation rules to have every engineers on the list and well rotated.
|
||||||
|
|
||||||
|
### Some tools
|
||||||
|
|
||||||
|
* Pagerduty - on call scheduling and incident resolution
|
||||||
|
* Datadog - metrics
|
||||||
|
* Stackdriver - logging
|
||||||
|
|
||||||
|
## Incident Training
|
||||||
|
|
||||||
|
### The purpose for doing this
|
||||||
|
|
||||||
|
* It's better to have some training before people get on call
|
||||||
|
* We can learn something from the incident training, so we can find some potential issues in production
|
||||||
|
* It's a good opportunities to have people from different teams work together to solve the issue
|
||||||
|
* Customer first. We should let customer know what happened if the issue has some impact to the customers.
|
||||||
|
|
||||||
|
### How to organise an incident training
|
||||||
|
|
||||||
|
* Have some check lists for people prepared before training
|
||||||
|
* Have a almost production like environment to do this
|
||||||
|
* Organiser triggers a issue, then ask trainees to fix the issue and investigate the root clause
|
||||||
|
* Let customers knows what happened. The other way round, the customer can give us some more information and also give us some complaint about his loss due to the incident.
|
||||||
|
* The on-call team should solve the issue as well as write down some notes to record how to deal with this.
|
||||||
|
* Escalate the severity if necessary to involve more people to help to solve this
|
||||||
|
* Give enough information to the next people when you are going to hand over it to.
|
||||||
|
|
||||||
|
## After incident
|
||||||
|
|
||||||
|
* Run a post incident review
|
||||||
|
* Write down the incident events timeline
|
||||||
|
* Provide a problem statement
|
||||||
|
* List the root cause
|
||||||
|
* List the ways of how do we prevent this happen again
|
||||||
@@ -0,0 +1,792 @@
|
|||||||
|
---
|
||||||
|
title: Kubernetes
|
||||||
|
created: 2020-12-09
|
||||||
|
updated: 2020-12-09
|
||||||
|
type: summary
|
||||||
|
tags: [tech, reference]
|
||||||
|
external: https://github.com/wahyd4/knowledge/blob/master/categories/devops/kubernetes.md
|
||||||
|
---
|
||||||
|
|
||||||
|
# Kubernetes
|
||||||
|
|
||||||
|
## Terminology
|
||||||
|
|
||||||
|
### Pod
|
||||||
|
|
||||||
|
- Single container
|
||||||
|
- Multiple containers
|
||||||
|
- share ip
|
||||||
|
- share volumes
|
||||||
|
|
||||||
|
#### Information you get when list pods
|
||||||
|
|
||||||
|
```bash
|
||||||
|
➜ k get pods
|
||||||
|
NAME READY STATUS RESTARTS AGE
|
||||||
|
cloud-sql-proxy-66d-71222342354s 1/1 Running 0 42d
|
||||||
|
```
|
||||||
|
|
||||||
|
### Node
|
||||||
|
|
||||||
|
Basically is a Kubernetes client or agent which runs a bunch of pods.
|
||||||
|
|
||||||
|
### Service
|
||||||
|
|
||||||
|
- ClusterIP (default)
|
||||||
|
- NodePort ( access by port)
|
||||||
|
- LoadBalancer (external ip)
|
||||||
|
- ExternalName dns
|
||||||
|
|
||||||
|
### Deployment
|
||||||
|
|
||||||
|
A Deployment provides declarative updates for Pods and ReplicaSets.
|
||||||
|
|
||||||
|
You describe a desired state in a Deployment, and the Deployment Controller changes the actual state to the desired state at a controlled rate. You can define Deployments to create new ReplicaSets, or to remove existing Deployments and adopt all their resources with new Deployments.
|
||||||
|
|
||||||
|
### Replica Set
|
||||||
|
|
||||||
|
A ReplicaSet’s purpose is to maintain a stable set of replica Pods running at any given time. As such, it is often used to guarantee the availability of a specified number of identical Pods.
|
||||||
|
|
||||||
|
### Service rolling update
|
||||||
|
|
||||||
|
### DaemonSet
|
||||||
|
|
||||||
|
Running that pod on every node.
|
||||||
|
|
||||||
|
- running a cluster storage daemon, such as `glusterd`, `ceph`, on each node
|
||||||
|
- running a logs collection daemon on every node, such as `fluentd` or logstash.
|
||||||
|
- running a node monitoring daemon on every node, such as Prometheus Node Exporter, collectd, New Relic agent.
|
||||||
|
|
||||||
|
### StatefulSet
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
StatefulSets represent a set of pods with unique, persistent identities and stable hostnames. The state information and other resilient data for any given StatefulSet Pod is maintained in persistent disk storage associated with the StatefulSet.
|
||||||
|
|
||||||
|
StatefulSets are designed to deploy stateful applications and clustered applications that save data to persistent storage, such as Google Compute Engine persistent disks. StatefulSets are suitable for deploying Kafka, MySQL, Redis, ZooKeeper, and other applications needing unique, persistent identities and stable hostnames. For stateless applications, use Deployments.
|
||||||
|
|
||||||
|
#### Key features
|
||||||
|
|
||||||
|
- Ordered, graceful deployment and scaling
|
||||||
|
- Stable, persistent storage.
|
||||||
|
- Stable, unique network identifiers.
|
||||||
|
- Ordered, graceful deletion and termination.
|
||||||
|
|
||||||
|
#### An example
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: nginx
|
||||||
|
labels:
|
||||||
|
app: nginx
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
name: web
|
||||||
|
clusterIP: None
|
||||||
|
selector:
|
||||||
|
app: nginx
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: StatefulSet
|
||||||
|
metadata:
|
||||||
|
name: web
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: nginx # Label selector that determines which Pods belong to the StatefulSet
|
||||||
|
# Must match spec: template: metadata: labels
|
||||||
|
serviceName: "nginx"
|
||||||
|
replicas: 3
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: nginx # Pod template's label selector
|
||||||
|
spec:
|
||||||
|
terminationGracePeriodSeconds: 10
|
||||||
|
containers:
|
||||||
|
- name: nginx
|
||||||
|
image: gcr.io/google_containers/nginx-slim:0.8
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
||||||
|
name: web
|
||||||
|
volumeMounts:
|
||||||
|
- name: www
|
||||||
|
mountPath: /usr/share/nginx/html
|
||||||
|
volumeClaimTemplates:
|
||||||
|
- metadata:
|
||||||
|
name: www
|
||||||
|
spec:
|
||||||
|
accessModes: [ "ReadWriteOnce" ]
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 1Gi
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Update Statefulset
|
||||||
|
|
||||||
|
To decide how to handle updates, StatefulSets use a update strategy defined in spec: updateStrategy. There are two strategies, OnDelete and RollingUpdate:
|
||||||
|
|
||||||
|
- `OnDelete` does not automatically delete and recreate Pods when the object's configuration is changed. Instead, you must manually delete the old Pods to cause the controller to create updated Pods.
|
||||||
|
|
||||||
|
- `RollingUpdate` automatically deletes and recreates Pods when the object's configuration is changed. New Pods must be in Running and Ready states before their predecessors are deleted. With this strategy, changing the Pod specification automatically triggers a rollout. This is the default update strategy for StatefulSets.
|
||||||
|
|
||||||
|
StatefulSets update Pods in reverse ordinal order. You can monitor update rollouts by running the following command:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
kubectl rollout status statefulset [STATEFULSET_NAME]
|
||||||
|
```
|
||||||
|
#### Partitioning rolling updates
|
||||||
|
|
||||||
|
When you partition an update, all Pods with an ordinal greater than or equal to the partition value are updated when you update the StatefulSet’s Pod specification. Pods with an ordinal less than the partition value are not updated and, even if they are deleted, are recreated using the previous version of the specification. If the partition value is greater than the number of replicas, the updates are not propagated to the Pods.
|
||||||
|
|
||||||
|
### Proxy
|
||||||
|
|
||||||
|
Creates a proxy server or application-level gateway between localhost and the Kubernetes API Server. It also allows
|
||||||
|
serving static content over specified HTTP path. All incoming data enters through one port and gets forwarded to the
|
||||||
|
remote kubernetes API Server port, except for the path matching the static content path.
|
||||||
|
|
||||||
|
### DNS
|
||||||
|
|
||||||
|
- service.namespace
|
||||||
|
|
||||||
|
### Secrets
|
||||||
|
|
||||||
|
For storing keys, credentials and certificates. For instance: database token, 3rd party API keys.
|
||||||
|
|
||||||
|
### Persistent volumes
|
||||||
|
|
||||||
|
- Available
|
||||||
|
- a free resource that is not yet bound to a claim
|
||||||
|
- Bound
|
||||||
|
- the volume is bound to a claim
|
||||||
|
- Released
|
||||||
|
- the claim has been deleted, but the resource is not yet reclaimed by the cluster
|
||||||
|
- Failed
|
||||||
|
- the volume has failed its automatic reclamation
|
||||||
|
|
||||||
|
### kubelet
|
||||||
|
|
||||||
|
The `kubelet` is the primary “node agent” that runs on each node. It can register the node with the apiserver using one of: the hostname; a flag to override the hostname; or specific logic for a cloud provider. The `kubelet` works in terms of a PodSpec
|
||||||
|
|
||||||
|
### CRD(CustomResourceDefinitions)
|
||||||
|
|
||||||
|
The CustomResourceDefinition API resource allows you to define custom resources. Defining a CRD object creates a new custom resource with a name and schema that you specify. The Kubernetes API serves and handles the storage of your custom resource.
|
||||||
|
|
||||||
|
| RDs | Aggregated API|
|
||||||
|
|---|---|
|
||||||
|
| Do not require programming. Users can choose any language for a CRD controller. | Requires programming in Go and building binary and image. Users can choose any language for a CRD controller.|
|
||||||
|
| No additional service to run; CRs are handled by API Server. | An additional service to create and that could fail.|
|
||||||
|
| No ongoing support once the CRD is created. Any bug fixes are picked up as part of normal Kubernetes Master upgrades. | May need to periodically pickup bug fixes from upstream and rebuild and update the Aggregated APIserver. |
|
||||||
|
| No need to handle multiple versions of your API. For example: when you control the client for this resource, you can upgrade it in sync with the API. | You need to handle multiple versions of your API, for example: when developing an extension to share with the world. |
|
||||||
|
|
||||||
|
|
||||||
|
### Liveness vs Readiness
|
||||||
|
|
||||||
|
#### Liveness
|
||||||
|
|
||||||
|
The `kubelet` uses liveness probes to know when to restart a Container. For example, liveness probes could catch a deadlock, where an application is running, but unable to make progress. Restarting a Container in such a state can help to make the application more available despite bugs.
|
||||||
|
|
||||||
|
The `kubelet` uses readiness probes to know when a Container is ready to start accepting traffic. A Pod is considered ready when all of its Containers are ready. One use of this signal is to control which Pods are used as backends for Services. When a Pod is not ready, it is removed from Service load balancers.
|
||||||
|
|
||||||
|
The kubelet uses startup probes to know when a Container application has started. If such a probe is configured, it disables liveness and readiness checks until it succeeds, making sure those probes don’t interfere with the application startup. This can be used to adopt liveness checks on slow starting containers, avoiding them getting killed by the kubelet before they are up and running.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Pod
|
||||||
|
metadata:
|
||||||
|
name: goproxy
|
||||||
|
labels:
|
||||||
|
app: goproxy
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: goproxy
|
||||||
|
image: k8s.gcr.io/goproxy:0.1
|
||||||
|
ports:
|
||||||
|
- containerPort: 8080
|
||||||
|
readinessProbe:
|
||||||
|
tcpSocket:
|
||||||
|
port: 8080
|
||||||
|
initialDelaySeconds: 5
|
||||||
|
periodSeconds: 10
|
||||||
|
livenessProbe:
|
||||||
|
tcpSocket:
|
||||||
|
port: 8080
|
||||||
|
initialDelaySeconds: 15
|
||||||
|
periodSeconds: 20
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Readiness
|
||||||
|
|
||||||
|
Sometimes, applications are temporarily unable to serve traffic. For example, an application might need to load large data or configuration files during startup, or depend on external services after startup. In such cases, you don’t want to kill the application, but you don’t want to send it requests either. Kubernetes provides readiness probes to detect and mitigate these situations. A pod with containers reporting that they are not ready does not receive traffic through Kubernetes Services.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
readinessProbe:
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
- cat
|
||||||
|
- /tmp/healthy
|
||||||
|
initialDelaySeconds: 5
|
||||||
|
periodSeconds: 5
|
||||||
|
```
|
||||||
|
|
||||||
|
### Taints and Tolerations
|
||||||
|
|
||||||
|
Node affinity, described here, is a property of pods that attracts them to a set of nodes (either as a preference or a hard requirement). Taints are the opposite -- they allow a node to repel a set of pods.
|
||||||
|
|
||||||
|
Taints and tolerations work together to ensure that pods are not scheduled onto inappropriate nodes.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
kubectl taint nodes node1 key=value:NoSchedule
|
||||||
|
```
|
||||||
|
By default, no pod will be deploy to the node `node1`
|
||||||
|
|
||||||
|
You specify a toleration for a pod in the PodSpec. Both of the following tolerations “match” the taint created by the kubectl taint line above, and thus a pod with either toleration would be able to schedule onto node1:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
tolerations:
|
||||||
|
- key: "key"
|
||||||
|
operator: "Equal"
|
||||||
|
value: "value"
|
||||||
|
effect: "NoSchedule"
|
||||||
|
```
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
tolerations:
|
||||||
|
- key: "key"
|
||||||
|
operator: "Exists"
|
||||||
|
effect: "NoSchedule"
|
||||||
|
```
|
||||||
|
|
||||||
|
## Several ways to access a service inside Kubernetes cluster
|
||||||
|
|
||||||
|
* ClusterIP, Can only be accessed inside the cluster. You can access inside `kubectl proxy`
|
||||||
|
* NodePort, You can access the service by a specific public port between `30000–32767`, if the cluster server IP changes, then your service' endpoint url changes.
|
||||||
|
* LoadBalancer, it's kind of external service, all the requests go through the loadbalancer. Every service needs a new IP for this.
|
||||||
|
* Ingress, can be shared among multiple services, you can have different types of ingress controllers: `gec`, `nginx`, `contour`, `istio` and so on.
|
||||||
|
|
||||||
|
Links:
|
||||||
|
* [Kubernetes NodePort vs LoadBalancer vs Ingress? When should I use what?](https://medium.com/google-cloud/kubernetes-nodeport-vs-loadbalancer-vs-ingress-when-should-i-use-what-922f010849e0)
|
||||||
|
|
||||||
|
## Kubernetes components
|
||||||
|
|
||||||
|
A Kubernetes cluster consists of a set of worker machines, called nodes, that run containerized applications. Every cluster has at least one worker node.
|
||||||
|
|
||||||
|
The worker node(s) host the pods that are the components of the application. The Control Plane manages the worker nodes and the pods in the cluster. In production environments, the Control Plane usually runs across multiple computers and a cluster usually runs multiple nodes, providing fault-tolerance and high availability.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
### Components
|
||||||
|
|
||||||
|
#### Control Plane Components
|
||||||
|
|
||||||
|
- `kube-apiserver` The API server is a component of the Kubernetes control plane that exposes the Kubernetes API. The API server is the front end for the Kubernetes control plane
|
||||||
|
- `etcd` Consistent and highly-available key value store used as Kubernetes’ backing store for all cluster data.
|
||||||
|
- `kube-scheduler` Control Plane component that watches for newly created pods with no assigned node, and selects a node for them to run on
|
||||||
|
- `kube-controller-manager` Control Plane component that runs controller processes. These controllers include:
|
||||||
|
|
||||||
|
* Node Controller: Responsible for noticing and responding when nodes go down.
|
||||||
|
* Replication Controller: Responsible for maintaining the correct number of pods for every replication controller object in the system.
|
||||||
|
* Endpoints Controller: Populates the Endpoints object (that is, joins Services & Pods).
|
||||||
|
* Service Account & Token Controllers: Create default accounts and API access tokens for new namespaces.
|
||||||
|
- `cloud-controller-manager` runs controllers that interact with the underlying cloud providers
|
||||||
|
|
||||||
|
#### Node Components
|
||||||
|
|
||||||
|
Node components run on every node, maintaining running pods and providing the Kubernetes runtime environment.
|
||||||
|
|
||||||
|
- `kubelet` An agent that runs on each node in the cluster. It makes sure that containers are running in a pod. The kubelet takes a set of PodSpecs that are provided through various mechanisms and ensures that the containers described in those PodSpecs are running and healthy.
|
||||||
|
- `kube-proxy` kube-proxy is a network proxy that runs on each node in your cluster, implementing part of the Kubernetes Service concept. kube-proxy maintains network rules on nodes. These network rules allow network communication to your Pods from network sessions inside or outside of your cluster.
|
||||||
|
kube-proxy uses the operating system packet filtering layer if there is one and it’s available. Otherwise, kube-proxy forwards the traffic itself.
|
||||||
|
- `Container Runtime` The container runtime is the software that is responsible for running containers.
|
||||||
|
|
||||||
|
#### Addons
|
||||||
|
|
||||||
|
Addons use Kubernetes resources (DaemonSet, Deployment, etc) to implement cluster features. Because these are providing cluster-level features, namespaced resources for addons belong within the kube-system namespace
|
||||||
|
|
||||||
|
- `DNS` While the other addons are not strictly required, all Kubernetes clusters should have cluster DNS, as many examples rely on it. Cluster DNS is a DNS server, in addition to the other DNS server(s) in your environment, which serves DNS records for Kubernetes services
|
||||||
|
- `Web UI (Dashboard)` Dashboard is a general purpose, web-based UI for Kubernetes clusters.
|
||||||
|
- `Container Resource Monitoring` Container Resource Monitoring records generic time-series metrics about containers in a central database, and provides a UI for browsing that data.
|
||||||
|
- `Cluster-level Logging` A cluster-level logging mechanism is responsible for saving container logs to a central log store with search/browsing interface.
|
||||||
|
|
||||||
|
## Kubernetes pod lifecycle
|
||||||
|
|
||||||
|
Through its lifecycle, a Pod can attain following states:
|
||||||
|
|
||||||
|
- `Pending`: The pod is accepted by the Kubernetes system but its container(s) is/are not created yet.
|
||||||
|
|
||||||
|
- `Running`: The pod is scheduled on a node and all its containers are created and at-least one container is in Running state.
|
||||||
|
|
||||||
|
- `Succeeded`: All container(s) in the Pod have exited with status 0 and will not be restarted.
|
||||||
|
|
||||||
|
- `Failed`: All container(s) of the Pod have exited and at least one container has returned a non-zero status.
|
||||||
|
|
||||||
|
- `CrashLoopBackoff`: The container fails to start and is tried again and again.
|
||||||
|
|
||||||
|
## Creating Highly Available clusters with kubeadm
|
||||||
|
|
||||||
|
### With stacked control plane nodes
|
||||||
|
|
||||||
|
- `Init first control plane` kubeadm init --control-plane-endpoint "LOAD_BALANCER_DNS:LOAD_BALANCER_PORT" --upload-certs
|
||||||
|
- `Join the rest control planes` kubeadm join 192.168.0.200:6443 --token 9vr73a.a8uxyaju799qwdjv --discovery-token-ca-cert-hash sha256:7c2e69131a36ae2a042a339b33381c6d0d43887e2de83720eff5359e26aec866 --control-plane --certificate-key f8902e114ef118304e561c3ecd4d0b543adc226b7a07f675f56564185ffe0c07
|
||||||
|
|
||||||
|
### External etcd nodes
|
||||||
|
|
||||||
|
Setting up a cluster with external etcd nodes is similar to the procedure used for stacked etcd with the exception that you should setup etcd first, and you should pass the etcd information in the kubeadm config file.
|
||||||
|
|
||||||
|
|
||||||
|
## Flow chart of running a pod
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Chart from: <https://blog.heptio.com/core-kubernetes-jazz-improv-over-orchestration-a7903ea92ca>
|
||||||
|
|
||||||
|
## Kubernetes termination lifecycle
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Chart from: <https://dzone.com/articles/kubernetes-lifecycle-of-a-pod>
|
||||||
|
|
||||||
|
## Zero down time deployment
|
||||||
|
|
||||||
|
Set strategy type to `RollingUpdate` instead of `Recreate`
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
strategy:
|
||||||
|
type: RollingUpdate
|
||||||
|
rollingUpdate:
|
||||||
|
maxUnavailable: 50%
|
||||||
|
maxSurge: 1
|
||||||
|
```
|
||||||
|
|
||||||
|
## Some useful commands
|
||||||
|
|
||||||
|
```bash
|
||||||
|
kubectl config set-context context-name --namespace default-namespace-name #default active context
|
||||||
|
kubectl config view #view config
|
||||||
|
kubectl get nodes #get nodes
|
||||||
|
kubectl get namespaces #get all namespaces
|
||||||
|
kubectl get pods #get pods
|
||||||
|
kubectl get deployments #get deployments
|
||||||
|
kubectl logs -f <pod> --tail 200 # tail logs from some pod
|
||||||
|
kubectl get services #get services
|
||||||
|
kubectl get ingress #get ingresses
|
||||||
|
kubectl get hpa # get horizontal auto scaling policies
|
||||||
|
kubectl get all # get all kinds of units
|
||||||
|
kubectl get secrets <secret-id> -o yaml #view a secret details with yaml format, fields are encrypted with base64
|
||||||
|
# List all Secrets currently in use by a pod
|
||||||
|
kubectl get pods -o json | jq '.items[].spec.containers[].env[]?.valueFrom.secretKeyRef.name' | grep -v null | sort | uniq
|
||||||
|
|
||||||
|
# List Events sorted by timestamp
|
||||||
|
kubectl get events --sort-by=.metadata.creationTimestamp
|
||||||
|
|
||||||
|
kubectl run -i --tty busybox --image=busybox -- sh # Run pod as interactive shell
|
||||||
|
kubectl run nginx --image=nginx --restart=Never -n
|
||||||
|
mynamespace # Run pod nginx in a specific namespace
|
||||||
|
kubectl run nginx --image=nginx --restart=Never # Run pod nginx and write its spec into a file called pod.yaml
|
||||||
|
--dry-run -o yaml > pod.yaml
|
||||||
|
|
||||||
|
kubectl attach my-pod -i # Attach to Running Container and get the current running process
|
||||||
|
|
||||||
|
kubectl top pod POD_NAME --containers # Show metrics for a given pod and its containers
|
||||||
|
|
||||||
|
kubectl config view -o jsonpath='{.users[].name}' # display the first user
|
||||||
|
kubectl config view -o jsonpath='{.users[*].name}' # get a list of users
|
||||||
|
kubectl config get-contexts # display list of contexts
|
||||||
|
kubectl config current-context # display the current-context
|
||||||
|
kubectl config use-context my-cluster-name # set the default context to my-cluster-name
|
||||||
|
|
||||||
|
# add a new cluster to your kubeconf that supports basic auth
|
||||||
|
kubectl config set-credentials kubeuser/foo.kubernetes.com --username=kubeuser --password=kubepassword
|
||||||
|
|
||||||
|
# permanently save the namespace for all subsequent kubectl commands in that context.
|
||||||
|
kubectl config set-context --current --namespace=ggckad-s2
|
||||||
|
|
||||||
|
# set a context utilizing a specific username and namespace.
|
||||||
|
kubectl config set-context gce --user=cluster-admin --namespace=foo \
|
||||||
|
&& kubectl config use-context gce
|
||||||
|
|
||||||
|
kubectl config unset users.foo # delete user foo
|
||||||
|
|
||||||
|
kubectl describe quota # Check quota for current namespace
|
||||||
|
|
||||||
|
kubectl taint nodes node1 key=value:NoSchedule # add node taint
|
||||||
|
kubectl taint nodes node1 key:NoSchedule- # remove a taint from a node
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
### Some explanation
|
||||||
|
|
||||||
|
#### kubectl exec with attach
|
||||||
|
|
||||||
|
The main difference is in the process you interact with in the container:
|
||||||
|
|
||||||
|
`exec`: any one you want to create
|
||||||
|
|
||||||
|
`attach`: the one currently running (no choice)
|
||||||
|
|
||||||
|
## Kubernetes port forward
|
||||||
|
|
||||||
|
`kubectl port-forward` allows using resource name, such as a pod name, to select a matching pod to port forward to Which is perfect for testing the remote service/pods in your local. e.g. Forward your db port to a local port, you can connect to your remote db even it doesn't have a public IP.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
kubectl port-forward redis-master-765d459796-258hz 7000:6379
|
||||||
|
|
||||||
|
kubectl port-forward pods/redis-master-765d459796-258hz 7000:6379
|
||||||
|
|
||||||
|
kubectl port-forward deployment/redis-master 7000:6379
|
||||||
|
|
||||||
|
kubectl port-forward rs/redis-master 7000:6379
|
||||||
|
|
||||||
|
kubectl port-forward svc/redis-master 7000:6379
|
||||||
|
```
|
||||||
|
|
||||||
|
## Kubernetes Dashboard
|
||||||
|
|
||||||
|
### Deploy Dashboard
|
||||||
|
|
||||||
|
```bash
|
||||||
|
kubectl create -f https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml
|
||||||
|
```
|
||||||
|
### Access dashboard
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# First fetch cluster info, make sure cluster is running properly
|
||||||
|
kubectl cluster-info
|
||||||
|
|
||||||
|
# Normally the url for dashboard would be
|
||||||
|
http://your_ip:8080/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
## Configure Kubectl to access remote Kubernetes cluster
|
||||||
|
|
||||||
|
Here is a very simple config which use HTTP and `not secure`, should only for local testing purpose
|
||||||
|
|
||||||
|
### Config
|
||||||
|
|
||||||
|
Having a yaml file called `config-demo` in your current folder
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
apiVersion: v1
|
||||||
|
clusters:
|
||||||
|
- cluster:
|
||||||
|
server: https://your_cluster_ip:5443
|
||||||
|
name: development
|
||||||
|
contexts:
|
||||||
|
- context:
|
||||||
|
cluster: development
|
||||||
|
namespace: dev
|
||||||
|
user: developer
|
||||||
|
name: dev
|
||||||
|
current-context: dev
|
||||||
|
kind: Config
|
||||||
|
preferences: {}
|
||||||
|
users:
|
||||||
|
- name: developer
|
||||||
|
```
|
||||||
|
|
||||||
|
### Connect to remote cluster
|
||||||
|
|
||||||
|
```bash
|
||||||
|
kubectl get all --kubeconfig=config-demo --all-namespaces
|
||||||
|
```
|
||||||
|
For long term usage, you will need to copy the content to your `~/.kube/config` file
|
||||||
|
|
||||||
|
## Helm
|
||||||
|
|
||||||
|
Add Kubernetes yaml template engine and the package manager for Kubernetes
|
||||||
|
|
||||||
|
### How to use
|
||||||
|
|
||||||
|
```bash
|
||||||
|
helm init
|
||||||
|
helm upgrade --install -f abc/values-staging.yaml some-name ./abc
|
||||||
|
# abc/values-staging.yaml the value file
|
||||||
|
# some-name the release name
|
||||||
|
# abc the template folder
|
||||||
|
helm delete --purge mqtt # mqtt the release name
|
||||||
|
|
||||||
|
```
|
||||||
|
### Install 3rd party packages
|
||||||
|
```bash
|
||||||
|
helm repo add gitlab https://charts.gitlab.io/ # add remote repo
|
||||||
|
helm repo update # update index
|
||||||
|
helm install mirantisworkloads/vernemq
|
||||||
|
```
|
||||||
|
|
||||||
|
### Tips
|
||||||
|
|
||||||
|
* Normally when you just updated the configmap the deployment or statefulset pod wouldn't updated, but you can add a label to deployment/statefulset yaml, when the value changes the pods will be recreated
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: vernemq
|
||||||
|
configmapVersion: "{{ .Release.Revision }}"
|
||||||
|
```
|
||||||
|
|
||||||
|
### Deploy tools comparsion
|
||||||
|
|
||||||
|
https://blog.hasura.io/draft-vs-gitkube-vs-helm-vs-ksonnet-vs-metaparticle-vs-skaffold-f5aa9561f948/
|
||||||
|
|
||||||
|
## Rolling update
|
||||||
|
|
||||||
|
Readiness Probe. Readiness Probe makes sure that the new pods created are ready to take on requests before terminating the old pods. To enable this, first you need to have a route in whatever the application you want to run which would return a 200 on an HTTP GET (Or other type) request.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: hello-dep
|
||||||
|
namespace: default
|
||||||
|
spec:
|
||||||
|
replicas: 2
|
||||||
|
strategy:
|
||||||
|
type: RollingUpdate
|
||||||
|
rollingUpdate:
|
||||||
|
maxSurge: 1
|
||||||
|
maxUnavailable: 25%
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: hello-dep
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: hello-dep
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- image: gcr.io/google-samples/hello-app:2.0
|
||||||
|
imagePullPolicy: Always
|
||||||
|
name: hello-dep
|
||||||
|
ports:
|
||||||
|
- containerPort: 8080
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /
|
||||||
|
port: 8080
|
||||||
|
initialDelaySeconds: 5
|
||||||
|
periodSeconds: 5
|
||||||
|
successThreshold: 1
|
||||||
|
```
|
||||||
|
`maxUnavailable` is an optional field that specifies the maximum number of Pods that can be unavailable during the update process. The value can be an absolute number (for example, 5) or a percentage of desired Pods (for example, 10%). The absolute number is calculated from percentage by rounding down. The value cannot be 0 if maxSurge is 0. The default value is 25%.
|
||||||
|
|
||||||
|
`maxSurge` is an optional field that specifies the maximum number of Pods that can be created over the desired number of Pods
|
||||||
|
|
||||||
|
`initialDelaySeconds`: Number of seconds after the container has started before readiness probes are initiated.
|
||||||
|
|
||||||
|
`periodSeconds`: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1.
|
||||||
|
|
||||||
|
`timeoutSeconds`: Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1.
|
||||||
|
|
||||||
|
`successThreshold`: Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness. Minimum value is 1.
|
||||||
|
|
||||||
|
`failureThreshold`: When a Pod starts and the probe fails, Kubernetes will try failureThreshold times before giving up. Giving up in case of liveness probe means restarting the Pod. In case of readiness probe the Pod will be marked Unready. Defaults to 3. Minimum value is 1.
|
||||||
|
|
||||||
|
## Horizontal scaling
|
||||||
|
|
||||||
|
### V1
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
apiVersion: autoscaling/v1
|
||||||
|
kind: HorizontalPodAutoscaler
|
||||||
|
metadata:
|
||||||
|
name: worker-auto-scaling
|
||||||
|
namespace: x-prod
|
||||||
|
spec:
|
||||||
|
scaleTargetRef:
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
name: <deployment-name>
|
||||||
|
minReplicas: 1
|
||||||
|
maxReplicas: 2
|
||||||
|
targetCPUUtilizationPercentage: 75 # trigger point
|
||||||
|
```
|
||||||
|
|
||||||
|
### V2
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
apiVersion: autoscaling/v2beta2
|
||||||
|
kind: HorizontalPodAutoscaler
|
||||||
|
metadata:
|
||||||
|
name: php-apache
|
||||||
|
namespace: default
|
||||||
|
spec:
|
||||||
|
scaleTargetRef:
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
name: php-apache
|
||||||
|
minReplicas: 1
|
||||||
|
maxReplicas: 10
|
||||||
|
metrics:
|
||||||
|
- type: Resource
|
||||||
|
resource:
|
||||||
|
name: cpu
|
||||||
|
target:
|
||||||
|
type: Utilization
|
||||||
|
averageUtilization: 50
|
||||||
|
- type: Pods
|
||||||
|
pods:
|
||||||
|
metric:
|
||||||
|
name: packets-per-second
|
||||||
|
target:
|
||||||
|
type: AverageValue
|
||||||
|
averageValue: 1k
|
||||||
|
- type: Object
|
||||||
|
object:
|
||||||
|
metric:
|
||||||
|
name: requests-per-second
|
||||||
|
describedObject:
|
||||||
|
apiVersion: networking.k8s.io/v1beta1
|
||||||
|
kind: Ingress
|
||||||
|
name: main-route
|
||||||
|
target:
|
||||||
|
type: Value
|
||||||
|
value: 10k
|
||||||
|
```
|
||||||
|
## Limit CPU and memory for pods
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
ports:
|
||||||
|
- name: db-port
|
||||||
|
containerPort: 2345
|
||||||
|
protocol: TCP
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 30m
|
||||||
|
memory: 64Mi
|
||||||
|
limits:
|
||||||
|
cpu: 200m
|
||||||
|
memory: 256Mi
|
||||||
|
```
|
||||||
|
|
||||||
|
## Kubernetes Operator
|
||||||
|
|
||||||
|
A Kubernetes Operator is an abstraction for deploying non-trivial applications on Kubernetes. It wraps the logic for deploying and operating an application using Kubernetes constructs. As an example, the `etcd` operator provides an `etcd` cluster as a first-class object.
|
||||||
|
|
||||||
|
### An example Operator
|
||||||
|
|
||||||
|
- deploying an application on demand
|
||||||
|
- taking and restoring backups of that application’s state
|
||||||
|
-handling upgrades of the application code alongside related changes such as database schemas or extra configuration settings
|
||||||
|
- publishing a Service to applications that don’t support Kubernetes APIs to discover them
|
||||||
|
- simulating failure in all or part of your cluster to test its resilience
|
||||||
|
- choosing a leader for a distributed application without an internal member election process
|
||||||
|
|
||||||
|
### Use Operator
|
||||||
|
|
||||||
|
```
|
||||||
|
kubectl get SampleDB # find configured databases
|
||||||
|
|
||||||
|
kubectl edit SampleDB/example-database # manually change some settings
|
||||||
|
```
|
||||||
|
|
||||||
|
### Some 3rd party operators
|
||||||
|
|
||||||
|
- Operator registry: https://operatorhub.io/
|
||||||
|
- Custom operators list: https://gist.github.com/philips/a97a143546c87b86b870a82a753db14c
|
||||||
|
- Prometheus operator: https://coreos.com/blog/the-prometheus-operator.html
|
||||||
|
|
||||||
|
## Debug on kubernetes
|
||||||
|
|
||||||
|
### Examine previous pod logs
|
||||||
|
|
||||||
|
View the container logs before crash
|
||||||
|
|
||||||
|
```bash
|
||||||
|
kubectl logs --previous ${POD_NAME} ${CONTAINER_NAME}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Debug a pod
|
||||||
|
|
||||||
|
Let's assume you have a pod called test-app, but it doesn't have a shell or utility attched to it.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
kubectl debug -it ephemeral-demo --image=busybox --target=test-app
|
||||||
|
```
|
||||||
|
This can attach busybox to the target pod, so you can debug your pod with tools.
|
||||||
|
|
||||||
|
### Copy a pod
|
||||||
|
|
||||||
|
Sometimes Pod configuration options make it difficult to troubleshoot in certain situations, so we can copy the orginal pod to our debugging pod
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# source pod
|
||||||
|
kubectl run myapp --image=busybox --restart=Never -- sleep 1d
|
||||||
|
|
||||||
|
kubectl debug myapp -it --image=ubuntu --share-processes --copy-to=myapp-debug
|
||||||
|
```
|
||||||
|
The --share-processes allows the containers in this Pod to see processes from the other containers in the Pod.
|
||||||
|
|
||||||
|
### Copy a pod with changing command or the image
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# You can use kubectl debug to create a copy of this Pod with the command changed to an interactive shell:
|
||||||
|
|
||||||
|
kubectl debug myapp -it --copy-to=myapp-debug --container=myapp -- sh
|
||||||
|
|
||||||
|
kubectl debug myapp --copy-to=myapp-debug --set-image=*=ubuntu
|
||||||
|
```
|
||||||
|
The syntax of --set-image uses the same container_name=image syntax as kubectl set image. *=ubuntu means change the image of all containers to ubuntu.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Tools
|
||||||
|
|
||||||
|
### Kubectx and kubens
|
||||||
|
|
||||||
|
Switch faster between clusters and namespaces in kubectl https
|
||||||
|
|
||||||
|
- kubectx for switching contexts
|
||||||
|
- kubens for switching namespaces
|
||||||
|
|
||||||
|
Github page: https://github.com/ahmetb/kubectx
|
||||||
|
|
||||||
|
|
||||||
|
## Other distributions
|
||||||
|
|
||||||
|
### OpenShift(OKD)
|
||||||
|
|
||||||
|
https://github.com/openshift/okd
|
||||||
|
|
||||||
|
OKD is the Origin community distribution of Kubernetes optimized for continuous application development and multi-tenant deployment. OKD adds developer and operations-centric tools on top of Kubernetes to enable rapid application development, easy deployment and scaling, and long-term lifecycle maintenance for small and large teams. OKD is also referred to as Origin in github and in the documentation. OKD makes launching Kubernetes on any cloud or bare metal a snap, simplifies running and updating clusters, and provides all of the tools to make your containerized-applications succeed.
|
||||||
|
|
||||||
|
#### Differences
|
||||||
|
|
||||||
|
- More strict on security, for example you can't run docker images with `root` user.
|
||||||
|
- Better UI and come with some management tools.
|
||||||
|
- Integrated CI/CD
|
||||||
|
- It's a Redhat product, OKD is its open-source project
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
|
### K3s
|
||||||
|
|
||||||
|
https://github.com/rancher/k3s
|
||||||
|
|
||||||
|
k3s is intended to be a fully compliant Kubernetes distribution with the following changes:
|
||||||
|
|
||||||
|
1. Removed most in-tree plugins (cloud providers and storage plugins) which can be replaced
|
||||||
|
with out of tree addons.
|
||||||
|
2. Add sqlite3 as the default storage mechanism. etcd3 is still available, but not the default.
|
||||||
|
3. Wrapped in simple launcher that handles a lot of the complexity of TLS and options.
|
||||||
|
4. Minimal to no OS dependencies (just a sane kernel and cgroup mounts needed). k3s packages required
|
||||||
|
dependencies
|
||||||
|
* containerd
|
||||||
|
* Flannel
|
||||||
|
* CoreDNS
|
||||||
|
* CNI
|
||||||
|
* Host utilities (iptables, socat, etc)
|
||||||
|
|
||||||
|
|
||||||
|
## Links
|
||||||
|
|
||||||
|
- https://kubernetes.io/docs/concepts/overview/components
|
||||||
|
- [Writing a Custom Controller: Extending the Functionality of Your Cluster [I] - Aaron Levy](https://www.youtube.com/watch?v=_BuqPMlXfpE)
|
||||||
|
- [kubectl docs](https://kubectl.docs.kubernetes.io/)
|
||||||
@@ -0,0 +1,518 @@
|
|||||||
|
---
|
||||||
|
title: Linux
|
||||||
|
created: 2021-11-09
|
||||||
|
updated: 2021-11-09
|
||||||
|
type: summary
|
||||||
|
tags: [tech, reference]
|
||||||
|
external: https://github.com/wahyd4/knowledge/blob/master/categories/devops/linux.md
|
||||||
|
---
|
||||||
|
|
||||||
|
# Linux
|
||||||
|
|
||||||
|
## Useful commands and tips
|
||||||
|
|
||||||
|
### Split strings
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# split ip list string by comma and get first one
|
||||||
|
export IP=127.0.0.2,127.0.0.3
|
||||||
|
echo $IP | cut -d ',' -f1
|
||||||
|
```
|
||||||
|
|
||||||
|
### Create a systemd service
|
||||||
|
|
||||||
|
Create a file called `/etc/systemd/system/hello.service`
|
||||||
|
|
||||||
|
```
|
||||||
|
[Unit]
|
||||||
|
Description=Hello Service
|
||||||
|
After=network.target
|
||||||
|
StartLimitIntervalSec=0
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
Restart=always
|
||||||
|
RestartSec=1
|
||||||
|
User=centos
|
||||||
|
ExecStart=/app/hello.sh
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
```
|
||||||
|
Automatically start the service when boot the vm
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo systemctl enable hello
|
||||||
|
```
|
||||||
|
|
||||||
|
Start service
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo systemctl start hello
|
||||||
|
```
|
||||||
|
Learned from [here](https://medium.com/@benmorel/creating-a-linux-service-with-systemd-611b5c8b91d6)
|
||||||
|
|
||||||
|
### ssh
|
||||||
|
Do not use default `22` port
|
||||||
|
```bash
|
||||||
|
ssh user@ip -p 22222
|
||||||
|
```
|
||||||
|
|
||||||
|
Login without password
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# adds private key identities to the authentication agent
|
||||||
|
ssh-add ~/.ssh/id_rsa
|
||||||
|
|
||||||
|
# use locally available keys to authorise logins on a remote machine
|
||||||
|
|
||||||
|
ssh-copy-id user@ip -p 22222
|
||||||
|
```
|
||||||
|
|
||||||
|
### Add user to the sudo group
|
||||||
|
|
||||||
|
```bash
|
||||||
|
usermod -aG sudo youruser
|
||||||
|
```
|
||||||
|
|
||||||
|
### IP table
|
||||||
|
|
||||||
|
### Cron job
|
||||||
|
|
||||||
|
List cron jobs for current user
|
||||||
|
|
||||||
|
```bash
|
||||||
|
crontab -l
|
||||||
|
```
|
||||||
|
|
||||||
|
List cron jobs for some user
|
||||||
|
|
||||||
|
```bash
|
||||||
|
crontab -u user -l
|
||||||
|
```
|
||||||
|
|
||||||
|
Edit cron jobs
|
||||||
|
|
||||||
|
```bash
|
||||||
|
crontab -e
|
||||||
|
```
|
||||||
|
|
||||||
|
#### An example cron job
|
||||||
|
|
||||||
|
For example, you can run a backup of all your user accounts
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# at 5 a.m every week with:
|
||||||
|
# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
|
||||||
|
```
|
||||||
|
#### Check cron jobs logs
|
||||||
|
|
||||||
|
```bash
|
||||||
|
grep CRON /var/log/syslog
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Cron job expression
|
||||||
|
|
||||||
|
`MIN HOUR DOM MON DOW`
|
||||||
|
|
||||||
|
Field Description Allowed Value
|
||||||
|
MIN Minute field 0 to 59
|
||||||
|
HOUR Hour field 0 to 23
|
||||||
|
DOM Day of Month 1-31
|
||||||
|
MON Month field 1-12
|
||||||
|
DOW Day Of Week 0-6
|
||||||
|
|
||||||
|
### PS
|
||||||
|
```bash
|
||||||
|
ps aux | grep 'ruby'
|
||||||
|
```
|
||||||
|
List process, using `grep` to filter processes
|
||||||
|
### tail
|
||||||
|
Tailing texts from file in realtime
|
||||||
|
|
||||||
|
```bash
|
||||||
|
tail -f a.log
|
||||||
|
```
|
||||||
|
`f` means following, auto append texts to console
|
||||||
|
### nohup
|
||||||
|
Simply running application in background
|
||||||
|
|
||||||
|
|
||||||
|
### df
|
||||||
|
```bash
|
||||||
|
df -h
|
||||||
|
```
|
||||||
|
Show disk usage and left, `h` means show in human readable way. Normally by MB/GB.
|
||||||
|
### free
|
||||||
|
```bash
|
||||||
|
total used free shared buff/cache available
|
||||||
|
Mem: 3960624 416720 270024 22252 3273880 3264060
|
||||||
|
Swap: 4104188 109688 3994500
|
||||||
|
```
|
||||||
|
Show memory usage and
|
||||||
|
|
||||||
|
### Watch
|
||||||
|
```
|
||||||
|
watch kubectl get pods
|
||||||
|
```
|
||||||
|
Continuous running the commands, watching the changes. By default it refresh the result every `2s`.
|
||||||
|
|
||||||
|
### Change timezone
|
||||||
|
```bash
|
||||||
|
TZ=Asia/Shanghai;
|
||||||
|
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime
|
||||||
|
```
|
||||||
|
|
||||||
|
### Check release
|
||||||
|
```bash
|
||||||
|
cat /etc/*-release
|
||||||
|
```
|
||||||
|
|
||||||
|
### Debian check system version
|
||||||
|
```bash
|
||||||
|
cat /etc/issue
|
||||||
|
|
||||||
|
cat /etc/debian_version
|
||||||
|
```
|
||||||
|
|
||||||
|
### htop
|
||||||
|
|
||||||
|
like top, but more
|
||||||
|
|
||||||
|
#### mosh
|
||||||
|
|
||||||
|
auto reconnect ssh
|
||||||
|
|
||||||
|
### show last something time
|
||||||
|
|
||||||
|
```bash
|
||||||
|
last shutdown
|
||||||
|
last reboot
|
||||||
|
```
|
||||||
|
|
||||||
|
### Count files in current folder
|
||||||
|
|
||||||
|
```bash
|
||||||
|
find . -type f | wc -l
|
||||||
|
```
|
||||||
|
### Check if a port is open
|
||||||
|
|
||||||
|
Used Netcat
|
||||||
|
|
||||||
|
```bash
|
||||||
|
if ! nc -z localhost 5672; then
|
||||||
|
sleep 3;
|
||||||
|
fi
|
||||||
|
```
|
||||||
|
|
||||||
|
### scp copy files between host
|
||||||
|
|
||||||
|
#### Copy files from remote server
|
||||||
|
|
||||||
|
```bash
|
||||||
|
scp your_username@remotehost.edu:foobar.txt /local/dir
|
||||||
|
```
|
||||||
|
|
||||||
|
### Copy local files to remote server
|
||||||
|
|
||||||
|
```bash
|
||||||
|
scp /path/to/local/file user@server:/path/to/remote/file
|
||||||
|
```
|
||||||
|
|
||||||
|
### Merge video files into one
|
||||||
|
|
||||||
|
```bash
|
||||||
|
ffmpeg -f concat -safe 0 -i ./files.txt -c copy output.mp4
|
||||||
|
```
|
||||||
|
|
||||||
|
In the `files.txt` you should list all the video clips like the following
|
||||||
|
|
||||||
|
```txt
|
||||||
|
file 1.flv
|
||||||
|
file 2.flv
|
||||||
|
file 3.flv
|
||||||
|
```
|
||||||
|
|
||||||
|
### Curl
|
||||||
|
|
||||||
|
Curl is a very popular and powerful HTTP client, there is also another very good tool called `httpie` written in Python which is even eaiser to use.
|
||||||
|
|
||||||
|
The following are some useful commands:
|
||||||
|
|
||||||
|
#### Post request with file
|
||||||
|
```bash
|
||||||
|
curl --data "@$(pwd)/fixure/sample.json" --user "foo:bar" localhost:8080/api/abc
|
||||||
|
```
|
||||||
|
|
||||||
|
### Mount
|
||||||
|
|
||||||
|
#### Mount NFS(Network file system) to local
|
||||||
|
|
||||||
|
```bash
|
||||||
|
|
||||||
|
mkdir /to-local-folder
|
||||||
|
# mount
|
||||||
|
mount -t nfs -O user=abc,pass=pass 192.168.1.2:/nfs-folder /to-local-folder
|
||||||
|
|
||||||
|
# remount
|
||||||
|
mount -o remount /to-local-folder
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Mount folder permanently
|
||||||
|
|
||||||
|
In the example above, the mounted folder will lost the connection when you restart your system, in order to permanently mount the folder, you will need to edit `/etc/fstab` by adding one more line
|
||||||
|
|
||||||
|
```
|
||||||
|
192.168.1.2:/nfs-folder /to-local-folder nfs defaults 0 0
|
||||||
|
```
|
||||||
|
You can specify more options
|
||||||
|
|
||||||
|
```
|
||||||
|
192.168.0.216:/nfs-folder /to-local-folder nfs defaults,proto=tcp,port=2049 0 0
|
||||||
|
```
|
||||||
|
|
||||||
|
### Rsync
|
||||||
|
|
||||||
|
Sync folders and files between folders and hosts
|
||||||
|
|
||||||
|
### sync between directories
|
||||||
|
|
||||||
|
```bash
|
||||||
|
rsync -avzh /root/rpmpkgs /tmp/backups/
|
||||||
|
```
|
||||||
|
#### sync folders between hosts
|
||||||
|
|
||||||
|
```bash
|
||||||
|
rsync -avz --exclude downloads --exclude 'some-folder' /mnt rsync://user@192.168.1.2/rsync/ -v -c
|
||||||
|
```
|
||||||
|
|
||||||
|
You can export `RSYNC_PASSWORD` to pass password to the command.
|
||||||
|
|
||||||
|
#### Check rsync logs
|
||||||
|
|
||||||
|
```bash
|
||||||
|
grep -ir rsync /var/log
|
||||||
|
```
|
||||||
|
|
||||||
|
### Check debian version
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cat /etc/issue
|
||||||
|
|
||||||
|
cat /etc/debian_version
|
||||||
|
```
|
||||||
|
|
||||||
|
### Debian error bash: netstat: command not found
|
||||||
|
|
||||||
|
```bash
|
||||||
|
apt-get install net-tools
|
||||||
|
```
|
||||||
|
|
||||||
|
### Create CPU loads
|
||||||
|
|
||||||
|
```bash
|
||||||
|
dd if=/dev/urandom | gzip -9 >> /dev/null &
|
||||||
|
```
|
||||||
|
|
||||||
|
### Kill the load process
|
||||||
|
|
||||||
|
```bash
|
||||||
|
kill %1
|
||||||
|
```
|
||||||
|
|
||||||
|
### IP Address
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo /sbin/ifconfig
|
||||||
|
|
||||||
|
ip address # new command
|
||||||
|
```
|
||||||
|
|
||||||
|
### IP range, CIDR
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# ip range ,CIDR network
|
||||||
|
|
||||||
|
/16 /20 /24
|
||||||
|
```
|
||||||
|
|
||||||
|
### trace route tool
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo apt-get install traceroute
|
||||||
|
|
||||||
|
sudo traceroute google.com -I
|
||||||
|
```
|
||||||
|
|
||||||
|
### linux list all the service with status
|
||||||
|
|
||||||
|
```bash
|
||||||
|
systemctl --full --type service --all
|
||||||
|
```
|
||||||
|
|
||||||
|
### To see details about the RAM installed on your VM, run the following command:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo dmidecode -t 17
|
||||||
|
```
|
||||||
|
|
||||||
|
### verify the number of processors, run the following command:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
nproc
|
||||||
|
```
|
||||||
|
|
||||||
|
### CPU information
|
||||||
|
|
||||||
|
```bash
|
||||||
|
lscpu
|
||||||
|
|
||||||
|
# Check cpu platform
|
||||||
|
|
||||||
|
cat /proc/cpuinfo
|
||||||
|
```
|
||||||
|
|
||||||
|
### Running application in background with screen
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo apt-get install -y screen
|
||||||
|
|
||||||
|
sudo screen -S mcs java -Xms1G -Xmx7G -d64 -jar /home/minecraft/minecraft_server.1.11.2.jar nogui
|
||||||
|
|
||||||
|
detach
|
||||||
|
|
||||||
|
# To detach the screen terminal, press Ctrl+A, D. The terminal continues to run in the background. To reattach the terminal, run the following command:
|
||||||
|
|
||||||
|
sudo screen -r mcs
|
||||||
|
|
||||||
|
# send commands to screen
|
||||||
|
|
||||||
|
sudo screen -r -X stuff '/stop\n'
|
||||||
|
```
|
||||||
|
|
||||||
|
### ApacheBench To place a load on the load balancer, run the following command
|
||||||
|
|
||||||
|
```bash
|
||||||
|
ab -n 50000 -c 1000 http://ip
|
||||||
|
```
|
||||||
|
|
||||||
|
### Mount drives
|
||||||
|
|
||||||
|
```bash
|
||||||
|
1. Find what the drive is called
|
||||||
|
You'll need to know what the drive is called to mount it. To do that fire off one of the following (ranked in order of my preference):
|
||||||
|
lsblk
|
||||||
|
sudo blkid
|
||||||
|
sudo fdisk -l
|
||||||
|
You're looking for a partition that should look something like: /dev/sdb1. The more disks you have the higher the letter this is likely to be. Anyway, find it and remember what it's called.
|
||||||
|
2. Create a mount point (optional)
|
||||||
|
This needs to be mounted into the filesystem somewhere. You can usually use /mnt/ if you're being lazy and nothing else is mounted there but otherwise you'll want to create a new directory:
|
||||||
|
sudo mkdir /media/usb
|
||||||
|
3. Mount!
|
||||||
|
sudo mount /dev/sdb1 /media/usb
|
||||||
|
When you're done, just fire off:
|
||||||
|
sudo umount /media/usb
|
||||||
|
```
|
||||||
|
|
||||||
|
### Change dns server
|
||||||
|
|
||||||
|
```bash
|
||||||
|
vim /etc/resolv.conf
|
||||||
|
```
|
||||||
|
|
||||||
|
### Last boot
|
||||||
|
|
||||||
|
```bash
|
||||||
|
last reboot | less
|
||||||
|
last -x shutdown
|
||||||
|
```
|
||||||
|
|
||||||
|
### Ports scanner
|
||||||
|
|
||||||
|
```bash
|
||||||
|
#nmap scan ports
|
||||||
|
nmap -v 203.192.94.53
|
||||||
|
```
|
||||||
|
|
||||||
|
### Check and turn off swap
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# swap
|
||||||
|
|
||||||
|
1. Identify configured swap devices and files with cat /proc/swaps.
|
||||||
|
2. Turn off all swap devices and files with swapoff -a.
|
||||||
|
3. Remove any matching reference found in /etc/fstab.
|
||||||
|
4. Optional: Destroy any swap devices or files found in step 1 to prevent their reuse. Due to your concerns about leaking sensitive information, you may wish to consider performing some sort of secure wipe.
|
||||||
|
```
|
||||||
|
|
||||||
|
### Reset timezone
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo dpkg-reconfigure tzdata
|
||||||
|
```
|
||||||
|
|
||||||
|
### List all timezones
|
||||||
|
|
||||||
|
```bash
|
||||||
|
ls /usr/share/zoneinfo/
|
||||||
|
|
||||||
|
# check ssh failed retries
|
||||||
|
|
||||||
|
grep "Failed password" /var/log/auth.log
|
||||||
|
```
|
||||||
|
|
||||||
|
### Linux disk analyse
|
||||||
|
|
||||||
|
```bash
|
||||||
|
### Ncdu analyse linux disk
|
||||||
|
|
||||||
|
ncdu
|
||||||
|
```
|
||||||
|
|
||||||
|
### VIM setup
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# https://github.com/amix/vimrc
|
||||||
|
|
||||||
|
git clone --depth=1 https://github.com/amix/vimrc.git ~/.vim_runtime
|
||||||
|
sh ~/.vim_runtime/install_awesome_vimrc.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
### check ssh failed retries
|
||||||
|
|
||||||
|
```bash
|
||||||
|
grep "Failed password" /var/log/auth.log
|
||||||
|
|
||||||
|
# In order to display extra information about the failed SSH logins, issue the command as shown in the below example.
|
||||||
|
|
||||||
|
egrep "Failed|Failure" /var/log/auth.log
|
||||||
|
```
|
||||||
|
|
||||||
|
## Popular Distributions
|
||||||
|
|
||||||
|
### Debian
|
||||||
|
|
||||||
|
### Ubuntu
|
||||||
|
|
||||||
|
### Manjaro
|
||||||
|
|
||||||
|
### Fedora
|
||||||
|
|
||||||
|
Fedora is the main project, and it’s a community-based, free distro focused on quick releases of new features and functionality.
|
||||||
|
|
||||||
|
### CentOS
|
||||||
|
|
||||||
|
CentOS is basically the community version of Redhat. So it’s pretty much identical, but it is free and support comes from the community as opposed to Redhat itself.
|
||||||
|
|
||||||
|
### RHEL (RedHat Enterprise Linux)
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
|
RHEL is the corporate version based on the progress of that project, and it has slower releases, comes with support, and isn’t free.
|
||||||
|
|
||||||
|
### Arch Linux
|
||||||
|
|
||||||
|
## Package manager
|
||||||
|
|
||||||
|
* [snap](https://snapcraft.io/)
|
||||||
|
* [Brew](https://brew.sh/)
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
---
|
||||||
|
title: More Tools
|
||||||
|
created: 2021-11-04
|
||||||
|
updated: 2021-11-04
|
||||||
|
type: summary
|
||||||
|
tags: [tech, reference]
|
||||||
|
external: https://github.com/wahyd4/knowledge/blob/master/categories/devops/more-tools.md
|
||||||
|
---
|
||||||
|
|
||||||
|
# More tools
|
||||||
|
|
||||||
|
## HTTP performace tests
|
||||||
|
|
||||||
|
Some command line toos which can provide categorized information for http requests.
|
||||||
|
|
||||||
|
* [curl_time](https://stackoverflow.com/questions/18215389/how-do-i-measure-request-and-response-times-at-once-using-curl?rq=1)
|
||||||
|
* [hey](https://github.com/rakyll/hey)
|
||||||
|
* [ab](https://httpd.apache.org/docs/2.4/programs/ab.html)
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
---
|
||||||
|
title: Business Spoken English
|
||||||
|
created: 2018-03-25
|
||||||
|
updated: 2018-03-25
|
||||||
|
type: summary
|
||||||
|
tags: [tech, reference]
|
||||||
|
external: https://github.com/wahyd4/knowledge/blob/master/categories/english/business-spoken-english.md
|
||||||
|
---
|
||||||
|
|
||||||
|
# Business English Speaking for Professionals
|
||||||
|
|
||||||
|
|
||||||
|
## Some tips for doing presentation
|
||||||
|
|
||||||
|
* Talk loud enough
|
||||||
|
* Look at people when you are talking
|
||||||
|
* Look at people's eyes
|
||||||
|
* Look at people's noses
|
||||||
|
* Change your tones occasionally
|
||||||
|
* Be interested in what you are talking about
|
||||||
|
* If you are interested, pretend to be
|
||||||
|
* Use your face, don't to be a poker face
|
||||||
|
* Change your hands while you talking
|
||||||
|
* Pick a spot, stand still and tall
|
||||||
|
* Ask yourself question, how can I help them?
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
---
|
||||||
|
title: Fintech
|
||||||
|
created: 2019-12-02
|
||||||
|
updated: 2019-12-02
|
||||||
|
type: summary
|
||||||
|
tags: [tech, reference]
|
||||||
|
external: https://github.com/wahyd4/knowledge/blob/master/categories/fintech.md
|
||||||
|
---
|
||||||
|
|
||||||
|
# Fintech(Financial technology)
|
||||||
|
|
||||||
|
## ISO8583 message
|
||||||
|
|
||||||
|
### A example
|
||||||
|
|
||||||
|
```
|
||||||
|
02004200040000000002161234567890123456060
|
||||||
|
9173030123456789ABC1000123456789012345678
|
||||||
|
90123456789012345678901234567890123456789
|
||||||
|
0123456789012345678901234567890123456789
|
||||||
|
```
|
||||||
|
Where:
|
||||||
|
|
||||||
|
```
|
||||||
|
0200 - MTI (Message Type Indicator),
|
||||||
|
4200040000000002 - primary bitmap,
|
||||||
|
161234567890123456 - field 2, the first 2 digits: 16, is length indicator
|
||||||
|
0609173030 - field 7,
|
||||||
|
123456789ABC - field 22,
|
||||||
|
012345678901234567890123456789012345678901234567890\
|
||||||
|
1234567890123456789012345678901234567890123456789 - field 63.
|
||||||
|
```
|
||||||
|
|
||||||
|
### Definition
|
||||||
|
|
||||||
|
ISO8583 message is used in bank or financial institutes card-originated transactions. But sometime, those not card-originated transactions also use ISO8583.
|
||||||
|
|
||||||
|
### Typical Parts
|
||||||
|
|
||||||
|
Typical Fields an ISO8583 message
|
||||||
|
A typical message might include such fields:
|
||||||
|
```
|
||||||
|
MTI - Message Type Indicator.
|
||||||
|
Bit 2 - Primary Account Number (PAN)
|
||||||
|
Bit 3 - Processing Code
|
||||||
|
Bit 7 - Date and Time of transmission
|
||||||
|
Bit 11 - Audit Code
|
||||||
|
Bit 12 - Local time transaction
|
||||||
|
Bit 13 - Local transaction date
|
||||||
|
Bit 32 - Identification code of the institution of acquisition
|
||||||
|
Bit 38 - The authorization code in response
|
||||||
|
Bit 39 - Response Code
|
||||||
|
Bit 49 - Currency code of transaction
|
||||||
|
```
|
||||||
@@ -0,0 +1,438 @@
|
|||||||
|
---
|
||||||
|
title: Go
|
||||||
|
created: 2020-04-05
|
||||||
|
updated: 2020-04-05
|
||||||
|
type: summary
|
||||||
|
tags: [tech, reference]
|
||||||
|
external: https://github.com/wahyd4/knowledge/blob/master/categories/go.md
|
||||||
|
---
|
||||||
|
|
||||||
|
## pass pointer or value
|
||||||
|
- value: Variable must not be modified
|
||||||
|
- Variable is a large struct then prefer pointer
|
||||||
|
- Variable is a map or slice then prefer value
|
||||||
|
- Passing by value often is cheaper
|
||||||
|
|
||||||
|
## struct
|
||||||
|
|
||||||
|
- make
|
||||||
|
```go
|
||||||
|
make(T, args) -> T
|
||||||
|
```
|
||||||
|
- new
|
||||||
|
```go
|
||||||
|
new(T) -> *T
|
||||||
|
```
|
||||||
|
- a := T{}
|
||||||
|
|
||||||
|
## array
|
||||||
|
```go
|
||||||
|
var a [1]int
|
||||||
|
```
|
||||||
|
Array has a exactly length, can't be modified.
|
||||||
|
## slice
|
||||||
|
|
||||||
|
```go
|
||||||
|
var a []string
|
||||||
|
[]string{"a", "b"}
|
||||||
|
[...]string{"a","b"}
|
||||||
|
```
|
||||||
|
1. Auto increment length
|
||||||
|
```go
|
||||||
|
new([]int)
|
||||||
|
make([]int, 2, 5)
|
||||||
|
```
|
||||||
|
2. nil is a valid slice which length is `0`
|
||||||
|
|
||||||
|
## Go routine
|
||||||
|
|
||||||
|
- you can run more goroutine vs thread
|
||||||
|
- go routine have a faster start up time than thread
|
||||||
|
- go routine come with built-in primitives to communicate safely by using channels
|
||||||
|
|
||||||
|
## Closure
|
||||||
|
|
||||||
|
## Channel
|
||||||
|
|
||||||
|
- Normal channel
|
||||||
|
```go
|
||||||
|
messages := make(chan string)
|
||||||
|
// _Send_ a value into a channel using the `channel <-`
|
||||||
|
go func() { messages <- "ping" }()
|
||||||
|
// channel. Here we'll receive the `"ping"` message
|
||||||
|
msg := <-messages
|
||||||
|
```
|
||||||
|
|
||||||
|
- buffered channel
|
||||||
|
```go
|
||||||
|
ch := make(chan Task, 3)
|
||||||
|
```
|
||||||
|
|
||||||
|
## Big Numbers
|
||||||
|
|
||||||
|
Package big implements arbitrary-precision arithmetic (big numbers).
|
||||||
|
For example the int numbers larger than `int64` or the float greater than `float64`.
|
||||||
|
|
||||||
|
```
|
||||||
|
int16: (-32,768 to +32,767)
|
||||||
|
|
||||||
|
int32: (-2,147,483,648 to +2,147,483,647)
|
||||||
|
|
||||||
|
int64: (-9,223,372,036,854,775,808 to +9,223,372,036,854,775,807)
|
||||||
|
```
|
||||||
|
The following numeric types are supported:
|
||||||
|
```
|
||||||
|
Int signed integers
|
||||||
|
Rat rational numbers
|
||||||
|
Float floating-point numbers
|
||||||
|
```
|
||||||
|
|
||||||
|
Some exmaple code
|
||||||
|
```go
|
||||||
|
import "math/big"
|
||||||
|
|
||||||
|
//string to Int
|
||||||
|
n1 := new(big.Int)
|
||||||
|
n1, ok = n1.SetString(str1, 10)
|
||||||
|
|
||||||
|
// Int1 + Int2
|
||||||
|
result := new(big.Int)
|
||||||
|
result.Add(n1, n2)
|
||||||
|
|
||||||
|
// Int to string
|
||||||
|
result.String()
|
||||||
|
```
|
||||||
|
|
||||||
|
## Sync
|
||||||
|
|
||||||
|
### atomic
|
||||||
|
|
||||||
|
### Mutex
|
||||||
|
|
||||||
|
- sync.Mutex()
|
||||||
|
- mutex.Lock()
|
||||||
|
- mutx.Unlock()
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"sync"
|
||||||
|
"time"
|
||||||
|
)
|
||||||
|
|
||||||
|
// SafeCounter is safe to use concurrently.
|
||||||
|
type SafeCounter struct {
|
||||||
|
v map[string]int
|
||||||
|
mux sync.Mutex
|
||||||
|
}
|
||||||
|
|
||||||
|
// Inc increments the counter for the given key.
|
||||||
|
func (c *SafeCounter) Inc(key string) {
|
||||||
|
c.mux.Lock()
|
||||||
|
// Lock so only one goroutine at a time can access the map c.v.
|
||||||
|
c.v[key]++
|
||||||
|
c.mux.Unlock()
|
||||||
|
}
|
||||||
|
|
||||||
|
// Value returns the current value of the counter for the given key.
|
||||||
|
func (c *SafeCounter) Value(key string) int {
|
||||||
|
c.mux.Lock()
|
||||||
|
// Lock so only one goroutine at a time can access the map c.v.
|
||||||
|
defer c.mux.Unlock()
|
||||||
|
return c.v[key]
|
||||||
|
}
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
c := SafeCounter{v: make(map[string]int)}
|
||||||
|
for i := 0; i < 1000; i++ {
|
||||||
|
go c.Inc("somekey")
|
||||||
|
}
|
||||||
|
|
||||||
|
time.Sleep(time.Second)
|
||||||
|
fmt.Println(c.Value("somekey"))
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
### RWMutex
|
||||||
|
!> A RWMutex is a reader/writer mutual exclusion lock. The lock can be held by an arbitrary number of readers or a single writer. The zero value for a RWMutex is an unlocked mutex.
|
||||||
|
In other words, readers don't have to wait for each other. They only have to wait for writers holding the lock.
|
||||||
|
|
||||||
|
### string literals
|
||||||
|
|
||||||
|
```go
|
||||||
|
`aaa bbb ccc`
|
||||||
|
```
|
||||||
|
### panic / recover
|
||||||
|
|
||||||
|
### `sync.Map` is concurrent/ thread safe `map`, normal `map` isn't
|
||||||
|
|
||||||
|
```go
|
||||||
|
m := new(sync.Map)
|
||||||
|
m.Store("a", "b")
|
||||||
|
value, ok := m.Load("a")
|
||||||
|
```
|
||||||
|
|
||||||
|
### Defer to Clean Up
|
||||||
|
|
||||||
|
Use defer to clean up resources such as files and locks.
|
||||||
|
```go
|
||||||
|
p.Lock()
|
||||||
|
defer p.Unlock()
|
||||||
|
|
||||||
|
if p.count < 10 {
|
||||||
|
return p.count
|
||||||
|
}
|
||||||
|
|
||||||
|
p.count++
|
||||||
|
return p.count
|
||||||
|
|
||||||
|
// more readable
|
||||||
|
```
|
||||||
|
|
||||||
|
## Monotonic Clocks
|
||||||
|
|
||||||
|
Operating systems provide both a `wall clock`, which is subject to changes for clock synchronization, and a `monotonic clock`, which is not. The general rule is that the wall clock is for telling time and the monotonic clock is for measuring time. Rather than split the API, in this package the Time returned by time.Now contains both a wall clock reading and a monotonic clock reading; later time-telling operations use the wall clock reading, but later time-measuring operations, specifically comparisons and subtractions, use the monotonic clock reading.
|
||||||
|
|
||||||
|
For example, this code always computes a positive elapsed time of approximately 20 milliseconds, even if the wall clock is changed during the operation being timed:
|
||||||
|
|
||||||
|
```go
|
||||||
|
start := time.Now()
|
||||||
|
... operation that takes 20 milliseconds ...
|
||||||
|
t := time.Now()
|
||||||
|
elapsed := t.Sub(start)
|
||||||
|
```
|
||||||
|
|
||||||
|
### wall clock
|
||||||
|
|
||||||
|
This clock is subject to potential variations. For example, if it is synchronized with NTP (Network Time Protocol). In this case after synchronization, the local clock of our server can jump backward or forward in time. So measuring a duration from the wall-clock can be biased.
|
||||||
|
|
||||||
|
### Monotonic clock
|
||||||
|
|
||||||
|
we have a guarantee that the time always moves forward and will not be impacted by variations leading to jumps in time.
|
||||||
|
|
||||||
|
Therefore, if we have to measure durations, we must use the monotonic-clock. This rule of thumb is only valid for local duration measurements though. Indeed, the monotonic-clocks of two different servers are by definition not synchronized. So, measuring a distributed execution based on these clocks will not be accurate.
|
||||||
|
|
||||||
|
## Frameworks
|
||||||
|
|
||||||
|
### db
|
||||||
|
|
||||||
|
- xorm
|
||||||
|
- gorm
|
||||||
|
|
||||||
|
### web
|
||||||
|
|
||||||
|
- beego
|
||||||
|
- mux
|
||||||
|
- gin
|
||||||
|
- go kit
|
||||||
|
- full stack micro service framework like spring boot
|
||||||
|
|
||||||
|
## Tools
|
||||||
|
|
||||||
|
### profiler
|
||||||
|
- go-wrk(wrk)
|
||||||
|
- a http benchmark tool
|
||||||
|
- go-torch
|
||||||
|
- Stochastic flame graph profiler
|
||||||
|
### test
|
||||||
|
- Testify <http://github.com/stretchr/testify>
|
||||||
|
- Ginkgo <http://onsi.github.io/ginkgo/>
|
||||||
|
### Linter
|
||||||
|
- Golangci-lint https://github.com/golangci/golangci-lint
|
||||||
|
|
||||||
|
# Tips
|
||||||
|
|
||||||
|
## Sort slice
|
||||||
|
|
||||||
|
```go
|
||||||
|
// sort users by user age ASC
|
||||||
|
sort.Slice(users, func(i, j int) bool {
|
||||||
|
return users[i].age < planets[j].age
|
||||||
|
})
|
||||||
|
```
|
||||||
|
|
||||||
|
## slice
|
||||||
|
|
||||||
|
- byte* array //actual data
|
||||||
|
- uintgo len
|
||||||
|
- uintgo cap
|
||||||
|
|
||||||
|
## map
|
||||||
|
|
||||||
|
* implement by hash table
|
||||||
|
* slice can't be the key of a map, but sized array could. e.g. `var a map[[2]int]string`
|
||||||
|
|
||||||
|
## Go has no generics
|
||||||
|
|
||||||
|
- performance
|
||||||
|
- complexity
|
||||||
|
- If C++ and Java are about type hierarchies and the taxonomy of types, Go is about composition.
|
||||||
|
- How to solve
|
||||||
|
- use interface
|
||||||
|
- use type assertions
|
||||||
|
- use reflection
|
||||||
|
|
||||||
|
## Modify item in range
|
||||||
|
|
||||||
|
- use the array index instead of the value
|
||||||
|
```go
|
||||||
|
for _, e := range array {
|
||||||
|
e.field = "foo"
|
||||||
|
}
|
||||||
|
|
||||||
|
for idx, _ := range array {
|
||||||
|
array[idx].field = "foo"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
## merge two array
|
||||||
|
|
||||||
|
- a = append(a, b…)
|
||||||
|
- must add … to b, otherwise you can only add one item
|
||||||
|
|
||||||
|
## error handling
|
||||||
|
|
||||||
|
### check error type
|
||||||
|
|
||||||
|
```go
|
||||||
|
ErrorSample := errors.New("some error")
|
||||||
|
if errors.Is(err, ErrorSample) {
|
||||||
|
// something wasn't found
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### error type assertion
|
||||||
|
```go
|
||||||
|
if serr, ok := err.(*json.SyntaxError); ok {}
|
||||||
|
//or
|
||||||
|
|
||||||
|
// var e *QueryError
|
||||||
|
if errors.As(err, &e) {
|
||||||
|
// err is a *QueryError, and e is set to the error's value
|
||||||
|
}
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
### better error handling
|
||||||
|
|
||||||
|
#### custom error type
|
||||||
|
|
||||||
|
```go
|
||||||
|
type appError struct {
|
||||||
|
Error error
|
||||||
|
Message string
|
||||||
|
Code int
|
||||||
|
}
|
||||||
|
```
|
||||||
|
#### concat error check
|
||||||
|
|
||||||
|
```go
|
||||||
|
if err1() != nil || err2() != nil {}
|
||||||
|
```
|
||||||
|
#### some error constants
|
||||||
|
|
||||||
|
```go
|
||||||
|
errNotFound = errors.New("Item not found")
|
||||||
|
switch err {
|
||||||
|
case errNotFound:
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## date format
|
||||||
|
```go
|
||||||
|
t := time.Now()
|
||||||
|
fmt.Println(t.String())
|
||||||
|
fmt.Println(t.Format("2006-01-02 15:04:05"))
|
||||||
|
```
|
||||||
|
|
||||||
|
- var _ InterfaceX = &InterfaceXImplementation{}
|
||||||
|
- make sure InterfaceX’s implementation works
|
||||||
|
|
||||||
|
## reference types in go
|
||||||
|
* map
|
||||||
|
* channel
|
||||||
|
* slice
|
||||||
|
|
||||||
|
## value types
|
||||||
|
* Array
|
||||||
|
|
||||||
|
## Read file line by line
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"bufio"
|
||||||
|
"fmt"
|
||||||
|
"log"
|
||||||
|
"os"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
file, err := os.Open("/path/to/file.txt")
|
||||||
|
if err != nil {
|
||||||
|
log.Fatal(err)
|
||||||
|
}
|
||||||
|
defer file.Close()
|
||||||
|
|
||||||
|
scanner := bufio.NewScanner(file)
|
||||||
|
for scanner.Scan() {
|
||||||
|
fmt.Println(scanner.Text())
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := scanner.Err(); err != nil {
|
||||||
|
log.Fatal(err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## commands
|
||||||
|
|
||||||
|
### test
|
||||||
|
|
||||||
|
- go test ./...
|
||||||
|
- run all tests in current directory and all of its subdirectories
|
||||||
|
- go test foo/...
|
||||||
|
- run all tests with import path prefixed with foo/:
|
||||||
|
- go test foo...
|
||||||
|
- run all tests import path prefixed with foo:
|
||||||
|
- go test ...
|
||||||
|
- run all tests in your $GOPATH:
|
||||||
|
|
||||||
|
## REPL
|
||||||
|
|
||||||
|
REPL stands for read eval print loop, basically it just like the irb in Ruby.
|
||||||
|
|
||||||
|
Wiki: <https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop>
|
||||||
|
|
||||||
|
* gore <https://github.com/motemen/gore>
|
||||||
|
|
||||||
|
# Some code snippets
|
||||||
|
|
||||||
|
## defer would still run after panic
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
func main() {
|
||||||
|
for {
|
||||||
|
defer func() {
|
||||||
|
for {
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
panic("yolo")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
## Some interesting mistakes
|
||||||
|
|
||||||
|
### Do not reuse HTTP request when retrying
|
||||||
|
|
||||||
|
See more information: https://stackoverflow.com/questions/55385894/http-contentlength-99-with-body-length-0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Useful links
|
||||||
|
* [Go best practice](https://github.com/golang/go/wiki/CodeReviewComments)
|
||||||
|
* [Code Review Comments](https://github.com/golang/go/wiki/CodeReviewComments)
|
||||||
|
* [Uber Go code style](https://github.com/uber-go/guide/blob/master/style.md#pointers-to-interfaces)
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
---
|
||||||
|
title: Interview
|
||||||
|
created: 2022-04-06
|
||||||
|
updated: 2022-04-06
|
||||||
|
type: summary
|
||||||
|
tags: [tech, reference]
|
||||||
|
external: https://github.com/wahyd4/knowledge/blob/master/categories/interviews/interview.md
|
||||||
|
---
|
||||||
|
|
||||||
|
# Interviews
|
||||||
|
|
||||||
|
## System design
|
||||||
|
|
||||||
|
### Questions to ask when you receive a question
|
||||||
|
|
||||||
|
* How many users will be using it? What's the throughput we need to design for?
|
||||||
|
* Do we need to consider accessing by users from multiple countries and regions?
|
||||||
|
* Is this for a single tenant for multiple tenants?
|
||||||
|
* What's the latency requirements?
|
||||||
|
* Do we need to consider logging and montoring?
|
||||||
|
|
||||||
|
### Steps to answer the question
|
||||||
|
|
||||||
|
* First, briefly talk about what the high level design, the components
|
||||||
|
* Briefly calculatt the traffic which relates to what db you choose and system architectures.
|
||||||
|
* Talk about the DB choice and why, NOSQL or relational SQL database
|
||||||
|
* Keep interation with interviewers, and ask if the answer is good enough, do you want me to dive deeper?
|
||||||
|
|
||||||
|
|
||||||
|
## Live coding
|
||||||
|
|
||||||
|
### Steps
|
||||||
|
|
||||||
|
* Clarify the inputs and outputs
|
||||||
|
* Briefly write overall steps
|
||||||
|
* I will always write a test case before implementing it
|
||||||
|
* Calculate the Algorithm complexity, O(n)
|
||||||
|
* Keep talking to the intreviewer and keep interactions
|
||||||
|
|
||||||
|
## resources
|
||||||
|
|
||||||
|
- [https://github.com/kdn251/interviews](https://github.com/kdn251/interviews)
|
||||||
|
|
||||||
|
- [5 Salary Negotiation Rules for Software Developers](https://dev.to/aershov24/5-salary-negotiation-rules-for-software-developers-get-20-on-top-of-your-market-rate-2jii)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Some interview questions
|
||||||
|
|
||||||
|
### Why ssd is faster than hdd
|
||||||
|
|
||||||
|
One is that compared to a spinning hard disk the access (seek) time is miniscule, the hard disk needs to move the head to the right track and then wait for the sector to be under the head (depends on rotation speed) this is on average about 10 milliseconds. The SSD on the other hand needs to send a command to the flash chip on a fast interconnect and data will stream back in a few microseconds.
|
||||||
|
|
||||||
|
The other factor is parallelism, the HDD has a single head construction and it can only read from one head at a time so if you send it 32 commands at the same time the last one will only be started after all the others have completed (assuming no reordering). The SSD can access multiple flash chips at the same time and order them all to fetch data, it can even pull the data to its own RAM in parallel from multiple flash chips, most consumer SSDs can handle at least 8 requests in parallel so it can be blazing fast. This is also the different between the SSD and a USB flash drive, the USB flash drive only has one flash chip so it has no parallelization.
|
||||||
@@ -0,0 +1,73 @@
|
|||||||
|
---
|
||||||
|
title: Iot
|
||||||
|
created: 2020-04-05
|
||||||
|
updated: 2020-04-05
|
||||||
|
type: summary
|
||||||
|
tags: [tech, reference]
|
||||||
|
external: https://github.com/wahyd4/knowledge/blob/master/categories/iot.md
|
||||||
|
---
|
||||||
|
|
||||||
|
# IoT
|
||||||
|
|
||||||
|
## MQTT
|
||||||
|
|
||||||
|
MQTT is a Client Server publish/subscribe messaging transport protocol. It is light weight, open, simple, and designed so as to be easy to implement. These characteristics make it ideal for use in many situations, including constrained environments such as for communication in Machine to Machine (M2M) and Internet of Things (IoT) contexts where a small code footprint is required and/or network bandwidth is at a premium. MQTT means **MQ Telemetry Transport**
|
||||||
|
|
||||||
|
### Core features
|
||||||
|
|
||||||
|
* Connect, Pub/Sub
|
||||||
|
* Quality of Service(QoS)
|
||||||
|
* Retained Messages
|
||||||
|
* Persistent Session
|
||||||
|
* Last Will and Testament
|
||||||
|
* Keep Alive
|
||||||
|
|
||||||
|
### Why Pub/Sub is good
|
||||||
|
|
||||||
|
The most important aspect of pub/sub is the decoupling of the publisher of the message from the recipient(subscriber). This decoupling has several dimensions:
|
||||||
|
|
||||||
|
* **Space decoupling**: Publisher and subscriber do not need to know each other (for example, no exchange of IP address and port).
|
||||||
|
|
||||||
|
* **Time decoupling**: Publisher and subscriber do not need to run at the same time.
|
||||||
|
|
||||||
|
* **Synchronization decoupling**: Operations on both components do not need to be interrupted during publishing or receiving.
|
||||||
|
|
||||||
|
!> In summary, the pub/sub model removes direct communication between the publisher of the message and the recipient/subscriber. The filtering activity of the broker makes it possible to control which client/subscriber receives which message. The decoupling has three dimensions: space, time, and synchronization.
|
||||||
|
|
||||||
|
MQTT embodies all the aspects of pub/sub that we’ve mentioned:
|
||||||
|
|
||||||
|
* MQTT decouples the publisher and subscriber spatially. To publish or receive messages, publishers and subscribers only need to know the hostname/IP and port of the broker
|
||||||
|
|
||||||
|
* MQTT decouples by time. Although most MQTT use cases deliver messages in near-real time, if desired, the broker can store messages for clients that are not online. (Two conditions must be met to store messages: the client had connected with a persistent session and subscribed to a topic with a Quality of Service greater than 0).
|
||||||
|
|
||||||
|
* MQTT works asynchronously. Because most client libraries work asynchronously and are based on callbacks or a similar model, tasks are not blocked while waiting for a message or publishing a message. In certain use cases, synchronization is desirable and possible. To wait for a certain message, some libraries have synchronous APIs. But the flow is usually asynchronous.
|
||||||
|
|
||||||
|
Another thing that should be mentioned is that MQTT is especially easy to use on the client-side. Most pub/sub systems have the logic on the broker-side, but MQTT is really the essence of pub/sub when using a client library and that makes it a light-weight protocol for small and constrained devices.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### MQTT Brokers
|
||||||
|
|
||||||
|
* [HiveMQ](https://www.hivemq.com/)
|
||||||
|
* [VerneMQ](https://vernemq.com)
|
||||||
|
* [Mosquitto](https://mosquitto.org/)
|
||||||
|
|
||||||
|
|
||||||
|
### Difference between MQTT and Message Queue
|
||||||
|
|
||||||
|
**A message queue stores message until they are consumed**
|
||||||
|
|
||||||
|
When you use a message queue, each incoming message is stored in the queue until it is picked up by a client (often called a consumer). If no client picks up the message, the message remains stuck in the queue and waits to be consumed. In a message queue, it is not possible for a message not to be processed by any client, as it is in MQTT if nobody subscribes to a topic.
|
||||||
|
|
||||||
|
**A message is only consumed by one client**
|
||||||
|
|
||||||
|
Another big difference is that in a traditional message queue a message can be processed by one consumer only. The load is distributed between all consumers for a queue. In MQTT the behavior is quite the opposite: every subscriber that subscribes to the topic gets the message.
|
||||||
|
|
||||||
|
**Queues are named and must be created explicitly**
|
||||||
|
|
||||||
|
A queue is far more rigid than a topic. Before a queue can be used, the queue must be created explicitly with a separate command. Only after the queue is named and created is it possible to publish or consume messages. In contrast, MQTT topics are extremely flexible and can be created on the fly.
|
||||||
|
|
||||||
|
|
||||||
|
### Useful posts
|
||||||
|
|
||||||
|
* [MQTT Essentials](https://www.hivemq.com/blog/mqtt-essentials-part-1-introducing-mqtt)
|
||||||
@@ -0,0 +1,241 @@
|
|||||||
|
---
|
||||||
|
title: Java
|
||||||
|
created: 2020-04-08
|
||||||
|
updated: 2020-04-08
|
||||||
|
type: summary
|
||||||
|
tags: [tech, reference]
|
||||||
|
external: https://github.com/wahyd4/knowledge/blob/master/categories/java.md
|
||||||
|
---
|
||||||
|
|
||||||
|
## Java GC
|
||||||
|
|
||||||
|
### GC types
|
||||||
|
|
||||||
|
- Serial GC
|
||||||
|
- Parallel GC
|
||||||
|
- CMS GC
|
||||||
|
- G1 GC
|
||||||
|
|
||||||
|
### Object type
|
||||||
|
|
||||||
|
- Young generation minor GC
|
||||||
|
- Old generation full GC
|
||||||
|
- System.gc()
|
||||||
|
|
||||||
|
## JVM
|
||||||
|
|
||||||
|
- Method Area
|
||||||
|
- Class name, Constant, static Constant, Class object
|
||||||
|
- Heap
|
||||||
|
- Object instance, array
|
||||||
|
|
||||||
|
- young generation
|
||||||
|
|
||||||
|
- Old generation
|
||||||
|
- VM stack
|
||||||
|
- local variable
|
||||||
|
- dynamic links
|
||||||
|
- operation stacks
|
||||||
|
- Native method stack
|
||||||
|
- program counter
|
||||||
|
|
||||||
|
### JVM insight
|
||||||
|

|
||||||
|
## Spring
|
||||||
|
- Spring boot
|
||||||
|
- Rest controller
|
||||||
|
- Jpa template
|
||||||
|
- Spring scheduler
|
||||||
|
- Annotation bean
|
||||||
|
- Spring cloud
|
||||||
|
- Consol
|
||||||
|
- Zuul
|
||||||
|
- Cloud config
|
||||||
|
- Spring cloud zookeeper( discovery and configuration)
|
||||||
|
- Spring ecurity
|
||||||
|
|
||||||
|
## ORM
|
||||||
|
- Hibernate
|
||||||
|
- validation
|
||||||
|
- JPA
|
||||||
|
- Sprint jpa tempalte
|
||||||
|
- Mybatis
|
||||||
|
|
||||||
|
## Build
|
||||||
|
- Gradle
|
||||||
|
- groovy task
|
||||||
|
- Maven
|
||||||
|
- XML plugins
|
||||||
|
- Maven mirror
|
||||||
|
|
||||||
|
- [https://maven-central.storage.googleapis.com](https://maven-central.storage.googleapis.com)
|
||||||
|
|
||||||
|
- [http://maven.aliyun.com/nexus/content/groups/public/](http://maven.aliyun.com/nexus/content/groups/public/)
|
||||||
|
- Ant
|
||||||
|
- task based
|
||||||
|
|
||||||
|
## Composition or inheritance
|
||||||
|
|
||||||
|
Think of containment as a has a relationship. A car "has an" engine, a person "has a" name, etc.
|
||||||
|
|
||||||
|
Think of inheritance as an is a relationship. A car "is a" vehicle, a person "is a" mammal, etc.
|
||||||
|
|
||||||
|
## Useful tips
|
||||||
|
|
||||||
|
### Iterate map
|
||||||
|
- for (Map.Entry<String, String> entry : map.entrySet()) { }
|
||||||
|
### List to array
|
||||||
|
- int[] arr= new int[list.length](); list.toArray(arr);
|
||||||
|
### Object
|
||||||
|
- immutable
|
||||||
|
- object that can’t be modified after it’s created
|
||||||
|
- Don’t allow subclass override methods, class to be final
|
||||||
|
- Don’t provide setter method
|
||||||
|
- Make all field private and final
|
||||||
|
- mutable
|
||||||
|
### Default Timezone
|
||||||
|
- TimeZone.setDefault(TimeZone.getTimeZone("GMT+8"))
|
||||||
|
### [generics](https://appliedgo.net/generics/)
|
||||||
|
- Why we need?
|
||||||
|
|
||||||
|
- e.g we have sort method, and different type(n) of objects. then you have to write n kind of search methods.
|
||||||
|
### event listener
|
||||||
|
- [https://stackoverflow.com/questions/6270132/create-a-custom-event-in-java](https://stackoverflow.com/questions/6270132/create-a-custom-event-in-java)
|
||||||
|
|
||||||
|
### Try with resource
|
||||||
|
The try-with-resources statement is a try statement that declares one or more resources. A resource is an object that must be closed after the program is finished with it. The try-with-resources statement ensures that each resource is closed at the end of the statement. Any object that implements java.lang.AutoCloseable, which includes all objects which implement java.io.Closeable, can be used as a resource.
|
||||||
|
|
||||||
|
In short no need add manual `finally` block to close resources.
|
||||||
|
|
||||||
|
```java
|
||||||
|
try (InputStream caInput = new ByteArrayInputStream(decode)) {
|
||||||
|
// Generate the CA Certificate from the raw resource file
|
||||||
|
|
||||||
|
Certificate ca = CertificateFactory.getInstance("X.509").generateCertificate(caInput);
|
||||||
|
|
||||||
|
// Load the key store using the CA
|
||||||
|
KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType());
|
||||||
|
keyStore.load(null, null);
|
||||||
|
keyStore.setCertificateEntry("ca", ca);
|
||||||
|
|
||||||
|
// Initialize the TrustManager with this CA
|
||||||
|
TrustManagerFactory tmf = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
|
||||||
|
tmf.init(keyStore);
|
||||||
|
|
||||||
|
// Create an SSL context that uses the created trust manager
|
||||||
|
SSLContext sslContext = SSLContext.getInstance("TLS");
|
||||||
|
sslContext.init(null, tmf.getTrustManagers(), new SecureRandom());
|
||||||
|
|
||||||
|
return sslContext.getSocketFactory();
|
||||||
|
|
||||||
|
} catch (Exception ex) {
|
||||||
|
logger.error(ex.getMessage());
|
||||||
|
throw new RuntimeException(ex);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## JAVA SE
|
||||||
|
|
||||||
|
### Java Collection
|
||||||
|

|
||||||
|
|
||||||
|
#### HashMap and HashTable
|
||||||
|
|
||||||
|
- `Hashtable` is synchronized, whereas `HashMap` is not. This makes HashMap better for non-threaded applications, as unsynchronized Objects typically perform better than synchronized ones.
|
||||||
|
|
||||||
|
- `Hashtable` does not allow null keys or values. `HashMap` allows one null key and any number of null values.
|
||||||
|
|
||||||
|
- One of HashMap's subclasses is `LinkedHashMap`, so in the event that you'd want predictable iteration order (which is insertion order by default), you could easily swap out the HashMap for a LinkedHashMap. This wouldn't be as easy if you were using Hashtable.
|
||||||
|
|
||||||
|
- `HashMap` is not thread-safe, if you do want to have thread-safe one then use `Collections.synchronizedMap()`,
|
||||||
|
- HashTable is thread-safe, but is treated as legacy.
|
||||||
|
|
||||||
|
### modifier
|
||||||
|
|
||||||
|
* public
|
||||||
|
* no modifier
|
||||||
|
* protected
|
||||||
|
* priivate
|
||||||
|
|
||||||
|
### Java modifier diagram
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
### NIO
|
||||||
|
- Channels
|
||||||
|
- A channel is a kind of stream, from the channel data can be read into a buffer.
|
||||||
|
- channel implementations
|
||||||
|
- FileChannel
|
||||||
|
- reads data from and to files
|
||||||
|
- DatagramChannel
|
||||||
|
- read and write data over the network via UDP
|
||||||
|
- SocketChannel
|
||||||
|
- read and write data over the network visa TCP
|
||||||
|
- ServerSocketChannel
|
||||||
|
- allows you to listen for incoming TCP connections, like a web server. For each incoming connection a SocketChannel is created.
|
||||||
|
- Buffer
|
||||||
|
|
||||||
|
- code sample
|
||||||
|
```java
|
||||||
|
RandomAccessFile aFile = new RandomAccessFile("data/nio-data.txt", "rw");
|
||||||
|
FileChannel inChannel = aFile.getChannel();
|
||||||
|
|
||||||
|
//create buffer with capacity of 48 bytes
|
||||||
|
ByteBuffer buf = ByteBuffer.allocate(48);
|
||||||
|
|
||||||
|
**int bytesRead = inChannel.read(buf**); //read into buffer.
|
||||||
|
while (bytesRead != -1) {
|
||||||
|
|
||||||
|
**buf.flip**(); //make buffer ready for read
|
||||||
|
|
||||||
|
while(buf.hasRemaining()){
|
||||||
|
System.out.print((char) **buf.get**()); // read 1 byte at a time
|
||||||
|
}
|
||||||
|
|
||||||
|
**buf.clear**(); //make buffer ready for writing
|
||||||
|
bytesRead = inChannel.read(buf);
|
||||||
|
}
|
||||||
|
aFile.close();
|
||||||
|
```
|
||||||
|
- properties
|
||||||
|
- capacity
|
||||||
|
- position
|
||||||
|
- limit
|
||||||
|
|
||||||
|
- Steps for buffer to read and write data.
|
||||||
|
- write data into buffer
|
||||||
|
- call buffer.flip()
|
||||||
|
- read data out of the buffer
|
||||||
|
- call buffer.clear() or buffer.compact()
|
||||||
|
- Non-blocking IO
|
||||||
|
- Selectors
|
||||||
|
|
||||||
|
- A selector allows a single thread to handle multiple Channels
|
||||||
|
- [http://tutorials.jenkov.com/java-nio/index.html](http://tutorials.jenkov.com/java-nio/index.html)
|
||||||
|
|
||||||
|
### SSL
|
||||||
|
|
||||||
|
#### Java use TLSv1.2 by default since Java 8
|
||||||
|
|
||||||
|
When you saw some error like this `SSL handshake exception: “Algorithm constraints check failed: MD5withRSA”`, probably you used `MD5` as message digest when generate a CA. You should regenerate a new CA using `sha1`, because the `MD5` has been found to be insecure.
|
||||||
|
|
||||||
|
Some more info <https://stackoverflow.com/questions/21218217/ssl-handshake-exception-algorithm-constraints-check-failed-md5withrsa>
|
||||||
|
|
||||||
|
### Monotonic clock
|
||||||
|
|
||||||
|
`Note`: You can go to the `go` page to check out more background knowledge
|
||||||
|
|
||||||
|
```java
|
||||||
|
long startTime = System.nanoTime();
|
||||||
|
// ... the code being measured ...
|
||||||
|
long estimatedTime = System.nanoTime() - startTime;
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
Some code which uses the wall clock
|
||||||
|
|
||||||
|
```java
|
||||||
|
long start = System.currentTimeMillis();
|
||||||
|
// Do something exceptional
|
||||||
|
long elapsed = System.currentTimeMillis() - start;
|
||||||
|
```
|
||||||
@@ -0,0 +1,251 @@
|
|||||||
|
---
|
||||||
|
title: Javascript
|
||||||
|
created: 2018-02-15
|
||||||
|
updated: 2018-02-15
|
||||||
|
type: summary
|
||||||
|
tags: [tech, reference]
|
||||||
|
external: https://github.com/wahyd4/knowledge/blob/master/categories/javascript.md
|
||||||
|
---
|
||||||
|
|
||||||
|
# ES 6/ES 2015
|
||||||
|
|
||||||
|
- Arrow function
|
||||||
|
- Array function doesn’t create new this, it grabs this from its surrounding instead.
|
||||||
|
|
||||||
|
- Array/Collection methods
|
||||||
|
- map
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
const numbers = [0, 1, 2, 3, 4, 5, 6];
|
||||||
|
const doubledNumbers = numbers.map(n => n * 2);
|
||||||
|
```
|
||||||
|
- filter
|
||||||
|
- const evenNumbers = numbers.filter(n => n % 2 === 0);
|
||||||
|
- reduce
|
||||||
|
```javascript
|
||||||
|
const sum = numbers.reduce(
|
||||||
|
function(acc, n) {
|
||||||
|
return acc + n;
|
||||||
|
},
|
||||||
|
0 // accumulator variable value at first iteration step
|
||||||
|
);
|
||||||
|
```
|
||||||
|
- reduce takes two parameters
|
||||||
|
The first parameter is a function that will be called at each iteration step.The second parameter is the value of the accumulator variable (*acc* here) at the first iteration step (read next point to understand)
|
||||||
|
|
||||||
|
- Class
|
||||||
|
|
||||||
|
- Template String
|
||||||
|
- const name = "Nick";
|
||||||
|
`Hello ${name}, the following expression is equal to four : ${2+2}`;
|
||||||
|
|
||||||
|
- Destructing
|
||||||
|
- Array
|
||||||
|
- const myArray = ["a", "b", "c"];
|
||||||
|
//without const x = myArray[0];
|
||||||
|
const y = myArray[1];
|
||||||
|
const [x, y] = myArray;
|
||||||
|
- Object
|
||||||
|
```javascript
|
||||||
|
const person = {
|
||||||
|
firstName: "Nick",
|
||||||
|
lastName: "Anderson",
|
||||||
|
age: 35,
|
||||||
|
sex: "M"
|
||||||
|
}
|
||||||
|
const { firstName: first, age, city = "Paris" } = person;
|
||||||
|
```
|
||||||
|
- Default + Rest + Spread parameters
|
||||||
|
|
||||||
|
- Const
|
||||||
|
- can't be reassigned; but not immutable
|
||||||
|
|
||||||
|
- Let
|
||||||
|
|
||||||
|
- Modules
|
||||||
|
|
||||||
|
- Map / Set
|
||||||
|
|
||||||
|
- Promise
|
||||||
|
- .then().catch()
|
||||||
|
```javascript
|
||||||
|
function getGithubUser(username) {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
fetch(`https://api.github.com/users/${username}`)
|
||||||
|
.then(response => {
|
||||||
|
const user = response.json();
|
||||||
|
resolve(user);
|
||||||
|
})
|
||||||
|
.catch(err => reject(err));
|
||||||
|
})
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
- Enhanced Object Literals
|
||||||
|
|
||||||
|
- Imports/ Exports
|
||||||
|
- export default xx; import xx from ‘..’
|
||||||
|
- export const xx; import {xx} from ‘..’
|
||||||
|
|
||||||
|
- Async/Await
|
||||||
|
- await can only used in an async function.
|
||||||
|
- async function getGithubUser(username) { // async keyword allows usage of await in the function and means function returns a promise
|
||||||
|
try { // this is how errors are handled with async / await
|
||||||
|
const response = await fetch(`https://api.github.com/users/${username}`); // "synchronously" waiting fetch promise to resolve before going to next line
|
||||||
|
return response.json();
|
||||||
|
} catch (err) {
|
||||||
|
alert(err);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
getGithubUser('mbeaudru').then(user => console.log(user)); // logging user response - cannot use await syntax since this code isn't in async function
|
||||||
|
|
||||||
|
# Node.js
|
||||||
|
|
||||||
|
- Npm
|
||||||
|
|
||||||
|
- Yarn
|
||||||
|
|
||||||
|
- Express
|
||||||
|
|
||||||
|
- Stream
|
||||||
|
|
||||||
|
# This
|
||||||
|
|
||||||
|
- Refers who calls
|
||||||
|
```javascript
|
||||||
|
function myFunc() {
|
||||||
|
...
|
||||||
|
}
|
||||||
|
// After each statement, you find the value of *this* in myFunc
|
||||||
|
myFunc.call("myString", "hello") // "myString" -- first .call parameter value is injected into *this*
|
||||||
|
// In non-strict-mode
|
||||||
|
myFunc("hello") // window -- myFunc() is syntax sugar for myFunc.call(window, "hello")
|
||||||
|
// In strict-mode
|
||||||
|
myFunc("hello") // undefined -- myFunc() is syntax sugar for myFunc.call(undefined, "hello")
|
||||||
|
|
||||||
|
var person = {
|
||||||
|
myFunc: function() { ... }
|
||||||
|
}
|
||||||
|
person.myFunc.call(person, "test") // person Object -- first call parameter is injected into *this*
|
||||||
|
person.myFunc("test") // person Object -- person.myFunc() is syntax sugar for person.myFunc.call(person, "test")
|
||||||
|
var myBoundFunc = person.myFunc.bind("hello") // Creates a new function in which we inject "hello" in *this* value
|
||||||
|
person.myFunc("test") // person Object -- The bind method has no effect on the original method
|
||||||
|
myBoundFunc("test") // "hello" -- myBoundFunc is person.myFunc with "hello" bound to *this*
|
||||||
|
```
|
||||||
|
- [http://yehudakatz.com/2011/08/11/understanding-javascript-function-invocation-and-this/](http://yehudakatz.com/2011/08/11/understanding-javascript-function-invocation-and-this/)
|
||||||
|
|
||||||
|
# Closure
|
||||||
|
|
||||||
|
# Frameworks
|
||||||
|
|
||||||
|
- Ionic
|
||||||
|
|
||||||
|
- Angular
|
||||||
|
|
||||||
|
- Vue.js
|
||||||
|
- component
|
||||||
|
- .sync modifier, A kind of two way binding
|
||||||
|
- :abc.sync=“”; $tis.emit(“update:abc”, newValue) //trigger in child component
|
||||||
|
- computed
|
||||||
|
- computed attributes
|
||||||
|
- computed over watcher
|
||||||
|
- watchers
|
||||||
|
- Monitor data changes
|
||||||
|
- cheat sheet
|
||||||
|
- https://vuejs-tips.github.io/cheatsheet/
|
||||||
|
|
||||||
|
- Ember.js
|
||||||
|
|
||||||
|
- Backbone
|
||||||
|
|
||||||
|
-
|
||||||
|
|
||||||
|
- React.js
|
||||||
|
|
||||||
|
- Flux/ Redux
|
||||||
|
- State
|
||||||
|
- Store
|
||||||
|
- Reducer
|
||||||
|
- Action
|
||||||
|
- Dispatch
|
||||||
|
|
||||||
|
# Use promise to avoid nested callbacks.
|
||||||
|
|
||||||
|
# tips
|
||||||
|
|
||||||
|
- object literal
|
||||||
|
- ```javascript
|
||||||
|
Object.keys(object).map(function(objectKey, index) {
|
||||||
|
var value = object[objectKey];
|
||||||
|
console.log(value);
|
||||||
|
});
|
||||||
|
```javascript
|
||||||
|
|
||||||
|
# Application
|
||||||
|
|
||||||
|
# Search
|
||||||
|
- ElasticSearch
|
||||||
|
- Logstash
|
||||||
|
- Kibana
|
||||||
|
|
||||||
|
# APM
|
||||||
|
- Newrelic
|
||||||
|
- Pinpoint
|
||||||
|
|
||||||
|
# Monitor
|
||||||
|
- Bosun
|
||||||
|
- Prometheus
|
||||||
|
|
||||||
|
# API
|
||||||
|
|
||||||
|
- RPC(remote procedure call)
|
||||||
|
- disadvantages
|
||||||
|
- coupling
|
||||||
|
- clients needs to know the request procedure names
|
||||||
|
- advantages
|
||||||
|
- more freedoms to define any requests.
|
||||||
|
- examples
|
||||||
|
- [https://api.slack.com/methods](https://api.slack.com/methods)
|
||||||
|
|
||||||
|
- Restful /Representational State Transfer
|
||||||
|
- Easy to cache
|
||||||
|
- every url represent a resource
|
||||||
|
- disadvantages
|
||||||
|
- some special method is hard to use restful to name it. like /login, /resetpassword
|
||||||
|
- examples
|
||||||
|
- [https://developer.github.com/v3/](https://developer.github.com/v3/)
|
||||||
|
- methods
|
||||||
|
- GET
|
||||||
|
- POST
|
||||||
|
- PUT
|
||||||
|
- DELETE
|
||||||
|
|
||||||
|
- GraphQL
|
||||||
|
- Can define fields you want
|
||||||
|
|
||||||
|
- gRPC
|
||||||
|
- protocol buffers
|
||||||
|
```javascript
|
||||||
|
// The greeter service definition.
|
||||||
|
service Greeter {
|
||||||
|
// Sends a greeting
|
||||||
|
rpc SayHello (HelloRequest) returns (HelloReply) {}
|
||||||
|
}
|
||||||
|
// The request message containing the user's name.
|
||||||
|
message HelloRequest {
|
||||||
|
string name = 1;
|
||||||
|
}
|
||||||
|
// The response message containing the greetings
|
||||||
|
message HelloReply {
|
||||||
|
string message = 1;
|
||||||
|
}
|
||||||
|
```javascript
|
||||||
|
- A opensource remote procedure call framework based on HTTP2 and protobuf
|
||||||
|
- advantages
|
||||||
|
- baed on HTTP2, better performance
|
||||||
|
- call remote like local method, and support multiple language
|
||||||
|
- protobuf serialization and deserialization is faster than JSON
|
||||||
|
|
||||||
|
# Log and Error
|
||||||
|
|
||||||
|
- Sentry
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
---
|
||||||
|
title: Kotlin
|
||||||
|
created: 2021-05-07
|
||||||
|
updated: 2021-05-07
|
||||||
|
type: summary
|
||||||
|
tags: [tech, reference]
|
||||||
|
external: https://github.com/wahyd4/knowledge/blob/master/categories/kotlin.md
|
||||||
|
---
|
||||||
|
|
||||||
|
# Kotlin
|
||||||
|
|
||||||
|
## Some tips
|
||||||
|
|
||||||
|
### Builder mode in kotlin
|
||||||
|
|
||||||
|
```kotlin
|
||||||
|
class Car(
|
||||||
|
val model: String?,
|
||||||
|
val color: String?,
|
||||||
|
val type: String?) {
|
||||||
|
|
||||||
|
data class Builder(
|
||||||
|
var model: String? = null,
|
||||||
|
var color: String = "pink",
|
||||||
|
var type: String? = null) {
|
||||||
|
|
||||||
|
fun model(model: String) = apply { this.model = model }
|
||||||
|
fun color(color: String) = apply { this.color = color }
|
||||||
|
fun type(type: String) = apply { this.type = type }
|
||||||
|
fun build() = Car(model, color, type)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//use
|
||||||
|
val car = Car.Builder()
|
||||||
|
.model("Ford Focus")
|
||||||
|
.color("Black")
|
||||||
|
.type("Type")
|
||||||
|
.build()
|
||||||
|
```
|
||||||
|
Based on [stackoverflow](https://stackoverflow.com/questions/36140791/how-to-implement-builder-pattern-in-kotlin)
|
||||||
@@ -0,0 +1,71 @@
|
|||||||
|
---
|
||||||
|
title: Microservice
|
||||||
|
created: 2019-12-03
|
||||||
|
updated: 2019-12-03
|
||||||
|
type: summary
|
||||||
|
tags: [tech, reference]
|
||||||
|
external: https://github.com/wahyd4/knowledge/blob/master/categories/microservice.md
|
||||||
|
---
|
||||||
|
|
||||||
|
# Microservice
|
||||||
|
|
||||||
|
- benefits
|
||||||
|
|
||||||
|
- Each application is relatively small
|
||||||
|
- Easy to scale
|
||||||
|
- Improved fault isolation
|
||||||
|
- One service fails won’t influence others
|
||||||
|
- You can use different stack for each service
|
||||||
|
- Each service can be deployed independently
|
||||||
|
- drawbacks
|
||||||
|
|
||||||
|
- Increased memory consumption
|
||||||
|
- Developers must deal with extra complexity of creating a distributed system
|
||||||
|
- Deployment complexity
|
||||||
|
- To deploy different types of services
|
||||||
|
|
||||||
|
## Service Mesh
|
||||||
|
|
||||||
|
The term service mesh is used to describe the network of microservices that make up such applications and the interactions between them. As a service mesh grows in size and complexity, it can become harder to understand and manage. Its requirements can include discovery, load balancing, failure recovery, metrics, and monitoring. A service mesh also often has more complex operational requirements, like A/B testing, canary rollouts, rate limiting, access control, and end-to-end authentication.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
|
### Opensource Projects
|
||||||
|
|
||||||
|
* [Istio](https://istio.io/)
|
||||||
|
* [Consul](https://www.consul.io/)
|
||||||
|
|
||||||
|
## CircuitBreaker Design
|
||||||
|
|
||||||
|
### Why we need CircuitBreaker
|
||||||
|
|
||||||
|
In case we have serviceB down, serviceA should still try to recover from this and try to do one of the followings:
|
||||||
|
- **Custom fallback**: Try to get the same data from some other source. If not possible, use its own cache value.
|
||||||
|
- **Fail fast**: If serviceA knows that serviceB is down, there is no point waiting for the timeout and consuming its own resources. It should return ASAP “knowing” that serviceB is down
|
||||||
|
- **Don’t crash**: As we saw in this case, serviceA should not have crashed.
|
||||||
|
- **Heal automatic**: Periodically check if serviceB is working again.
|
||||||
|
- **Other APIs should work**: All other APIs should continue to work.
|
||||||
|
|
||||||
|
### What is circuit breaker design?
|
||||||
|
The idea behind is simple:
|
||||||
|
- Once serviceA “knows” that serviceB is down, there is no need to make request to serviceB. serviceA should return cached data or timeout error as soon as it can. This is the OPEN state of the circuit
|
||||||
|
- Once serviceA “knows” that serviceB is up, we can CLOSE the circuit so that request can be made to serviceB again.
|
||||||
|
- Periodically make fresh calls to serviceB to see if it is successfully returning the result. This state is HALF-OPEN.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
|
### More links
|
||||||
|
|
||||||
|
- <https://martinfowler.com/bliki/CircuitBreaker.html>
|
||||||
|
- <https://itnext.io/understand-circuitbreaker-design-pattern-with-simple-practical-example-92a752615b42>
|
||||||
|
|
||||||
|
|
||||||
|
### Self-contained System (SCS)
|
||||||
|
|
||||||
|
The Self-contained System (SCS) approach is an architecture that focuses on a separation of the functionality into many independent systems, making the complete logical system a collaboration of many smaller software systems. This avoids the problem of large monoliths that grow constantly and eventually become unmaintainable. Over the past few years, we have seen its benefits in many mid-sized and large-scale projects.
|
||||||
|
|
||||||
|
The idea is to break a large system apart into several smaller self-contained systems, or SCSs, that follow certain rules.
|
||||||
|
|
||||||
|

|
||||||
@@ -0,0 +1,127 @@
|
|||||||
|
---
|
||||||
|
title: Ruby
|
||||||
|
created: 2018-06-14
|
||||||
|
updated: 2018-06-14
|
||||||
|
type: summary
|
||||||
|
tags: [tech, reference]
|
||||||
|
external: https://github.com/wahyd4/knowledge/blob/master/categories/ruby.md
|
||||||
|
---
|
||||||
|
|
||||||
|
# Objects inheritances
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
# Background jobs
|
||||||
|
- Resque
|
||||||
|
- Single threaded process
|
||||||
|
- Delayed Job
|
||||||
|
- Single process
|
||||||
|
- Sidekiq
|
||||||
|
- Redis and multiple threaded process
|
||||||
|
```ruby
|
||||||
|
while(!empty(queue)) {
|
||||||
|
= get(queue); //从任务队列中取一个(涉及加锁等)
|
||||||
|
q->callback(); //执行该任务
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
# Test
|
||||||
|
- Unit Test
|
||||||
|
- Mini Test
|
||||||
|
- RSpec
|
||||||
|
- Browser Test
|
||||||
|
- Capybara
|
||||||
|
- Cucumber
|
||||||
|
- Mock
|
||||||
|
- Mocha
|
||||||
|
|
||||||
|
# Auth
|
||||||
|
- OmniAuth
|
||||||
|
- Devise
|
||||||
|
|
||||||
|
# Web Server
|
||||||
|
- Thin
|
||||||
|
- Unicorn
|
||||||
|
- Puma
|
||||||
|
- Passenger
|
||||||
|
- Pow
|
||||||
|
|
||||||
|
# Language
|
||||||
|
- Syntax
|
||||||
|
- lambda
|
||||||
|
- yield
|
||||||
|
- respond_to
|
||||||
|
- send
|
||||||
|
- <=>
|
||||||
|
- return 1,0, -1
|
||||||
|
- * before array
|
||||||
|
- splat operator: split an array into a list of arguments
|
||||||
|
- array << obj
|
||||||
|
- append obj to new arry
|
||||||
|
- block {} do end
|
||||||
|
- Block is not object
|
||||||
|
- use yield pass block
|
||||||
|
- Proc
|
||||||
|
- Proc is object
|
||||||
|
- greeting = Proc.new { puts "hello, world" } greeting.call
|
||||||
|
- Module
|
||||||
|
- Can't be new
|
||||||
|
- include
|
||||||
|
- can't extend
|
||||||
|
- Class
|
||||||
|
|
||||||
|
# Code analysis
|
||||||
|
- Rubocop
|
||||||
|
|
||||||
|
# GC
|
||||||
|
- Minor GC
|
||||||
|
- Major GC
|
||||||
|
- GC.stat
|
||||||
|
|
||||||
|
# Bundler
|
||||||
|
|
||||||
|
## Use groups in bundler
|
||||||
|
|
||||||
|
```ruby
|
||||||
|
# These gems are in the :default group
|
||||||
|
gem 'nokogiri'
|
||||||
|
gem 'sinatra'
|
||||||
|
|
||||||
|
gem 'wirble', :group => :development
|
||||||
|
|
||||||
|
group :test do
|
||||||
|
gem 'faker'
|
||||||
|
gem 'rspec'
|
||||||
|
end
|
||||||
|
|
||||||
|
group :test, :development do
|
||||||
|
gem 'capybara'
|
||||||
|
gem 'rspec-rails'
|
||||||
|
end
|
||||||
|
|
||||||
|
gem 'cucumber', :group => [:cucumber, :test]
|
||||||
|
```
|
||||||
|
when you install bundles, you can do
|
||||||
|
|
||||||
|
```bash
|
||||||
|
bundle install --without test development
|
||||||
|
```
|
||||||
|
# Web frameworks
|
||||||
|
## Sintra
|
||||||
|
|
||||||
|
## Ruby on Rails
|
||||||
|
|
||||||
|
### How Rails application works
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
- ORM
|
||||||
|
- Active record
|
||||||
|
- Mongoid
|
||||||
|
- Websocket
|
||||||
|
- Assets pipeline
|
||||||
|
- Rails console
|
||||||
|
|
||||||
|
# Gem mirrors
|
||||||
|
- [http://mirrors.aliyun.com/rubygems/](http://mirrors.aliyun.com/rubygems/)
|
||||||
|
- [https://gems.ruby-china.org](https://gems.ruby-china.org)
|
||||||
@@ -0,0 +1,135 @@
|
|||||||
|
---
|
||||||
|
title: Software Design
|
||||||
|
created: 2020-04-08
|
||||||
|
updated: 2020-04-08
|
||||||
|
type: summary
|
||||||
|
tags: [tech, reference]
|
||||||
|
external: https://github.com/wahyd4/knowledge/blob/master/categories/software-design.md
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
## Refactoring
|
||||||
|
|
||||||
|
- when to refactor
|
||||||
|
|
||||||
|
- long method
|
||||||
|
- too many parameters
|
||||||
|
- duplicated code
|
||||||
|
- large class
|
||||||
|
- too many if else or case when
|
||||||
|
- temporary variable
|
||||||
|
- coupling
|
||||||
|
|
||||||
|
## OOP
|
||||||
|
|
||||||
|
Object-oriented programming (or OOP) is a paradigm or pattern of programming whereby the solution to a programming problem is modelled as a collection of collaborating objects. Objects collaborate by sending messages to each other. It is most suitable for managing large, complex problems.
|
||||||
|
|
||||||
|
The four principles of object-oriented programming are
|
||||||
|
- `encapsulation` Object encapsulates data and the functions that operate on that data
|
||||||
|
- `abstraction` You don't need to what happened under the hood, just know how to use the public methods is enough.
|
||||||
|
- `inheritance` Sharing common behaviours
|
||||||
|
- `polymorphism` `Polymorphism means that when an object receives a message, the correct method is called, based on the object’s class. That method may belong to the parent, or it may be one that is customized for this class.`
|
||||||
|
|
||||||
|
- Polymorphism
|
||||||
|
- Code to interface, not an implementation
|
||||||
|
|
||||||
|
- Composition over inheritance
|
||||||
|
|
||||||
|
- objects have high cohesion and low coupling with other objects
|
||||||
|
- Duck typing
|
||||||
|
|
||||||
|
- SOLID
|
||||||
|
|
||||||
|
- Single responsibility
|
||||||
|
- Open/Closed
|
||||||
|
- Liskov substitution
|
||||||
|
- Interface segregation
|
||||||
|
- Dependency inversion
|
||||||
|
|
||||||
|
## Functional programming
|
||||||
|
|
||||||
|
- pure functions
|
||||||
|
|
||||||
|
- giving a same input, always return same output
|
||||||
|
- produce no side effects
|
||||||
|
- reply on no external mutable state
|
||||||
|
- function composition
|
||||||
|
- avoid share state
|
||||||
|
- avoid mutating state
|
||||||
|
- avoid side effects
|
||||||
|
|
||||||
|
|
||||||
|
## Serverless
|
||||||
|
|
||||||
|
- Lambda
|
||||||
|
|
||||||
|
- A **lambda** is just an anonymous function - a function defined with no name
|
||||||
|
|
||||||
|
## Closure
|
||||||
|
|
||||||
|
- a function value that references variables from outside its body
|
||||||
|
- In Javascript, not all anonymous function are lamdba, and vise verse
|
||||||
|
|
||||||
|
## Event Sourcing
|
||||||
|
|
||||||
|
### Kafka
|
||||||
|
|
||||||
|
Apache Kafka is a distributed streaming platform
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
There are 4 core APIs in kafka:
|
||||||
|
|
||||||
|
* Producer API
|
||||||
|
* Consumer API
|
||||||
|
* Streams API
|
||||||
|
* Connector API
|
||||||
|
|
||||||
|
## Command Query Responsibility Segregation (CQRS)
|
||||||
|
|
||||||
|
Every changes you made to the system is a event, events are been persisted and can be replayed to generate the materialized view.
|
||||||
|
|
||||||
|
In his book "Object Oriented Software Construction," Betrand Meyer introduced the term "Command Query Separation" to describe the principle that an object's methods should be either commands or queries. A query returns data and does not alter the state of the object; a command changes the state of an object but does not return any data. The benefit is that you have a better understanding what does, and what does not, change the state in your system.
|
||||||
|
|
||||||
|
**More**:
|
||||||
|
|
||||||
|
- [Reference 2: Introducing the Command Query Responsibility Segregation Pattern](https://msdn.microsoft.com/en-us/library/jj591573.aspx)
|
||||||
|
|
||||||
|
## UML
|
||||||
|
|
||||||
|
- many_to_many
|
||||||
|
- one to many
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
### One UML example
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
|
## Java Design pattern
|
||||||
|
|
||||||
|
- [https://github.com/iluwatar/java-design-patterns](https://github.com/iluwatar/java-design-patterns)
|
||||||
|
|
||||||
|
|
||||||
|
## How to do Data Migration
|
||||||
|
|
||||||
|
1. Add logic to support both new and old data structures
|
||||||
|
|
||||||
|
2. Add Logic should read both old and new data but only write data to new schema/structure
|
||||||
|
|
||||||
|
2. Then migrate the old data schema to new one
|
||||||
|
|
||||||
|
3. Last, delete the logic which handle the old data schema.
|
||||||
|
|
||||||
|
|
||||||
|
## Some tips
|
||||||
|
|
||||||
|
- concurrency vs parallelism
|
||||||
|
|
||||||
|
- parallelism
|
||||||
|
- doing a lot of things at once
|
||||||
|
- about exection
|
||||||
|
- concurrency
|
||||||
|
- dealing with lots of things at once
|
||||||
|
- about structure
|
||||||
@@ -0,0 +1,84 @@
|
|||||||
|
---
|
||||||
|
title: Team Work
|
||||||
|
created: 2018-09-06
|
||||||
|
updated: 2018-09-06
|
||||||
|
type: summary
|
||||||
|
tags: [tech, reference]
|
||||||
|
external: https://github.com/wahyd4/knowledge/blob/master/categories/team-work.md
|
||||||
|
---
|
||||||
|
|
||||||
|
# Agile
|
||||||
|
|
||||||
|
- Retrospective
|
||||||
|
- Iteration meeting
|
||||||
|
- Showcase
|
||||||
|
- Code review
|
||||||
|
- Pair programming
|
||||||
|
- Instant feedback
|
||||||
|
|
||||||
|
## Retrospective
|
||||||
|
|
||||||
|
### Steps
|
||||||
|
* Review actions of last retro
|
||||||
|
* Draw a timeline of events happy between last retro and now (Optional, some people say this can help team to get clear mind about what happened and what are the important things)
|
||||||
|
* Choose the retro format. The most simple and popular one is(good, bad, questions)
|
||||||
|
* Around 5 minutes to write down your idea
|
||||||
|
* Quick go through all the cards and group the cards
|
||||||
|
* Vote cards
|
||||||
|
* Pick the cards which get most votes and talk about them
|
||||||
|
* Write down the action is requires to
|
||||||
|
|
||||||
|
|
||||||
|
## Good practices
|
||||||
|
|
||||||
|
### In the team
|
||||||
|
|
||||||
|
* Regular team one on one feedback session. Every pair have around 5 minutes, 2 minutes to come up with ideas and 3 minutes to talk. Then one person switch to another persion.
|
||||||
|
* Regular team retrospective, each retro should check the previous actions, and have some actions as outputs.
|
||||||
|
* Daily standup
|
||||||
|
* Have some story wall, no matter physical or on the website.
|
||||||
|
* Team health check survey and metrics report. About how do people feel about the team? How to people like to work in team? Any obstacles?
|
||||||
|
* Regular team outing/ team building. The simplest one is the team lunch, so people can know more to each other.
|
||||||
|
* Regular team technology people catch up. Talk about the tech decisions, tech debts and improvments.
|
||||||
|
|
||||||
|
### Among teams/Company
|
||||||
|
|
||||||
|
* Regular whole office stand up, one people stands for each team.
|
||||||
|
* Regular office update, Q&A
|
||||||
|
* Regular office tech people meeting.
|
||||||
|
|
||||||
|
|
||||||
|
# Kanban
|
||||||
|
|
||||||
|
# Tools
|
||||||
|
|
||||||
|
- ThoughtWorks Tech Radar
|
||||||
|
- CI
|
||||||
|
- CD
|
||||||
|
- Gantt chart
|
||||||
|
- monitoring/debuging
|
||||||
|
- NewRelic
|
||||||
|
- Sentry
|
||||||
|
- Google analytics
|
||||||
|
- Prometheus
|
||||||
|
- cadvisor
|
||||||
|
- get metrics of containers
|
||||||
|
- alertmanager
|
||||||
|
- alert
|
||||||
|
- node exporter
|
||||||
|
- exporters for machine metrics
|
||||||
|
- grafana
|
||||||
|
- UI charts analytics
|
||||||
|
- docker-compose
|
||||||
|
- [https://github.com/vegasbrianc/prometheus](https://github.com/vegasbrianc/prometheus)
|
||||||
|
- bosun
|
||||||
|
- components
|
||||||
|
- opentsdb
|
||||||
|
- cadvisor
|
||||||
|
- Cross-functional team
|
||||||
|
- One role can do others works
|
||||||
|
- Dev can do test
|
||||||
|
- QA can write BDD and automation tests
|
||||||
|
- One Delivery team
|
||||||
|
- High spped
|
||||||
|
- Team members can address problems more quickly
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
---
|
||||||
|
title: Testing
|
||||||
|
created: 2018-06-13
|
||||||
|
updated: 2018-06-13
|
||||||
|
type: summary
|
||||||
|
tags: [tech, reference]
|
||||||
|
external: https://github.com/wahyd4/knowledge/blob/master/categories/testing.md
|
||||||
|
---
|
||||||
|
|
||||||
|
# Testing
|
||||||
|
|
||||||
|
## Types of testing methodologies
|
||||||
|
|
||||||
|
- unit test
|
||||||
|
- integration test
|
||||||
|
- contract test
|
||||||
|
- smoke test
|
||||||
|
- functional test
|
||||||
|
- selenium
|
||||||
|
- cucumber
|
||||||
|
|
||||||
|
# Test layers
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
|
## Functional test
|
||||||
|
|
||||||
|
### Selenium
|
||||||
|
|
||||||
|
#### How does selenium works
|
||||||
|
|
||||||
|

|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
---
|
||||||
|
title: Uncategorised
|
||||||
|
created: 2018-06-12
|
||||||
|
updated: 2018-06-12
|
||||||
|
type: summary
|
||||||
|
tags: [tech, reference]
|
||||||
|
external: https://github.com/wahyd4/knowledge/blob/master/categories/uncategorised.md
|
||||||
|
---
|
||||||
|
|
||||||
|
# Uncategorised
|
||||||
|
|
||||||
|
|
||||||
|
## Some interesting questions
|
||||||
|
|
||||||
|
### UUID or UUID4
|
||||||
|
|
||||||
|
* `UUID` use current time and your computer MAC address to generate the id
|
||||||
|
* `UUID4` which is much simpler. Each and every bit of a UUID v4 is generated randomly and with no inherent logic. With the sheer number of possible combinations (2^128), it would be almost impossible to generate a duplicate unless you are generating trillions of IDs every second, for many years.
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
---
|
||||||
|
title: Web Scraping
|
||||||
|
created: 2022-04-07
|
||||||
|
updated: 2022-04-07
|
||||||
|
type: summary
|
||||||
|
tags: [tech, reference]
|
||||||
|
external: https://github.com/wahyd4/knowledge/blob/master/categories/web-scraping.md
|
||||||
|
---
|
||||||
|
|
||||||
|
# Web Scraping
|
||||||
|
|
||||||
|
## A good scraper
|
||||||
|
|
||||||
|
- content downloading, download images, contents and so on.
|
||||||
|
- links retrieve, find new links
|
||||||
|
- URL management, avoid endless loop
|
||||||
|
- content analysis and management, export as csv or chart.
|
||||||
|
|
||||||
|
## good frameworks
|
||||||
|
|
||||||
|
- colly
|
||||||
|
- https://github.com/asciimoo/colly
|
||||||
|
- pyspider
|
||||||
|
- [http://docs.pyspider.org/en/latest/](http://docs.pyspider.org/en/latest/)
|
||||||
|
- scrapy
|
||||||
|
- [https://github.com/scrapy/scrapy](https://github.com/scrapy/scrapy)
|
||||||
|
|
||||||
|
## anti scraper blocking
|
||||||
|
|
||||||
|
|
||||||
|
- Ddon't use default user-agent, instead use real browser user agent
|
||||||
|
- Proper interval, normally means reduce your interval
|
||||||
|
- multiple ips
|
||||||
|
- different headers
|
||||||
|
- dynamic pages -> prentend to be a real man. /phantom.js/selenium/chrome headless
|
||||||
|
- set proper cookie
|
||||||
|
- verification code -> ocr
|
||||||
|
- fetch data from mobile webpage
|
||||||
|
|
||||||
|
## anti scraper
|
||||||
|
|
||||||
|
- block ip
|
||||||
|
- http headers, such as user-agent
|
||||||
|
- cookie
|
||||||
|
- return fake data
|
||||||
|
|
||||||
|
## How does web scraper work
|
||||||
|
|
||||||
|
TODO
|
||||||
@@ -0,0 +1,166 @@
|
|||||||
|
---
|
||||||
|
title: Web
|
||||||
|
created: 2018-06-14
|
||||||
|
updated: 2018-06-14
|
||||||
|
type: summary
|
||||||
|
tags: [tech, reference]
|
||||||
|
external: https://github.com/wahyd4/knowledge/blob/master/categories/web.md
|
||||||
|
---
|
||||||
|
|
||||||
|
# HTTP
|
||||||
|
|
||||||
|
## HTTP Status code
|
||||||
|
|
||||||
|
* `200` OK
|
||||||
|
* `201` created
|
||||||
|
* `204` No content, The server has successfully fulfilled the request and that there is no additional content to send in the response payload body.
|
||||||
|
* `301` Moved Permanently
|
||||||
|
* `400` Bad request, the request body syntactically wrong
|
||||||
|
* `401` Unauthorized, generally means you didn't login or specify the credential
|
||||||
|
* `403` Forbidden, we know who you are, but you just don't have enough rights
|
||||||
|
* `415` Unsupported Media Type,the content type consumer passed in is not valid
|
||||||
|
* `422` Unprocessable Entity, means the request body is syntactically correct but semantically incorrect
|
||||||
|
* `500` Internal error, some unknown or unhandled error happened from the server side
|
||||||
|
* `502` Bad Gateway, The server, while acting as a gateway or proxy, received an invalid response from an inbound server it accessed while attempting to fulfill the request.
|
||||||
|
* `503` Service Unavailable, The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.
|
||||||
|
* `504` Gateway timeout, The server, while acting as a gateway or proxy, did not receive a timely response from an upstream server it needed to access in order to complete the request.
|
||||||
|
|
||||||
|
|
||||||
|
## HTTP 2
|
||||||
|
### HTTP server push
|
||||||
|
|
||||||
|
HTTP/2 Push allows a web server to send resources to a web browser before the browser gets to request them. It is, for the most part, a performance technique that can help some websites load faster.
|
||||||
|
|
||||||
|
HTTP/2 Push is not a mechanism for the server to notify things to the browser. Instead, pushed contents are used by the browser when it may have otherwise produced a request to get the resource anyway. But if the browser does not request the resource, the pushed contents become wasted bandwidth.
|
||||||
|
|
||||||
|
Server push some related resource before the browser sends the request. .e.g. Browser request index.html, and then server response with index.html and also take the initiative to push style.css and index.js to frontend.
|
||||||
|
|
||||||
|
Frames:
|
||||||
|
|
||||||
|
* HEADERS
|
||||||
|
* PUSH_PROMISE
|
||||||
|
* DATA
|
||||||
|
* RST_STREAM
|
||||||
|
|
||||||
|
|
||||||
|
## HTTP server-sent events
|
||||||
|
|
||||||
|
|
||||||
|
### Links
|
||||||
|
* [A Comprehensive Guide To HTTP/2 Server Push](https://www.smashingmagazine.com/2017/04/guide-http2-server-push/)
|
||||||
|
|
||||||
|
|
||||||
|
# CSS3
|
||||||
|
|
||||||
|
- transition
|
||||||
|
- transaction
|
||||||
|
- border-radius
|
||||||
|
- rgba
|
||||||
|
- flex
|
||||||
|
- box-shadow
|
||||||
|
- svg
|
||||||
|
|
||||||
|
# CORS
|
||||||
|
|
||||||
|
- Nginx proxy
|
||||||
|
- Server add headers
|
||||||
|
|
||||||
|
# CDN
|
||||||
|
|
||||||
|
- Reduce request amount
|
||||||
|
- Reduce server network traffic
|
||||||
|
- Speed up load
|
||||||
|
|
||||||
|
# Websocket
|
||||||
|
|
||||||
|
WebSocket is a computer communications protocol, providing full-duplex communication channels over a single TCP connection. The WebSocket protocol was standardized by the IETF as RFC 6455 in 2011, and the WebSocket API in Web IDL is being standardized by the W3C. WebSocket is a different TCP protocol from HTTP.
|
||||||
|
|
||||||
|
## Frameworks and tools
|
||||||
|
|
||||||
|
- Pusher
|
||||||
|
- Socket.IO
|
||||||
|
- Pubnub
|
||||||
|
|
||||||
|
## How Websocket works
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
|
# json-schema
|
||||||
|
|
||||||
|
- Describe data format
|
||||||
|
- Clear, machine and human readable
|
||||||
|
- Complete structure validation
|
||||||
|
|
||||||
|
# Auth Related
|
||||||
|
|
||||||
|
- session
|
||||||
|
- store session_id in cookie, server side has a map in memory
|
||||||
|
- JWT Token
|
||||||
|
- expire
|
||||||
|
- cookie
|
||||||
|
- local storage
|
||||||
|
|
||||||
|
# Browser
|
||||||
|
|
||||||
|
## How browser works?
|
||||||
|
|
||||||
|
How browser render web page
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
The flow diagram when you access a website
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
# CSS
|
||||||
|
|
||||||
|
## tips
|
||||||
|
|
||||||
|
* inline element can’t set width, modify the display to inline-block
|
||||||
|
|
||||||
|
## inline element
|
||||||
|
* i
|
||||||
|
* span
|
||||||
|
* a
|
||||||
|
* image
|
||||||
|
* label
|
||||||
|
* input
|
||||||
|
* button
|
||||||
|
* textarea
|
||||||
|
* br
|
||||||
|
|
||||||
|
## CSS custom properties(variables)
|
||||||
|
|
||||||
|
```css
|
||||||
|
# global variable
|
||||||
|
:root {
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
element {
|
||||||
|
--main-bg-color: brown;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
Then you use it like:
|
||||||
|
|
||||||
|
```css
|
||||||
|
element {
|
||||||
|
background-color: var(--main-bg-color);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Some advanced usage, you can have default value when variable is not set
|
||||||
|
|
||||||
|
```css
|
||||||
|
.two {
|
||||||
|
color: var(--my-var, red); /* Red if --my-var is not defined */
|
||||||
|
}
|
||||||
|
|
||||||
|
.three {
|
||||||
|
background-color: var(--my-var, var(--my-background, pink)); /* pink if my-var and --my-background are not defined */
|
||||||
|
}
|
||||||
|
|
||||||
|
.three {
|
||||||
|
background-color: var(--my-var, --my-background, pink); /* Invalid: "--my-background, pink" */
|
||||||
|
}
|
||||||
|
```
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
# One Knowledge Wiki
|
||||||
|
|
||||||
|
Welcome to the unified knowledge base. This wiki aggregates content from multiple sources to provide a comprehensive personal knowledge management system.
|
||||||
|
|
||||||
|
## Sources
|
||||||
|
|
||||||
|
- **[Links App](./links-app.md)** - 2,337 articles and posts from the Links App
|
||||||
|
- **[GitHub Knowledge](./github-knowledge.md)** - Technical notes from the knowledge repository
|
||||||
|
|
||||||
|
## Quick Access
|
||||||
|
|
||||||
|
### By Category
|
||||||
|
|
||||||
|
| Category | Description |
|
||||||
|
|----------|-------------|
|
||||||
|
| [Tech Index](./tech-index.md) | Technology topics overview |
|
||||||
|
| [Concepts](./concepts/) | Concept pages and explanations |
|
||||||
|
| [Links Posts](./links-posts/) | All 2,337 articles from Links App |
|
||||||
|
| [GitHub Knowledge](./github-knowledge/) | Technical reference notes |
|
||||||
|
|
||||||
|
### GitHub Knowledge Categories
|
||||||
|
|
||||||
|
- [Application](./github-knowledge/application.md)
|
||||||
|
- [Apps](./github-knowledge/apps.md)
|
||||||
|
- [Database](./github-knowledge/database.md)
|
||||||
|
- [DevOps](./github-knowledge/devops.md)
|
||||||
|
- [Fintech](./github-knowledge/fintech.md)
|
||||||
|
- [Go](./github-knowledge/go.md)
|
||||||
|
- [Java](./github-knowledge/java.md)
|
||||||
|
- [JavaScript](./github-knowledge/javascript.md)
|
||||||
|
- [Kotlin](./github-knowledge/kotlin.md)
|
||||||
|
- [Microservice](./github-knowledge/microservice.md)
|
||||||
|
- [Ruby](./github-knowledge/ruby.md)
|
||||||
|
- [Software Design](./github-knowledge/software-design.md)
|
||||||
|
- [Team Work](./github-knowledge/team-work.md)
|
||||||
|
- [Testing](./github-knowledge/testing.md)
|
||||||
|
- [Web](./github-knowledge/web.md)
|
||||||
|
- [Web Scraping](./github-knowledge/web-scraping.md)
|
||||||
|
|
||||||
|
## Statistics
|
||||||
|
|
||||||
|
- **Links App Posts**: 2,337 articles
|
||||||
|
- **GitHub Knowledge Files**: 31 technical notes
|
||||||
|
- **Total Files**: 2,368
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
*Last updated: 2026-04-08*
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
# Links App
|
||||||
|
|
||||||
|
The Links App is a personal bookmark and article management system containing news, articles, and various web content.
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
- **Total Posts**: 2,337
|
||||||
|
- **Format**: Markdown with YAML frontmatter
|
||||||
|
- **Location**: [./links-posts/](./links-posts/)
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
Each post includes:
|
||||||
|
- Title and content
|
||||||
|
- Created and updated dates
|
||||||
|
- Tags from tag_details array
|
||||||
|
- External link back to original source
|
||||||
|
|
||||||
|
## Sample Posts
|
||||||
|
|
||||||
|
The `links-posts/` directory contains all articles. Each file is named as `{id}-{slug}.md`.
|
||||||
|
|
||||||
|
## Browsing
|
||||||
|
|
||||||
|
You can browse all posts in the [links-posts](./links-posts/) directory. Each file links back to its original source at `http://go/ui/posts/{id}/`.
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
---
|
||||||
|
title: 2024-11-05-tech
|
||||||
|
created: 2024-11-05
|
||||||
|
updated: 2024-11-05
|
||||||
|
type: summary
|
||||||
|
tags: [[]]
|
||||||
|
external: http://go/ui/posts/1/
|
||||||
|
---
|
||||||
|
|
||||||
|
## 科技新闻
|
||||||
|
- [美国后支付巨头 Affirm 首次国际扩张,进军英国市场](https://www.cnbc.com/2024/11/03/affirm-expands-buy-now-pay-later-service-to-the-uk.html)
|
||||||
|
Affirm 在英国推出后支付服务,标志着其首次海外扩张。
|
||||||
|
- [美国芯片制造商开始切断对中国的供应链](https://www.wsj.com/articles/u-s-chip-toolmakers-move-to-cut-china-from-supply-chains-6ad44c98?mod=rss_Technology)
|
||||||
|
应用材料和拉姆研究公司在美国政府的压力下,要求供应商遵循新的限制政策。
|
||||||
|
- [大科技公司如何为 AI 的能源需求提供支持](https://www.cnbc.com/2024/11/04/data-centers-how-big-tech-intends-to-power-ais-thirst-for-energy.html)
|
||||||
|
随着数据中心数量的爆炸式增长,大科技公司正在考虑如何满足 AI 的巨量能源需求。
|
||||||
|
- [SK 海力士股价上涨 6.5% 受 Nvidia 首席执行官呼吁提速影响](https://www.cnbc.com/2024/11/04/sk-hynix-shares-rally-after-nvidias-huang-asks-firm-to-speed-up-chip.html)
|
||||||
|
Nvidia CEO 黄仁勋要求 SK 海力士提前六个月交付高带宽内存芯片。
|
||||||
|
- [科技、媒体与电信市场概述](https://www.wsj.com/articles/tech-media-telecom-roundup-market-talk-ff661b1a?mod=rss_Technology)
|
||||||
|
本期市场谈论涵盖 Peloton、纽约时报和 Super Micro Computer 等公司。
|
||||||
|
- [巴里·迪勒称《华盛顿邮报》不支持候选人的时机是个“失误”](https://www.cnbc.com/2024/11/04/barry-diller-calls-timing-of-the-washington-posts-non-endorsement-a-blunder-jeff-bezos-amazon-presidential-election-candidate.html)
|
||||||
|
Expedia 董事长巴里·迪勒批评《华盛顿邮报》未支持任何总统候选人的决定。
|
||||||
|
- [Coinbase 和 a16z 等为 2026 年选举投入超过 7800 万美元支持加密货币 PAC](https://www.cnbc.com/2024/11/04/coinbase-a16z-contribute-78-million-to-pro-crypto-pac-for-2026-election.html)
|
||||||
|
支持加密货币的超级 PAC Fairshake 筹集了 7800 万美元用于 2026 年中期选举。
|
||||||
|
- [AppLovin 股票因 AI 上涨 300%,成为 2024 年最佳科技股](https://www.cnbc.com/2024/11/04/applovin-stock-surge-in-2024-leaves-ad-tech-company-with-lot-to-prove.html)
|
||||||
|
尽管不是 Nvidia,AppLovin 的股票在今年增长了 300%,成为市值超过 50 亿美元的公司中表现最佳的科技股。
|
||||||
|
- [贝索斯和 OpenAI 投资机器人初创公司 Physical Intelligence,估值 24 亿美元](https://www.cnbc.com/2024/11/04/jeff-bezos-and-openai-invest-in-robot-startup-physical-intelligence.html)
|
||||||
|
亚马逊的贝索斯和 OpenAI 对机器人初创企业 Physical Intelligence 投资 4 亿美元,企业估值达到 24 亿美元。
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
---
|
||||||
|
title: 2024-11-07-victoria
|
||||||
|
created: 2024-11-07
|
||||||
|
updated: 2024-11-07
|
||||||
|
type: summary
|
||||||
|
tags: [[]]
|
||||||
|
external: http://go/ui/posts/10/
|
||||||
|
---
|
||||||
|
|
||||||
|
## 墨尔本及澳洲新闻简报
|
||||||
|
|
||||||
|
- **工党承诺制定新法律绕过高院裁决,对获释移民拘留者实施宵禁和监控** [https://www.sbs.com.au/news/article/labor-pledges-new-laws-to-skirt-high-court-ruling-on-released-immigration-detainees/9dsig2po5](https://www.sbs.com.au/news/article/labor-pledges-new-laws-to-skirt-high-court-ruling-on-released-immigration-detainees/9dsig2po5)
|
||||||
|
高院裁定对超过 120 名获释无限期移民实施宵禁和监控措施违宪且 "无法辩护"。工党承诺制定新法律绕过这一裁决。
|
||||||
|
- **墨尔本北部一商店被撞毁并纵火,邻居奋力救出两人** [https://www.theage.com.au/national/victoria/there-s-people-in-the-back-neighbours-rush-to-save-pair-inside-firebombed-shop-20241101-p5kn1t.html?ref=rss&utm_medium=rss&utm_source=rss_national_victoria](https://www.theage.com.au/national/victoria/there-s-people-in-the-back-neighbours-rush-to-save-pair-inside-firebombed-shop-20241101-p5kn1t.html?ref=rss&utm_medium=rss&utm_source=rss_national_victoria)
|
||||||
|
墨尔本北部一商店被人用皮卡车撞毁并纵火,两名住在这家商店上方的居民被邻居救出。
|
||||||
|
- **五岁女孩萨凡纳原本想穿上白裙结婚,却被火化** [https://www.theage.com.au/national/victoria/savannah-5-wanted-to-get-married-in-a-white-dress-instead-she-was-cremated-in-one-20241106-p5koal.html?ref=rss&utm_medium=rss&utm_source=rss_national_victoria](https://www.theage.com.au/national/victoria/savannah-5-wanted-to-get-married-in-a-white-dress-instead-she-was-cremated-in-one-20241106-p5koal.html?ref=rss&utm_medium=rss&utm_source=rss_national_victoria)
|
||||||
|
萨凡纳·肯普和未出生的婴儿雷米·奥尔德里奇在希帕顿东部发生车祸身亡,他们的父母悲痛欲绝,一直保留着他们的房间。
|
||||||
|
- **电动滑板车阻塞人行道引发残疾人歧视案件** [https://www.theage.com.au/national/victoria/e-scooters-blocking-footpaths-at-centre-of-disability-discrimination-case-20241106-p5kod6.html?ref=rss&utm_medium=rss&utm_source=rss_national_victoria](https://www.theage.com.au/national/victoria/e-scooters-blocking-footpaths-at-centre-of-disability-discrimination-case-20241106-p5kod6.html?ref=rss&utm_medium=rss&utm_source=rss_national_victoria)
|
||||||
|
雅拉市议会被要求执行自身规定或提供更好的电动滑板车停车位,因为一名轮椅使用者表示电动滑板车经常阻碍他的出行。
|
||||||
|
- **国家必须就中东问题发声** [https://www.theage.com.au/national/victoria/nations-must-speak-out-on-the-middle-east-20241106-p5kogb.html?ref=rss&utm_medium=rss&utm_source=rss_national_victoria](https://www.theage.com.au/national/victoria/nations-must-speak-out-on-the-middle-east-20241106-p5kogb.html?ref=rss&utm_medium=rss&utm_source=rss_national_victoria)
|
||||||
|
《时代报》读者对外交部长佩妮·王发表的评论文章做出反应。
|
||||||
|
- **抗议者因涉嫌展示恐怖主义符号受到调查:法律如何运作?** [https://www.sbs.com.au/news/article/protestors-are-being-investigated-over-allegedly-displaying-terror-symbols-how-do-the-laws-work/a8bmugwbz](https://www.sbs.com.au/news/article/protestors-are-being-investigated-over-allegedly-displaying-terror-symbols-how-do-the-laws-work/a8bmugwbz)
|
||||||
|
今年 1 月出台了新的联邦法律禁止仇恨和恐怖主义符号,但尚未有人根据这些法律被起诉。
|
||||||
|
- **一年时间,数十亿的利息支出,高利率是否帮助抑制通货膨胀?** [https://www.sbs.com.au/news/article/twelve-months-and-billions-in-interest-later-have-high-rates-helped-tame-inflation/w4839u5d5](https://www.sbs.com.au/news/article/twelve-months-and-billions-in-interest-later-have-high-rates-helped-tame-inflation/w4839u5d5)
|
||||||
|
随着澳大利亚储备银行将现金利率维持在 4.35%,数百万澳大利亚人正在为其浮动抵押贷款支付额外的利息。
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
---
|
||||||
|
title: 2024-12-06-world_news
|
||||||
|
created: 2024-12-06
|
||||||
|
updated: 2024-12-06
|
||||||
|
type: summary
|
||||||
|
tags: [[]]
|
||||||
|
external: http://go/ui/posts/100/
|
||||||
|
---
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
# 世界要闻速览 (World News Bulletin)
|
||||||
|
|
||||||
|
- **美国联合健康CEO遇害,嫌犯或乘巴士从亚特兰大逃至纽约** [UnitedHealthcare CEO Slaying: Suspect May Have Taken Bus from Atlanta to New York](https://www.cnbc.com/2024/12/05/unitedhealthcare-ceo-shooting-nypd-photos-show-face-of-person-sought.html) [Also reported by BBC](https://www.bbc.com/news/articles/c7ve36zg0e5o) 纽约警方公布嫌犯照片,正在全力追捕。美国最大私人健康保险公司联合健康CEO布赖恩·汤普森在纽约遇刺身亡,案件引发广泛关注。
|
||||||
|
|
||||||
|
- **特朗普任命大卫·萨克斯为AI和加密货币“沙皇”** [Trump Names Venture Capitalist David Sacks as AI and Crypto 'Czar'](https://www.cnbc.com/2024/12/05/trump-david-sacks-billionaire-ai-crypto.html) 特朗普过渡团队宣布这一任命,萨克斯曾参与共和党全国代表大会并为特朗普筹款。
|
||||||
|
|
||||||
|
- **墨尔本犹太教堂遭纵火袭击** [Worshippers Flee Arson Attack at Melbourne Synagogue](https://www.bbc.com/news/articles/c5ydr228jyko) 澳大利亚总理称此次纵火事件为反犹太主义的“仇恨行为”。
|
||||||
|
|
||||||
|
- **韩国执政党领袖要求总统尹锡悦立即停职** [Ruling Party Leader Says South Korea President Must Be Suspended](https://www.cnbc.com/2024/12/06/ruling-party-leader-says-south-korea-president-must-be-suspended-as-soon-as-possible.html) 执政党领袖呼吁罢免总统尹锡悦,原因是其试图实施戒严。
|
||||||
|
|
||||||
|
- **加州校园枪击案:嫌犯伪造故事进入学校** [California School Shooting: Suspect Used Fake Story to Gain Access](https://www.bbc.com/news/articles/crl3njg544eo) 两名幼儿园儿童受重伤,目前情况危急但稳定。
|
||||||
|
|
||||||
|
- **SpaceX星链计划遭乌克兰团体反对** [SpaceX Faces Opposition to Starlink Expansion](https://www.cnbc.com/2024/12/05/spacex-faces-opposition-to-starlink-expansion-from-ukrainian-group.html) 一个乌克兰裔美国团体向联邦通信委员会提交请愿书,要求在进一步审查之前暂停星链计划部署近22500颗卫星。
|
||||||
|
|
||||||
|
- **麦格理预测2025年韩国、日本和香港股票将上涨50%以上** [Macquarie's Top Picks for 2025](https://www.cnbc.com/2024/12/06/stocks-from-korea-japan-hong-kong-and-malaysia-among-macquaries-favorites-for-2025.html) 投资银行麦格理预测,这些地区的股票在未来12个月内将有超过50%的涨幅。
|
||||||
|
|
||||||
|
- **特朗普选择前参议员大卫·珀杜担任驻华大使** [Trump Picks Former Senator David Perdue to Be Ambassador to China](https://www.cnbc.com/2024/12/06/trump-picks-former-senator-david-perdue-to-be-ambassador-to-china.html) 美国候任总统唐纳德·特朗普宣布了这一任命。
|
||||||
|
```
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
---
|
||||||
|
title: 2025-07-27-technology
|
||||||
|
created: 2025-07-27
|
||||||
|
updated: 2025-07-27
|
||||||
|
type: summary
|
||||||
|
tags: ["newsletter", "technology"]
|
||||||
|
external: http://go/ui/posts/1000/
|
||||||
|
---
|
||||||
|
|
||||||
|
** 科技新闻摘要**
|
||||||
|
- [旨在解决AI能耗问题的新型芯片](https://www.wsj.com/tech/ai/the-new-chips-designed-to-solve-ais-energy-problem-1ba9cac1?mod=rss_Technology)
|
||||||
|
科技巨头和初创公司正尝试新方法解决AI巨大的能耗问题。
|
||||||
|
- [监管机构称特斯拉计划在加州推出“亲友”汽车服务](https://www.cnbc.com/2025/07/25/tesla-plans-friends-and-family-service-in-california-regulator-says.html)
|
||||||
|
特斯拉正尝试将其自动驾驶出租车服务从奥斯汀扩展到加州等更多市场。
|
||||||
|
- [迪拜巧克力会成为下一个南瓜香料吗?](https://www.wsj.com/tech/dubai-chocolate-trend-history-social-media-13915425?mod=rss_Technology)
|
||||||
|
社交媒体推动了这种巧克力、开心果和卡塔伊夫面团混合口味的流行,大型食品公司正看好其持久力。
|
||||||
|
- [特斯拉投资者对埃隆·马斯克的未来主义承诺越发谨慎](https://www.cnbc.com/2025/07/26/tesla-investors-grow-wary-of-elon-musk-robotaxi-promises.html)
|
||||||
|
继又一份令人失望的财报后,特斯拉股价暴跌,投资者对马斯克关于自动驾驶出租车的承诺失去兴趣。
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
---
|
||||||
|
title: 2025-07-27-chinese-painting
|
||||||
|
created: 2025-07-27
|
||||||
|
updated: 2025-07-27
|
||||||
|
type: summary
|
||||||
|
tags: ["AI", "china", "painting"]
|
||||||
|
external: http://go/ui/posts/1001/
|
||||||
|
---
|
||||||
|
|
||||||
|
我很抱歉,尽管您提供了非常详尽的列表,我仍然努力为您找到了一幅不在其中的、且具有文化意义的古画——《伯牙鼓琴图》。
|
||||||
|
|
||||||
|
这幅画描绘了“高山流水觅知音”的典故,讲述了俞伯牙和钟子期之间深厚的友情。这个故事非常适合向孩子传递中国传统文化中“知音难觅”的寓意。
|
||||||
|
|
||||||
|
希望这份推荐能帮助您的儿子更好地了解中国文化。
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
---
|
||||||
|
title: 2025-07-27-victoria
|
||||||
|
created: 2025-07-27
|
||||||
|
updated: 2025-07-27
|
||||||
|
type: summary
|
||||||
|
tags: ["local_news", "newsletter"]
|
||||||
|
external: http://go/ui/posts/1002/
|
||||||
|
---
|
||||||
|
|
||||||
|
# 大新闻
|
||||||
|
- [租房危机加剧,西澳单亲妈妈被迫住在皮卡车里,家庭因此离散](https://www.sbs.com.au/news/article/the-human-cost-of-western-australias-rental-crisis/5usapgpzm)
|
||||||
|
西澳大利亚州的租房危机日益严重,一位单亲母亲在一年内被驱逐三次后,正准备住进她的皮卡车,这凸显了住房危机对家庭造成的巨大影响。
|
||||||
|
- [四名澳洲居民(包括两名公民)面临香港逮捕令及悬赏](https://www.sbs.com.au/news/article/four-australian-residents-facing-hong-kong-arrest-warrants-bounties/bs973tkq6)
|
||||||
|
继2023年两名澳洲居民被香港当局指控违反国家安全法后,一名澳洲公民和一名居民又被指控参与旨在颠覆中国国家政权的组织,目前他们面临香港的逮捕令及悬赏。
|
||||||
|
- [多州将迎来强降雨和暴风雪天气](https://www.sbs.com.au/news/article/winter-storms-bring-heavy-rain-and-blizzard-conditions/qfcxbp2xd)
|
||||||
|
在猛烈袭击东海岸之后,恶劣天气预计将在周日下午袭击西澳大利亚州,多地将出现强降雨和暴风雪天气。
|
||||||
|
- [赴美签证新规:美国扩大审查范围,或要求披露社交媒体信息](https://www.sbs.com.au/news/article/us-visa-application-social-media-disclosure/tk58gm6wf)
|
||||||
|
美国宣布扩大签证审查范围,将考虑部分申请人的“在线状态”,这引发了关于社交媒体资料、密码和私人照片如何被审查的疑问。
|
||||||
|
- [男童去世前未能等到心脏,简单改革或能帮助更多人](https://www.theage.com.au/national/victoria/teddy-died-before-he-got-a-new-heart-a-simple-reform-may-have-helped-him-20250724-p5mhfg.html?ref=rss&utm_medium=rss&utm_source=rss_national_victoria)
|
||||||
|
一年前,一项议会调查建议全面改革维多利亚州的器官捐献登记方式,然而维州政府至今尚未作出回应,这引发了对器官捐献系统效率的担忧。
|
||||||
|
- [被停职教师涉性行为不当,却转行当网约车司机引发担忧](https://www.theage.com.au/national/victoria/teacher-suspended-over-sexual-misconduct-allegations-working-as-ride-share-driver-20250717-p5mfrk.html?ref=rss&utm_medium=rss&utm_source=rss_national_victoria)
|
||||||
|
一名因涉嫌性行为不当被停职的教师,目前正在从事网约车司机工作。尽管维州的出租车和网约车司机需接受背景调查,但仅有定期载送儿童的司机才可能被要求持有“儿童工作许可”,这引发了对公共安全的担忧。
|
||||||
|
- [莫纳什大学担忧郊区环线(SRL)住房和办公区规划将吞噬高科技中心](https://www.theage.com.au/national/victoria/monash-university-fears-srl-plans-for-housing-office-space-will-swallow-high-tech-hub-20250726-p5mhz3.html?ref=rss&utm_medium=rss&utm_source=rss_national_victoria)
|
||||||
|
关于耗资345亿澳元的郊区环线(SRL)沿线高层住宅和办公空间的规划,已收到超过600份公众意见书。莫纳什大学担忧这些规划可能侵占其高科技中心。
|
||||||
|
- [海滨快餐店争议:社区居民六年抗争失败,愤怒声讨规划部门](https://www.theage.com.au/national/victoria/community-anger-after-losing-six-year-battle-against-beachside-fast-food-outlet-20250724-p5mhjn.html?ref=rss&utm_medium=rss&utm_source=rss_national_victoria)
|
||||||
|
莫宁顿半岛(Mornington Peninsula)的居民表示,在一个距离海滩仅100米的新麦当劳门店规划被仲裁庭批准后,他们感到被忽视和愤怒,认为他们的社区意见未被听取。
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
---
|
||||||
|
title: 2025-07-27-world_news
|
||||||
|
created: 2025-07-27
|
||||||
|
updated: 2025-07-27
|
||||||
|
type: summary
|
||||||
|
tags: ["newsletter", "world_news"]
|
||||||
|
external: http://go/ui/posts/1003/
|
||||||
|
---
|
||||||
|
|
||||||
|
# 全球要闻速览
|
||||||
|
|
||||||
|
- [台湾“亲中派”政客罢免投票中幸存](https://www.bbc.com/news/articles/cn8185e19l4o)
|
||||||
|
极具争议的罢免投票初步结果显示,台湾反对派将保留在议会中的多数席位。
|
||||||
|
- [乌克兰与俄罗斯无人机互袭致五人死亡](https://www.bbc.com/news/articles/cvgv3ppl7m3o)
|
||||||
|
乌克兰第聂伯罗遭袭三人死亡,俄罗斯罗斯托夫地区两人丧生。
|
||||||
|
- [特朗普治下美国政府成活跃投资者](https://www.cnbc.com/2025/07/26/under-trump-us-an-active-investor-at-scale-not-seen-outside-major-crises.html)
|
||||||
|
特朗普政府展现出购买上市公司股份的意愿,其干预程度被指史无前例。
|
||||||
|
- [英国谴责香港悬赏通缉民主活动家](https://www.bbc.com/news/articles/cdx069we39xo)
|
||||||
|
英方称香港的悬赏是“跨国镇压的又一例证”。
|
||||||
|
- [中国发布人工智能行动计划](https://www.cnbc.com/2025/07/26/china-ai-action-plan.html)
|
||||||
|
在全球科技竞赛升温之际,中国发布AI全球行动计划,呼吁国际合作。
|
||||||
|
- [美国保险巨头多数客户数据遭窃](https://www.bbc.com/news/articles/cd6nyng861wo)
|
||||||
|
黑客入侵了一家大型保险公司,窃取了美国大多数客户的个人身份数据。
|
||||||
|
- [特斯拉投资者对马斯克的承诺日益警惕](https://www.cnbc.com/2025/07/26/tesla-investors-grow-wary-of-elon-musk-robotaxi-promises.html)
|
||||||
|
在又一份令人失望的财报后,马斯克对自动驾驶出租车的承诺未能提振投资者信心,特斯拉股价大跌。
|
||||||
|
- [牛市进入“随心所欲”阶段](https://www.cnbc.com/2025/07/26/bull-market-enters-the-anything-goes-phase-should-you-follow.html)
|
||||||
|
市场进入模因股复苏、狂热追逐卖空者、特殊目的收购公司(SPACs)回归以及金融护栏放低的阶段。
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
---
|
||||||
|
title: 2025-07-27-world-painting
|
||||||
|
created: 2025-07-27
|
||||||
|
updated: 2025-07-27
|
||||||
|
type: summary
|
||||||
|
tags: ["AI", "painting", "world"]
|
||||||
|
external: http://go/ui/posts/1004/
|
||||||
|
---
|
||||||
|
|
||||||
|
## 美国进步
|
||||||
|
|
||||||
|
《美国进步》是约翰·加斯特于1872年创作的一幅具有象征意义的画作,约翰·加斯特是一位出生于普鲁士的画家。这幅画作以寓言的形式展现了19世纪美国向西部扩张的历史进程,即“昭示命运”(Manifest Destiny)。画中,一个被称为“哥伦比亚”的女性形象,手持一本书(象征知识和教育)和电报线(象征技术进步),带领着拓荒者、农民和火车向西部前进。同时,原住民和野牛等代表原始自然的元素则向西退去。这幅画不仅展现了美国历史上的重要阶段,也引发了对殖民主义、进步与自然之间关系的思考,非常适合帮助孩子理解历史事件、象征主义以及艺术在记录和诠释历史方面的作用。
|
||||||
|
|
||||||
|
名画URL : <https://app.fta.art/zh/artwork/a5e4f3a72ab46e25d14a674dffa13fc5e72a1d32>
|
||||||
|
搜索名画: <https://go.junv.cc/gi/美国进步>
|
||||||
|
|
||||||
|
------
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
---
|
||||||
|
title: 2025-07-28-technology
|
||||||
|
created: 2025-07-28
|
||||||
|
updated: 2025-07-28
|
||||||
|
type: summary
|
||||||
|
tags: ["newsletter", "technology"]
|
||||||
|
external: http://go/ui/posts/1005/
|
||||||
|
---
|
||||||
|
|
||||||
|
**科技新闻**
|
||||||
|
- [密码管理器:不仅是登录凭证,更是所有秘密的守护者](https://www.wsj.com/tech/personal-tech/why-you-should-use-a-password-manager-for-all-your-secrets-not-just-logins-e4c46a8b?mod=rss_Technology)
|
||||||
|
整合个人数据与密码,提高便利性与安全性。
|
||||||
|
- [观点:Sarepta事件与药物创新](https://www.wsj.com/opinion/sarepta-elevidys-gene-therapy-duchenne-fda-marty-makary-vinay-prasad-4637cce9?mod=rss_Technology)
|
||||||
|
特朗普时代的FDA试图扼杀一种已帮助绝症患儿的疗法。
|
||||||
|
- [观点:FDA官员Vinay Prasad的争议立场](https://www.wsj.com/opinion/vinay-prasad-is-a-bernie-sanders-acolyte-in-maha-drag-healthcare-bfc3be57?mod=rss_Technology)
|
||||||
|
一位FDA高级官员质疑患者自主医疗决策的能力。
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
---
|
||||||
|
title: 无痛胃肠镜全麻安全吗?深度解析“醒不过来”的极低风险与应对策略
|
||||||
|
created: 2025-07-28
|
||||||
|
updated: 2025-07-28
|
||||||
|
type: summary
|
||||||
|
tags: ["anesthesia", "gastroscopy", "notes", "safety", "telegram"]
|
||||||
|
external: http://go/ui/posts/1006/
|
||||||
|
---
|
||||||
|
|
||||||
|
你这个问题非常重要,也关乎很多人对无痛胃肠镜(尤其是全麻)的担忧。我们来实事求是地分析一下。
|
||||||
|
|
||||||
|
⸻
|
||||||
|
|
||||||
|
✅ 结论先说:
|
||||||
|
|
||||||
|
做无痛胃肠镜导致“醒不过来”的风险极低,但不是百分之零。这类意外确实在极罕见的情况下可能发生,通常和以下几个因素有关:
|
||||||
|
|
||||||
|
⸻
|
||||||
|
|
||||||
|
🧠 风险来源主要有:
|
||||||
|
1. 对麻醉药物严重过敏(如丙泊酚等)
|
||||||
|
• 极少数人会有麻醉诱发的过敏性休克,这可能危及生命。
|
||||||
|
2. 本身心肺功能很差
|
||||||
|
• 比如患有严重的心衰、哮喘、阻塞性肺病、重度高血压、心律不齐等疾病,对麻醉的耐受性差。
|
||||||
|
3. 麻醉剂量或监控不当(极罕见)
|
||||||
|
• 比如剂量过大或麻醉过程中没有持续心率、呼吸等监控(正规医院基本不会出现)。
|
||||||
|
4. 术前未如实申报病史或药物过敏史
|
||||||
|
• 比如曾经手术麻醉有问题但没有告诉医生,可能造成意外。
|
||||||
|
|
||||||
|
⸻
|
||||||
|
|
||||||
|
📉 具体概率有多高?
|
||||||
|
|
||||||
|
根据世界麻醉学文献的统计(如ASA、英国NHS或中国部分大型三甲医院):
|
||||||
|
• 胃肠镜中使用短效麻醉药如丙泊酚造成严重并发症的发生率 < 0.01%
|
||||||
|
• 导致死亡的概率远远低于剖腹产、全麻手术等,约在百万分之一到千万分之一之间
|
||||||
|
|
||||||
|
换句话说,你坐车去医院的路上发生意外的概率,比在医院做这个麻醉出事还高很多倍。
|
||||||
|
|
||||||
|
⸻
|
||||||
|
|
||||||
|
🏥 怎么降低风险?
|
||||||
|
1. 选择正规医院(尤其是三甲医院)
|
||||||
|
2. 术前如实告诉医生所有病史、过敏、用药情况
|
||||||
|
3. 术中有专业麻醉医生全程监控
|
||||||
|
4. 术后在麻醉恢复室观察清醒后再回病房或离院
|
||||||
|
|
||||||
|
⸻
|
||||||
|
|
||||||
|
👨⚕️医生常说的话:
|
||||||
|
|
||||||
|
“你只要不是心脏严重有问题,平时走路不喘不上气、没严重过敏史,这种麻醉我们每天做几十例,真的非常安全。”
|
||||||
|
|
||||||
|
⸻
|
||||||
|
|
||||||
|
🧘♀️最后建议:
|
||||||
|
• 如果你本身身体健康,做的是普通胃肠镜,选择了正规医院,可以非常放心地选择无痛。
|
||||||
|
• 但如果你有严重基础疾病,建议术前跟麻醉科医生面谈,做个术前评估。
|
||||||
|
|
||||||
|
⸻
|
||||||
|
|
||||||
|
如果你愿意告诉我你或者家人是否有一些基础病,我可以帮你更具体地评估是否适合无痛胃肠镜。
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
---
|
||||||
|
title: 2025-07-28-chinese-painting
|
||||||
|
created: 2025-07-28
|
||||||
|
updated: 2025-07-28
|
||||||
|
type: summary
|
||||||
|
tags: ["AI", "china", "painting"]
|
||||||
|
external: http://go/ui/posts/1007/
|
||||||
|
---
|
||||||
|
|
||||||
|
## 观荷图
|
||||||
|
《观荷图》是中国传统绘画中常见的题材,描绘了人们在荷花池边观赏荷花的情景。荷花在中国文化中象征着高洁、清雅、纯洁和君子品格,因为它“出淤泥而不染,濯清涟而不妖”。通过这幅画,您的孩子可以感受到中国传统文人雅士的生活情趣,并学习到荷花所蕴含的美好寓意,了解中国人对自然和美好品德的追求。
|
||||||
|
|
||||||
|
古画URL : <https://www.jiguzuo.com/guohua/zhou-wen-ju-he-ting-yi-diao-shi-nv-tu-zhou.html>
|
||||||
|
搜索古画: <https://go.junv.cc/gi/观荷图>
|
||||||
|
|
||||||
|
------
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
---
|
||||||
|
title: 2025-07-28-victoria
|
||||||
|
created: 2025-07-28
|
||||||
|
updated: 2025-07-28
|
||||||
|
type: summary
|
||||||
|
tags: ["local_news", "newsletter"]
|
||||||
|
external: http://go/ui/posts/1008/
|
||||||
|
---
|
||||||
|
|
||||||
|
# 新闻快讯
|
||||||
|
- [新任警察总长对示威许可和有组织犯罪采取强硬立场](https://www.theage.com.au/national/victoria/new-police-chief-reveals-firm-stance-on-protest-permits-issues-warning-to-organised-crime-20250727-p5mi3l.html?ref=rss&utm_medium=rss&utm_source=rss_national_victoria)
|
||||||
|
新任维州警察总长迈克·布什首次就抗议示威许可问题表明强硬立场,并警告有组织犯罪团伙将面临严打。
|
||||||
|
- [艾伯特公园F1赛道禁入期或延长两倍](https://www.theage.com.au/national/victoria/public-lockout-at-albert-park-gp-precinct-set-to-triple-in-length-20250728-p5mi8h.html?ref=rss&utm_medium=rss&utm_source=rss_national_victoria)
|
||||||
|
根据维州政府提出的法律修改,一级方程式大奖赛艾伯特公园赛道区域的公共禁入时间将从7天延长至3周。
|
||||||
|
- [谷歌威胁就儿童社媒禁令起诉政府,若YouTube被纳入](https://www.sbs.com.au/news/article/google-threatens-to-sue-if-youtube-is-included-in-australias-kids-social-media-ban/axud666av)
|
||||||
|
如果YouTube被纳入澳大利亚的儿童社交媒体禁令范围,谷歌威胁将提起诉讼。总理阿尔巴尼斯对此表示不惧挑战。
|
||||||
|
- [联邦政府推进处方药25澳元封顶承诺](https://www.sbs.com.au/news/article/albanese-government-moves-ahead-with-election-pledge-to-cap-prescription-medicines-to-25/22jx9d4u9)
|
||||||
|
联邦政府将推进立法,将处方药价格上限设定为25澳元,这将是二十多年来的最低价。
|
||||||
|
- [送餐骑手在墨尔本人行道横行,商家自行采取措施](https://www.theage.com.au/national/victoria/reckless-food-delivery-riders-making-footpaths-lawless-in-busy-shopping-strips-20250722-p5mgvj.html?ref=rss&utm_medium=rss&utm_source=rss_national_victoria)
|
||||||
|
墨尔本商家反映,送餐电动车骑手在繁忙购物区人行道上横冲直撞,导致行人与骑手之间碰撞频发。
|
||||||
|
- [维州新郊区规划成本飙升,审批速度大幅下降](https://www.theage.com.au/national/victoria/cost-of-planning-new-suburbs-skyrockets-as-approvals-collapse-20250724-p5mhff.html?ref=rss&utm_medium=rss&utm_source=rss_national_victoria)
|
||||||
|
最新分析显示,维州规划部门新城区审批速度大幅放缓,导致新郊区规划成本飙升。
|
||||||
|
- [澳人远赴海外寻求癌症临床试验](https://www.sbs.com.au/news/insight/article/hell-bent-on-trying-to-give-him-time-the-australians-going-overseas-for-cancer-trials/pffw6ctil)
|
||||||
|
面对国内尚无法提供的潜在救命疗法,一些澳大利亚癌症患者选择前往海外(如中国和新加坡)参与临床试验。
|
||||||
|
- [学生副业成大生意:赚取可观收入](https://www.theage.com.au/national/victoria/making-the-cut-why-students-side-hustles-are-big-business-20250619-p5m8s7.html?ref=rss&utm_medium=rss&utm_source=rss_national_victoria)
|
||||||
|
学生们利用课余时间经营副业正成为一项大生意,一名学生的车库业务每年可带来约3000澳元的收入。
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
---
|
||||||
|
title: 纽约亲子游深度指南:四大酒店权威评估与四日经典家庭行程全攻略
|
||||||
|
created: 2025-07-28
|
||||||
|
updated: 2025-07-28
|
||||||
|
type: summary
|
||||||
|
tags: ["hotel", "itinerary", "notes", "telegram", "travel"]
|
||||||
|
external: http://go/ui/posts/1009/
|
||||||
|
---
|
||||||
|
|
||||||
|
您好!很高兴为您规划纽约家庭之旅。
|
||||||
|
|
||||||
|
首先,我们来分析一下您提到的四家酒店,以便您根据 **历史顾客评价**、**新旧程度** 和 **公共交通便利程度** 进行选择。
|
||||||
|
|
||||||
|
### **酒店选择分析**
|
||||||
|
|
||||||
|
| 酒店名称 | 历史顾客评价 | 新旧程度 | 公共交通便利程度 |
|
||||||
|
| :--- | :--- | :--- | :--- |
|
||||||
|
| **Millennium Hotel Broadway Times Square** | 综合评分3.6/5。好评集中在**绝佳的地理位置**,步行可达时代广场的众多景点。负面评价则提到**设施略显陈旧**,房间需要一些改进。 | 部分评论提到酒店“显示出它的年龄”,表明可能不是最新装修的。 | 位于时代广场中心,周围有多个地铁站,交通极为便利。 |
|
||||||
|
| **AC Hotel by Marriott New York Times Square** | 综合评分4.4/5。大部分评价都非常好,赞扬其**地理位置、清洁度、客户服务和性价比**。酒店的屋顶酒吧和西班牙餐厅也备受好评。 | 酒店设计现代,玻璃幕墙外观,房间干净。 | 地理位置优越,靠近中央车站和多个地铁站,公共交通非常方便。 |
|
||||||
|
| **DoubleTree by Hilton New York Downtown** | 综合评分3.6/5。好评主要围绕其**便利的地理位置**(靠近地铁站和巴克莱中心)和**出色的员工服务**。 | 酒店风格现代,房间温馨。 | 靠近一个地铁站,对于游览曼哈顿下城及其他区域非常方便。 |
|
||||||
|
| **M Social Hotel Times Square New York** | 综合评分4.1/5。顾客普遍称赞其**优越的地理位置、宽敞的房间、舒适的大床和友好的员工**。部分房间还能欣赏到时代广场的景色。 | 酒店设计时尚,房间现代。 | 位于时代广场区域,公共交通便利性高。 |
|
||||||
|
|
||||||
|
**酒店选择建议:**
|
||||||
|
|
||||||
|
* 如果您最看重**酒店的新旧程度和整体品质**,并且希望获得较高的住客评价,**纽约时代广场万豪AC酒店 (AC Hotel by Marriott New York Times Square)** 是最佳选择。它的评分最高,并且以其现代化的设施和优质服务受到推荐。
|
||||||
|
* 如果您希望获得**最高的性价比和时代广场的景观**,**M Social Hotel Times Square New York** 是一个非常不错的选择,评分也很高。
|
||||||
|
* 如果您更侧重于游览**曼哈顿下城**的景点(如自由女神像、华尔街、9/11纪念馆),**纽约市金融区希尔顿逸林酒店 (DoubleTree by Hilton New York Downtown)** 的地理位置会更有优势。
|
||||||
|
* **Millennium Hotel Broadway Times Square** 的最大优势是其中心位置,但设施可能相对老旧。
|
||||||
|
|
||||||
|
### **纽约4日家庭游行程推荐 (9月20日 - 9月24日)**
|
||||||
|
|
||||||
|
考虑到您是两大一小的家庭出游,这个行程将兼顾必看景点和适合孩子的活动。
|
||||||
|
|
||||||
|
**第一天:抵达与时代广场初体验 (9月20日,周五)**
|
||||||
|
|
||||||
|
* **中午:** 抵达纽约,前往酒店办理入住。
|
||||||
|
* **下午:** 在酒店稍作休息后,可以带孩子去逛逛**时代广场 (Times Square)**,感受这里的繁华与活力。可以逛逛M&M's World、迪士尼商店等,这些都是孩子们会喜欢的地方。
|
||||||
|
* **晚上:** 在时代广场附近享用晚餐,然后可以考虑观看一场适合家庭的**百老汇音乐剧**,如《狮子王》(The Lion King) 或《阿拉丁》(Aladdin)。建议提前预订门票。
|
||||||
|
|
||||||
|
**第二天:中城经典与自然风光 (9月21日,周六)**
|
||||||
|
|
||||||
|
* **上午:** 前往**帝国大厦 (Empire State Building)** 或 **峭石之巅观景台 (Top of the Rock)**,从高空俯瞰纽约全景。峭石之巅的优点是可以看到帝国大厦本身,是拍照的绝佳位置。
|
||||||
|
* **中午:** 在洛克菲勒中心附近午餐。
|
||||||
|
* **下午:** 漫步于**中央公园 (Central Park)**。可以租一辆自行车,或者带孩子去中央公园动物园 (Central Park Zoo) 和旋转木马。公园里有大片的草地和多个游乐场,是孩子奔跑玩耍的好地方。
|
||||||
|
* **傍晚:** 参观**美国自然历史博物馆 (American Museum of Natural History)**,这里的恐龙骨架和海洋生物展馆会让孩子大开眼界 (电影《博物馆奇妙夜》的取景地)。
|
||||||
|
|
||||||
|
**第三天:历史、地标与壮丽桥景 (9月22日,周日)**
|
||||||
|
|
||||||
|
* **上午:** 乘坐渡轮前往**自由女神像 (Statue of Liberty)** 和 **埃利斯岛 (Ellis Island)**。这是纽约的象征,也是了解美国移民历史的好机会。建议尽早出发以避开人群。
|
||||||
|
* **中午:** 返回曼哈顿下城,在金融区午餐。
|
||||||
|
* **下午:** 参观 **9/11国家纪念博物馆 (9/11 Memorial & Museum)**,并瞻仰归零地 (Ground Zero) 的纪念水池。之后可以去看看华尔街的铜牛。
|
||||||
|
* **傍晚:** 步行走上**布鲁克林大桥 (Brooklyn Bridge)**,从桥上欣赏曼哈顿天际线的壮丽景色,尤其是在日落时分,景色绝美。
|
||||||
|
|
||||||
|
**第四天:艺术、购物与告别 (9月23日,周一)**
|
||||||
|
|
||||||
|
* **上午:** 根据孩子的兴趣,可以选择参观**大都会艺术博物馆 (The Metropolitan Museum of Art)** 或 **现代艺术博物馆 (MoMA)**。如果孩子对航天和军事感兴趣,**无畏号海洋航空航天博物馆 (Intrepid Sea, Air & Space Museum)** 是一个极佳的选择,那里有一艘真正的航空母舰。
|
||||||
|
* **中午:** 在第五大道附近午餐,并可以进行一些最后的购物。
|
||||||
|
* **下午:** 根据您的航班时间,返回酒店取行李,然后前往机场,结束愉快的纽约之旅。
|
||||||
|
|
||||||
|
**给带孩子家庭的小贴士:**
|
||||||
|
|
||||||
|
* **交通:** 纽约的地铁系统非常发达,购买一张MetroCard会让您的出行非常方便。但请注意,不是所有的地铁站都有电梯,如果您带着婴儿车,可能需要提前规划路线。
|
||||||
|
* **饮食:** 纽约有来自世界各地的美食。除了餐厅,街边的热狗、Pretzel (椒盐卷饼) 等小吃也值得尝试。
|
||||||
|
* **休息:** 带着孩子旅行会比较辛苦,行程安排上要松紧适度,保证孩子有足够的休息时间。
|
||||||
|
|
||||||
|
希望这份详细的计划能帮助您和您的家人在纽约度过一个难忘的假期!祝您旅途愉快!
|
||||||
|
http://googleusercontent.com/map_content/4
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
---
|
||||||
|
title: 2024-12-07-technology
|
||||||
|
created: 2024-12-07
|
||||||
|
updated: 2024-12-07
|
||||||
|
type: summary
|
||||||
|
tags: [[]]
|
||||||
|
external: http://go/ui/posts/101/
|
||||||
|
---
|
||||||
|
|
||||||
|
**科技新闻速递**
|
||||||
|
|
||||||
|
- [TikTok被美国上诉法院禁止,国家安全成关键](https://www.wsj.com/articles/tik-tok-congress-ban-court-ruling-1f0d6837?mod=rss_Technology)
|
||||||
|
三法官小组裁定国会有权因国家安全concern关闭这款中国背景的应用程序。
|
||||||
|
|
||||||
|
- [比特币首次突破10万美元大关](https://www.cnbc.com/2024/12/05/bitcoin-tops-100000-as-monster-2024-rally-reaches-new-heights.html)
|
||||||
|
比特币价格比预期更快达到里程碑,投资者推动其迅速突破10万美元。
|
||||||
|
|
||||||
|
- [特朗普计划任命大卫·萨克斯为AI和加密货币"沙皇"](https://www.cnbc.com/2024/12/05/trump-david-sacks-billionaire-ai-crypto.html)
|
||||||
|
这一选择显示科技领袖在未来政府中的影响力日益增长。
|
||||||
|
|
||||||
|
- [Nvidia合作伙伴Ooredoo寻求数据中心收购](https://www.wsj.com/articles/nvidia-partner-ooredoo-eyes-data-center-acquisitions-amid-ai-push-ceo-says-interview-a2956cf0?mod=rss_Technology)
|
||||||
|
卡塔尔电信集团无法快速建设数据中心,转而寻求收购以满足最新AI芯片需求。
|
||||||
|
|
||||||
|
- [Uber在阿布扎比推出自动驾驶出租车服务](https://www.cnbc.com/2024/12/06/uber-offers-robotaxi-rides-in-abu-dhabi-partnership-with-weride.html)
|
||||||
|
自动驾驶出租车将在萨迪亚特岛和亚斯岛间运营,并连接扎耶德国际机场。
|
||||||
|
|
||||||
|
- [SpaceX Starlink卫星扩展遭乌克兰团体反对](https://www.cnbc.com/2024/12/05/spacex-faces-opposition-to-starlink-expansion-from-ukrainian-group.html)
|
||||||
|
一个乌克兰-美国组织要求联邦通信委员会暂停近22,500颗卫星轨道计划。
|
||||||
|
|
||||||
|
- [热能电池可能取代锂离子电池](https://www.cnbc.com/2024/12/06/why-thermal-batteries-could-replace-lithium-ion-batteries-.html)
|
||||||
|
热能电池以热能存储可再生能源,为钢铁和水泥等行业提供减少碳排放的成本效益方案。
|
||||||
|
|
||||||
|
- [亚马逊推出AWS购买按钮,简化软件销售](https://www.cnbc.com/2024/12/04/amazon-will-sell-software-with-buy-with-aws-button-for-partner-sites.html)
|
||||||
|
亚马逊网络服务希望通过简化第三方软件销售流程来提高云服务收入。
|
||||||
@@ -0,0 +1,103 @@
|
|||||||
|
---
|
||||||
|
title: 精心规划纽约市9月20日至24日四天三晚亲子游:必看景点推荐与优选酒店比较分析
|
||||||
|
created: 2025-07-28
|
||||||
|
updated: 2025-07-28
|
||||||
|
type: summary
|
||||||
|
tags: ["hotels", "notes", "nyc", "telegram", "travel"]
|
||||||
|
external: http://go/ui/posts/1010/
|
||||||
|
---
|
||||||
|
|
||||||
|
好的,深呼吸,仔细规划一下你们 9 月 20 日中午至 24 日中午在纽约的行程!
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🎯 必看景点 & 建议路线
|
||||||
|
|
||||||
|
### 📍 第一天(9 月 20 日 下午至夜晚)
|
||||||
|
|
||||||
|
* **时代广场 Times Square**:直接入住附近即可步行抵达,夜晚霓虹灯璀璨。
|
||||||
|
* **百老汇 Broadway**:可看一场适合小朋友的音乐剧(建议提前订票,例如《狮子王》或《阿拉丁》)。
|
||||||
|
* **洛克菲勒中心 Rockefeller Center & Top of the Rock 观景台**,夜景非常美。适合安排在晚餐后。
|
||||||
|
|
||||||
|
### 第二天(9 月 21 日)
|
||||||
|
|
||||||
|
* **中央公园 Central Park**:早上散步或骑自行车,适合全家休闲。
|
||||||
|
* **大都会艺术博物馆 Met Museum** 或 **自然历史博物馆 American Museum of Natural History**,选择适合小孩的展览。
|
||||||
|
* 下午可去 **第五大道 Fifth Avenue** 逛街和拍照。
|
||||||
|
* 晚上可前往 **帝国大厦 Empire State Building** 或 **布鲁克林大桥 Brooklyn Bridge(傍晚看日落)**。
|
||||||
|
|
||||||
|
### 第三天(9 月 22 日)
|
||||||
|
|
||||||
|
* **自由女神像 Statue of Liberty + 埃利斯岛 Ellis Island**,建议提前买船票含登岛。
|
||||||
|
* 下午探索 **华尔街 Wall Street**、**9/11 国家纪念博物馆 & One World Observatory**。
|
||||||
|
* 傍晚可在 **切尔西 High Line 公园** 散步,感受城市绿色空间。
|
||||||
|
|
||||||
|
### 第四天(9 月 23 日)
|
||||||
|
|
||||||
|
* 上午可去 **布鲁克林区 DUMBO** 拍照和散步,跨到 **布鲁克林大桥公园**。
|
||||||
|
* 下午返程回 Midtown,可造访 **现代艺术博物馆 MoMA** 或自由活动。
|
||||||
|
* 晚餐后再一次感受 **时代广场** 夜景或百老汇别的演出。
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🏨 酒店比较(基于评价/新旧程度/交通便利性)
|
||||||
|
|
||||||
|
| 酒店 | 顾客评价 | 建筑新旧 | 公共交通 / 位置 |
|
||||||
|
| ---------------------------------------------- | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| **Millennium Hotel Broadway Times Square** | Tripadvisor 评分约 **3.0/5**,排名 #330 左右,评价褒贬不一,有评论反映“房间小”“略显旧”([timessquarenyc.org][1], [Tripadvisor][2]) | 建于 1999 年,已多年运营,有评论提“看起来有些老”([geographicguide.com][3], [Tripadvisor][4]) | 位于第 44 街,靠近时代广场和戏剧区,交通极便,步行至多条地铁站,位置极佳([Travel Buddies][5], [Mapcarta][6]) |
|
||||||
|
| **AC Hotel by Marriott New York Times Square** | Tripadvisor 评分 **4.4/5** 排名约 #83,全城评价偏好([Tripadvisor][7], [Tripadvisor][8]) | 全新酒店(2018 年开业)建筑现代,设施较新([The Points Guy][9], [Trip.com][10]) | 位于第 40 街与第八大道交叉口,离港务局交通枢纽 Port Authority Bus Terminal 仅约 1 街,地铁公交极方便,步行至时代广场约 5 分钟([The Points Guy][9], [Trip.com][10], [Rome2Rio][11]) |
|
||||||
|
| **DoubleTree by Hilton New York Downtown** | Tripadvisor 评分约 **3.5/5**,排名在 390 多名,评价中规中矩([Tripadvisor][12], [Tripadvisor][13]) | 建龄较老,但设施常更新维护,典型金融区酒店([Tripadvisor][12], [hilton.com][14]) | 位于金融区 8 Stone Street,离地铁站 Whitehall St–South Ferry 步行约 1 分钟,非常方便去自由女神、9/11,前往 Midtown 需一段地铁旅程([Tripadvisor][12], [Tripadvisor][13]) |
|
||||||
|
| **M Social Hotel Times Square New York** | Tripadvisor 评分 **4.2/5** 排名约 #175,整体评价良好([Tripadvisor][15], [Tripadvisor][16], [Travel Buddies][17]) | 品牌较新,于 **2021 年接手改装**原 Novotel,整体时尚现代([Business Traveller][18], [LODGING Magazine][19], [Travel Buddies][17]) | 位于第 52 街与第七大道交叉,步行至时代广场约 5‑6 分钟,附近地铁站 50 St,交通便利,邻近 Radio City Music Hall([Travel Buddies][17], [Tripadvisor][15]) |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## ✅ 综合推荐
|
||||||
|
|
||||||
|
* **AC Hotel by Marriott Times Square**
|
||||||
|
✨ **评价最高(4.4)**、**2018 年开业新**、**交通极便利**(Port Authority 地铁枢纽)
|
||||||
|
非常适合两位大人外加一个孩子,地理位置优越,设施现代。
|
||||||
|
|
||||||
|
* **M Social Hotel Times Square**
|
||||||
|
🆕 **2021 年品牌接管**,现代设计和活力感强,**评价良好(4.2)**。位于 52 街稍远一些但仍在时代广场范围内,交通也便捷。适合喜欢潮流风格的家庭。
|
||||||
|
|
||||||
|
* **Millennium Broadway**
|
||||||
|
📍 超近时代广场,但 **评价较低(约 3.0)**,**房间紧凑、旧感明显**,不太适合一家三口长住。
|
||||||
|
|
||||||
|
* **DoubleTree Downtown**
|
||||||
|
适合你们若更偏好 **金融区宁静环境**、靠近自由女神和 9/11 纪念区,但前往 Midtown 多次需要乘地铁,小朋友出行略累。
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 🎯 综合考虑,**最推荐“AC Hotel by Marriott New York Times Square”**。
|
||||||
|
|
||||||
|
如果你们偏好更有设计感、稍微年轻活力一点,也可以考虑第二选择 **M Social Hotel Times Square**。
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 📝 行程小贴士
|
||||||
|
|
||||||
|
* 建议入住 Midtown(AC 或 M Social),出行便利,晚上在时代广场也很安全热闹。
|
||||||
|
* 提前在线买门票:百老汇演出、Top of the Rock、自由女神游船等,节省排队时间。
|
||||||
|
* 孩子可以带上舒服的步行鞋,纽约步行多、地铁站台常需爬楼梯。
|
||||||
|
|
||||||
|
祝你们在纽约度过一个精彩、安全又充实的家庭假期!如需订票建议、演出推荐或餐厅建议,随时欢迎问我 😊
|
||||||
|
|
||||||
|
[1]: https://www.timessquarenyc.org/hotels/m-social-hotel-times-square?utm_source=chatgpt.com "M Social Hotel Times Square"
|
||||||
|
[2]: https://www.tripadvisor.com/Hotel_Review-g60763-d93486-Reviews-Millennium_Hotel_Broadway_Times_Square-New_York_City_New_York.html?utm_source=chatgpt.com "MILLENNIUM HOTEL BROADWAY TIMES SQUARE - Updated 2025 Prices & Reviews ..."
|
||||||
|
[3]: https://www.geographicguide.com/united-states/nyc/hotels/millennium-times-square.htm?utm_source=chatgpt.com "Millennium Hotel New York Times Square, Broadway NYC"
|
||||||
|
[4]: https://www.tripadvisor.com/ShowTopic-g60763-i5-k9063955-The_Premier_v_The_Millennium-New_York_City_New_York.html?utm_source=chatgpt.com "The Premier v. The Millennium - New York City Forum"
|
||||||
|
[5]: https://travel-buddies.com/millennium-hotel-broadway-times-square/?utm_source=chatgpt.com "Millennium Hotel Broadway Times Square Review | Travel Buddies"
|
||||||
|
[6]: https://mapcarta.com/25284550?utm_source=chatgpt.com "Millennium Times Square New York Map - Hotel - New York, United States"
|
||||||
|
[7]: https://www.tripadvisor.com/Hotel_Review-g60763-d12695463-Reviews-AC_Hotel_New_York_Times_Square-New_York_City_New_York.html?utm_source=chatgpt.com "AC HOTEL NEW YORK TIMES SQUARE - Updated 2025 Prices & Reviews (New ..."
|
||||||
|
[8]: https://www.tripadvisor.com.au/Hotel_Review-g60763-d12695463-Reviews-AC_Hotel_New_York_Times_Square-New_York_City_New_York.html?utm_source=chatgpt.com "AC HOTEL NEW YORK TIMES SQUARE: 2023 Prices & Reviews (New York City ..."
|
||||||
|
[9]: https://thepointsguy.com/hotel/reviews/ac-hotel-nyc-times-square/?utm_source=chatgpt.com "AC Hotel New York Times Square - The Points Guy"
|
||||||
|
[10]: https://us.trip.com/hotels/new-york-hotel-detail-11129287/ac-hotel-new-york-times-square/?utm_source=chatgpt.com "AC Hotel New York Times Square (New York) Updated 2025 Prices & Reviews ..."
|
||||||
|
[11]: https://www.rome2rio.com/s/AC-Hotel-by-Marriott-New-York-Downtown/Times-Square?utm_source=chatgpt.com "AC Hotel by Marriott New York Downtown to Times Square"
|
||||||
|
[12]: https://www.tripadvisor.com/Hotel_Review-g60763-d1858923-Reviews-Doubletree_By_Hilton_New_York_Downtown-New_York_City_New_York.html?utm_source=chatgpt.com "DOUBLETREE BY HILTON NEW YORK DOWNTOWN - Updated 2025 Prices & Hotel ..."
|
||||||
|
[13]: https://www.tripadvisor.co.uk/Hotel_Review-g60763-d1858923-Reviews-or2840-Doubletree_By_Hilton_New_York_Downtown-New_York_City_New_York.html?utm_source=chatgpt.com "DOUBLETREE BY HILTON NEW YORK DOWNTOWN - Updated 2025 Reviews, Photos ..."
|
||||||
|
[14]: https://www.hilton.com/en/hotels/nycbpdt-doubletree-new-york-downtown/?utm_source=chatgpt.com "DoubleTree by Hilton New York Downtown"
|
||||||
|
[15]: https://www.tripadvisor.com/Hotel_Review-g60763-d23155544-Reviews-M_Social_Hotel_New_York_Times_Square-New_York_City_New_York.html?utm_source=chatgpt.com "M Social Hotel New York Times Square - Tripadvisor"
|
||||||
|
[16]: https://www.tripadvisor.co.uk/Hotel_Review-g60763-d23155544-Reviews-or30-M_Social_Hotel_New_York_Times_Square-New_York_City_New_York.html?utm_source=chatgpt.com "M SOCIAL HOTEL NEW YORK TIMES SQUARE - Updated 2025 Reviews, Photos ..."
|
||||||
|
[17]: https://travel-buddies.com/m-social-hotel-times-square-new-york/?utm_source=chatgpt.com "M Social Hotel Times Square New York Review | Travel Buddies"
|
||||||
|
[18]: https://www.businesstraveller.com/business-travel/2021/06/03/millennium-hotels-debuts-m-social-brand-in-new-york/?utm_source=chatgpt.com "Millennium Hotels debuts M Social brand in New York"
|
||||||
|
[19]: https://lodgingmagazine.com/m-social-times-square-new-york-debuts-as-first-u-s-m-social-hotel/?utm_source=chatgpt.com "M Social Times Square New York Debuts as First U.S. M Social Hotel"
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
---
|
||||||
|
title: 2025-07-28-world_news
|
||||||
|
created: 2025-07-28
|
||||||
|
updated: 2025-07-28
|
||||||
|
type: summary
|
||||||
|
tags: ["newsletter", "world_news"]
|
||||||
|
external: http://go/ui/posts/1011/
|
||||||
|
---
|
||||||
|
|
||||||
|
# 全球新闻速览
|
||||||
|
|
||||||
|
- [美欧达成贸易协议,特朗普关税政策影响深远](https://www.cnbc.com/2025/07/28/us-trade-deal-offers-initial-relief-leaves-europe-on-the-backfoot.html)
|
||||||
|
美国与欧盟达成贸易协议,税率为15%。此举标志着特朗普旨在重塑全球贸易格局的重要一步,也对日本汽车制造商和全球市场(包括欧洲股市)产生深远影响。
|
||||||
|
- [肯尼亚获1.5亿美元太阳能融资,助力全国电气化](https://www.cnbc.com/2025/07/28/private-investors-buy-into-largest-of-its-kind-solar-deal-to-electrify-kenya.html)
|
||||||
|
私募投资者参与肯尼亚大型太阳能项目,预计将使140万户家庭(多数在农村地区)获得太阳能系统,推动全国电气化进程。
|
||||||
|
- [埃隆·马斯克确认特斯拉与三星签署165亿美元芯片合同](https://www.cnbc.com/2025/07/28/samsung-electronics-new-chip-supply-contract.html)
|
||||||
|
埃隆·马斯克证实特斯拉已与三星电子签署价值165亿美元的芯片供应合同,推动三星股价上涨。
|
||||||
|
- [孟加拉国战斗机坠毁小学,至少31人死亡](https://www.bbc.com/news/articles/cp90d9mkz9xo)
|
||||||
|
一架战斗机在达卡坠毁,撞上了一所小学,造成至少31人死亡,其中许多是学童。
|
||||||
|
- [亚太市场涨跌互现,关注中美贸易谈判细节](https://www.cnbc.com/2025/07/28/asia-stock-markets-today-live-updates-nikkei-225-asx-200-kospi-hang-seng-csi-300-senxex-nifty-50.html)
|
||||||
|
投资者密切关注中美贸易谈判重启的消息(周一在斯德哥尔摩举行),导致亚太市场表现复杂。
|
||||||
|
- [美国一飞机起火,乘客紧急滑梯逃生](https://www.bbc.com/news/videos/cpwy8p72zr9o)
|
||||||
|
一架飞机在起飞时发生火灾,乘客利用紧急滑梯逃离,一人送医。
|
||||||
|
- [喀麦隆反对派领导人被禁止挑战世界最年长总统](https://www.bbc.com/news/articles/cdrklvd5jyjo)
|
||||||
|
喀麦隆反对派领导人莫里斯·卡姆托被禁止参加总统竞选,此前他曾在此前选举中位居92岁总统保罗·比亚之后。
|
||||||
|
- [本周全球市场展望:特朗普关税截止日期临近](https://www.cnbc.com/2025/07/28/cnbc-daily-open-a-week-when-everything-happens.html)
|
||||||
|
本周被市场观察者视为“奥运会”,因特朗普的关税截止日期(8月1日)临近,加上美欧贸易协议生效,预示着市场将迎来异常活跃的一周。
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
---
|
||||||
|
title: 2025-07-28-world-painting
|
||||||
|
created: 2025-07-28
|
||||||
|
updated: 2025-07-28
|
||||||
|
type: summary
|
||||||
|
tags: ["AI", "painting", "world"]
|
||||||
|
external: http://go/ui/posts/1012/
|
||||||
|
---
|
||||||
|
|
||||||
|
## 雾海上的漫游者
|
||||||
|
《雾海上的漫游者》是德国浪漫主义画家卡斯帕·大卫·弗里德里希于1818年创作的一幅著名画作。画面中,一位背对着观众的男子站在高耸的悬崖上,凝视着眼前被浓雾笼罩的山峦和天空。这幅画作以其深刻的象征意义而闻名,它描绘了人类在面对大自然时的渺小与崇高,以及对未知世界的探索和对内心世界的反思。这幅画可以引导孩子思考人与自然的关系,了解浪漫主义艺术的特点,并激发他们对风景画的兴趣。
|
||||||
|
|
||||||
|
名画URL : <https://www.nbfox.com/the-wanderer-above-the-sea-of-fog/>
|
||||||
|
搜索名画: <https://go.junv.cc/gi/雾海上的漫游者>
|
||||||
|
|
||||||
|
------
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
---
|
||||||
|
title: 优化版加州七天六晚亲子自驾游:避开硅谷,深度探索蒙特雷、洛杉矶及圣地亚哥的科技、航空与海岸风光
|
||||||
|
created: 2025-07-28
|
||||||
|
updated: 2025-07-28
|
||||||
|
type: summary
|
||||||
|
tags: ["california", "family", "notes", "telegram", "travel"]
|
||||||
|
external: http://go/ui/posts/1013/
|
||||||
|
---
|
||||||
|
|
||||||
|
好的,了解你新的需求 ✅:
|
||||||
|
|
||||||
|
> **第一天不住硅谷,直接从旧金山开车到 Monterey,参观水族馆并住宿在 Monterey 附近**
|
||||||
|
|
||||||
|
这非常合理!这样可以避开硅谷区域的高价、交通压力,也可以慢下来,好好享受加州中部海岸风光。以下是更新后的行程:
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🗺️ 重新优化后的 7 天 6 晚加州亲子自驾路线
|
||||||
|
|
||||||
|
**(专为喜欢科技+航空母舰+亲子体验设计)**
|
||||||
|
🗓️ **时间:9月19日(周五)– 25日(周四)**
|
||||||
|
|
||||||
|
| 日期 | 城市 | 活动安排 | 推荐住宿城市 |
|
||||||
|
| ------------ | --------------- | -------------------------------------------------------------------------------- | ----------------- |
|
||||||
|
| **9/19(周五)** | 旧金山 ➡️ Monterey | 上午自驾 2h 抵达 Monterey<br>下午:Monterey Bay Aquarium<br>17 Mile Drive 看海狮 + 沿海风景 | Monterey / Carmel |
|
||||||
|
| **9/20(周六)** | Monterey ➡️ 洛杉矶 | 上午沿 101 高速南下,或走风景更佳的1号公路段(建议中午前出发)<br>车程约 6 小时(含中途休息) | 洛杉矶 |
|
||||||
|
| **9/21(周日)** | 洛杉矶 | California Science Center(Endeavour 航天飞机)<br>Griffith 天文台(可选)<br>晚上洛杉矶夜景 | 洛杉矶 |
|
||||||
|
| **9/22(周一)** | 洛杉矶 | Petersen 汽车博物馆(如喜欢车)<br>La Brea Tar Pits 化石博物馆 | 洛杉矶 |
|
||||||
|
| **9/23(周二)** | 洛杉矶 ➡️ 圣地亚哥 | 上午自驾 2 小时至圣地亚哥<br>中午 USS Midway 航空母舰博物馆<br>晚上:海港 Village 散步/美食 | 圣地亚哥 |
|
||||||
|
| **9/24(周三)** | 圣地亚哥 | Fleet Science Center / San Diego Air & Space Museum<br>La Jolla 海滩 / Balboa Park | 圣地亚哥 |
|
||||||
|
| **9/25(周四)** | 圣地亚哥(返程) | 可从 SAN 飞回旧金山或其他地方 | — |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🎯 每日重点解说与建议
|
||||||
|
|
||||||
|
### ✅ **9/19 - Monterey**
|
||||||
|
|
||||||
|
* 🚗 从旧金山出发建议 9 点前上路,避开湾区高峰
|
||||||
|
* 🐠 **Monterey Bay Aquarium**:全美前三水族馆,亲子必去
|
||||||
|
* 🏞️ **17 Mile Drive**(可选):看野生海狮、松林、太平洋风光
|
||||||
|
* 🏨 推荐住在:
|
||||||
|
|
||||||
|
* **InterContinental The Clement Monterey**(离水族馆走路1分钟,面海)
|
||||||
|
* **Spindrift Inn**(靠海浪漫地中海风格)
|
||||||
|
* **Portola Hotel & Spa**(位置方便,有地下停车场)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### ✅ **9/20 - Monterey ➡️ 洛杉矶**
|
||||||
|
|
||||||
|
* 建议早点出发(8点左右),避免卡在中途的小镇
|
||||||
|
* 可选择走:
|
||||||
|
|
||||||
|
* **内陆 US-101**:高速,6h 左右直达洛杉矶
|
||||||
|
* **沿海 CA-1 公路**:风景壮观,适合体验 Big Sur(但弯多,需 7–8 小时)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🔧 你可以选择的进一步优化方向:
|
||||||
|
|
||||||
|
* 是否需要我帮你**安排每日酒店推荐**(按四星标准、带价格、停车、亲子适配)?
|
||||||
|
* 是否需要一份**PDF/Google Maps 行程地图+推荐门票链接**?
|
||||||
|
* 是否要我补充整趟预算对比(与纽约的7天行程)?
|
||||||
|
|
||||||
|
我可以按你选择的方向,马上开始。你选一个方向,我继续深化输出。
|
||||||
@@ -0,0 +1,77 @@
|
|||||||
|
---
|
||||||
|
title: 加州自驾停车全攻略:详细解析复杂规定、路沿颜色与避险技巧,助您轻松畅游加利福尼亚
|
||||||
|
created: 2025-07-28
|
||||||
|
updated: 2025-07-28
|
||||||
|
type: summary
|
||||||
|
tags: ["california", "notes", "parking", "rules", "telegram"]
|
||||||
|
external: http://go/ui/posts/1014/
|
||||||
|
---
|
||||||
|
|
||||||
|
好的,这是一个非常重要的问题,因为加州的停车规定相当复杂,而且违规罚款通常很高,甚至可能导致车辆被拖走,对游客来说会非常麻烦。
|
||||||
|
|
||||||
|
总的来说,加州,尤其是在洛杉矶、旧金山这样的大城市,**路边付费停车非常普遍**。您需要像一个“停车侦探”一样,仔细观察每一个标志和路沿颜色。
|
||||||
|
|
||||||
|
以下是您需要了解的加州停车规定详解:
|
||||||
|
|
||||||
|
### 1. 最重要的黄金法则:仔细阅读所有停车标志!
|
||||||
|
|
||||||
|
在任何地方停车前,请务必花30秒时间仔细阅读您停车位置附近的所有标志。标志上的信息是最高指令,它会告诉您谁可以停、什么时间可以停、能停多久。一个地方可能同时有好几个标志叠加生效。
|
||||||
|
|
||||||
|
### 2. 解码路沿颜色 (Curb Colors)
|
||||||
|
|
||||||
|
这是加州停车最具特色的规定。路沿(马路牙子)的颜色直接决定了您是否可以停车:
|
||||||
|
|
||||||
|
* **🔴 红色 (Red):** **绝对禁止停车!** 红色代表“禁止停留、停车或泊车”(No stopping, standing, or parking)。通常设在消防栓旁、公交车站、路口转角等地方。
|
||||||
|
* **🟡 黄色 (Yellow):** **商业装卸区。** 仅供有商业牌照的车辆在规定时间内装卸货物。私家车只能短暂停留上下乘客(司机需留在车内)。
|
||||||
|
* **⚪️ 白色 (White):** **乘客临时上下车区。** 仅限非常短暂地停留以接送乘客,通常限制在5分钟以内。常见于机场、医院、餐厅门口。
|
||||||
|
* **🟢 绿色 (Green):** **限时停车区。** 您可以停车,但有时间限制。通常会在路沿上或旁边的标志上写明,例如“15 MINUTE PARKING”或“30 MINUTE PARKING”。时间限制通常在周一至周六的特定时段内有效。
|
||||||
|
* **🔵 蓝色 (Blue):** **残障人士专用停车位。** 只有悬挂有效残障人士停车牌照 (Disabled Person Parking Placard) 的车辆才能停放,否则会面临高额罚款。
|
||||||
|
|
||||||
|
**没有颜色的路沿**,通常表示可以停车,但您仍需检查周围的停车标志是否有其他限制。
|
||||||
|
|
||||||
|
### 3. 路边付费停车:非常普遍且方式多样
|
||||||
|
|
||||||
|
在市中心、商业街、旅游景点和繁忙社区,绝大部分路边停车位都是需要付费的。
|
||||||
|
|
||||||
|
**付费方式主要有以下几种:**
|
||||||
|
|
||||||
|
* **停车计时器 (Parking Meters):**
|
||||||
|
* **独立咪表:** 每个车位旁都有一个咪表。您需要投入硬币 (Quarters最常用) 或刷信用卡/借记卡来购买停车时间。
|
||||||
|
* **注意:** 很多咪表有最长停车时限(如2小时),即使您想付更多的钱也无法停留更久。超时罚款很重。
|
||||||
|
|
||||||
|
* **集中付费机 (Pay Stations / Kiosks):**
|
||||||
|
* 在一段路边会有一个集中的付费机器。您需要输入您的**车牌号码 (License Plate)**,然后选择您要停放的时间并付费。
|
||||||
|
* 付费后,有些机器会打印一张收据,您需要将**收据放在仪表盘上**,确保从车外清晰可见。有些则不需要收据,因为执法人员会直接扫描车牌来确认您是否已付费。
|
||||||
|
|
||||||
|
* **手机App支付:**
|
||||||
|
* 这是越来越主流的方式,对游客也非常方便。在洛杉矶、旧金山等大城市,您会在咪表或标志上看到特定App的标志,如 **ParkMobile**, **PayByPhone** 等。
|
||||||
|
* **强烈建议您**在开始自驾前就下载好这些App并注册好账户、绑定信用卡。这样您只需输入停车位的编号,就可以通过手机支付和续费(如果允许的话),非常方便。
|
||||||
|
|
||||||
|
### 4. 必须警惕的“停车陷阱”
|
||||||
|
|
||||||
|
* **街道清扫 (Street Cleaning):**
|
||||||
|
* 这是游客最容易中招的一项!在居民区和商业区的路边,通常会有**“NO PARKING”**的标志,并标明了**特定的星期和时间段**(例如,“NO PARKING, 8AM - 10AM, TUESDAYS”)。
|
||||||
|
* 这意味着在每周二的早上8点到10点,这条路边禁止停车,以便街道清扫车通过。**即使只有几分钟,也绝对不能停!** 违规车辆很大概率会被立即开罚单并**拖走 (Towed)**。
|
||||||
|
|
||||||
|
* **居民许可停车 (Residential Permit Parking):**
|
||||||
|
* 在很多居民区,尤其是在大城市靠近市中心的地方,路边停车位会标有“PERMIT REQUIRED”或“DISTRICT A PARKING ONLY”等字样。
|
||||||
|
* 这些车位仅供持有该区域停车许可的居民使用。没有许可的车辆停车,会被开罚单。
|
||||||
|
|
||||||
|
* **消防栓 (Fire Hydrants):**
|
||||||
|
* 法律规定,消防栓前后**15英尺(约4.5米)**内禁止停车,无论路沿是否漆成红色。
|
||||||
|
|
||||||
|
### 5. 坡道停车的特殊规定
|
||||||
|
|
||||||
|
这在旧金山这样山路众多的城市是**法律要求**,也是为了安全。
|
||||||
|
|
||||||
|
* **下坡 (Downhill):** 将前轮转向**路沿方向 (Toward the curb)**。
|
||||||
|
* **上坡 (Uphill):** 将前轮转向**马路中间方向 (Away from the curb)**。
|
||||||
|
* **没有路沿的坡道:** 无论上下坡,都将前轮转向**路边 (Toward the side of the road)**。
|
||||||
|
|
||||||
|
**总结建议:**
|
||||||
|
|
||||||
|
* **找车位要有耐心:** 在热门地区,找一个合法的路边车位可能需要一些时间。
|
||||||
|
* **善用停车场/楼:** 如果您不确定路边规则或找不到车位,最保险的方式是直接开进公共停车场 (Public Parking Lot) 或停车楼 (Garage),虽然价格通常更贵,但省心省力。
|
||||||
|
* **设置手机闹钟:** 如果您停在有时间限制或付费的地方,一定要设置闹钟提醒自己,避免超时。
|
||||||
|
|
||||||
|
掌握了以上这些规则,您在加州的停车体验会顺利很多。祝您旅途愉快!
|
||||||
@@ -0,0 +1,90 @@
|
|||||||
|
---
|
||||||
|
title: 从澳大利亚维多利亚州到美国加州自驾游:维州司机必须掌握的加州交通规则与驾驶习惯核心指南
|
||||||
|
created: 2025-07-28
|
||||||
|
updated: 2025-07-28
|
||||||
|
type: summary
|
||||||
|
tags: ["california", "driving", "notes", "rules", "telegram"]
|
||||||
|
external: http://go/ui/posts/1015/
|
||||||
|
---
|
||||||
|
|
||||||
|
好的,完全理解。既然您是习惯在澳大利亚维多利亚州驾驶,要去加州旅游,那么我们把重点完全放在您在加州需要特别注意的交通规则和驾驶习惯上。
|
||||||
|
|
||||||
|
以下是为您量身定制的加州驾驶指南,重点指出了与维州规则的关键区别,帮助您在美国安全、顺利地驰骋。
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### **给维州司机的加州自驾核心指南**
|
||||||
|
|
||||||
|
对于习惯了在墨尔本街头穿梭的您来说,加州的道路既熟悉又陌生。除了阳光和风景,最大的挑战来自驾驶习惯的“反转”。请务必将以下几点牢记于心。
|
||||||
|
|
||||||
|
#### **1. 核心根本:靠右行驶!**
|
||||||
|
|
||||||
|
这是最重要、也最容易出错的一点。
|
||||||
|
|
||||||
|
* **靠右行驶 (Keep Right):** 您的车辆将行驶在马路的右侧。
|
||||||
|
* **左舵驾驶 (Left-Hand Drive):** 您的驾驶座位在车辆的左侧。
|
||||||
|
* **关键时刻提醒自己:**
|
||||||
|
* **转弯时:** 左转是小转弯,穿过对向车道;右转是大转弯,沿着路边转。这与维州正好相反。
|
||||||
|
* **进入道路时:** 从停车场或小路进入主路,要习惯性地向左看,因为那是离您最近的来车方向。
|
||||||
|
* **环岛 (Roundabout):** 虽然在加州不那么常见,但进入环岛时是**逆时针**行驶,并给**左侧**已在环岛内的车辆让行。
|
||||||
|
|
||||||
|
**实用技巧:** 租车后,在停车场或安静的街道上花几分钟时间,反复练习转弯,让大脑和身体适应这个“镜像世界”。
|
||||||
|
|
||||||
|
#### **2. “红灯右转”——加州特色,必须掌握**
|
||||||
|
|
||||||
|
这是加州(及美国大部分地区)一项非常普遍且重要的规则。
|
||||||
|
|
||||||
|
* **规则:** 在十字路口遇到红灯,如果您要右转,可以**先将车完全停下 (Complete Stop)**。在确认没有行人通过、也没有横向车辆(从您左方驶来)后,即使是红灯,您也可以安全地完成右转。
|
||||||
|
* **例外情况:** 如果路口有 **"NO TURN ON RED"** 的标志,则必须等待绿灯。
|
||||||
|
* **与维州的区别:** 这与维州“除非有标志允许,否则红灯禁止左转”的规则**完全相反**。在加州,这是默认允许的。不利用这个规则,有时反而会压住后面的车流。
|
||||||
|
|
||||||
|
#### **3. 全方位停车标志 (4-Way or All-Way Stop)**
|
||||||
|
|
||||||
|
您会经常遇到在十字路口的每个入口都设有停车标志 (Stop Sign),下方通常有 "4-WAY" 或 "ALL-WAY" 的小牌子。
|
||||||
|
|
||||||
|
* **规则:** 所有到达路口的车辆都必须停车。遵循**“先到先走” (First-Come, First-Served)** 的原则。谁先在停车线前完全停下,谁就先走。
|
||||||
|
* **同时到达怎么办?** 如果两辆车几乎同时到达,您**右手边**的车辆拥有优先路权。
|
||||||
|
* **实用技巧:** 养成在停车标志前**完全停止**车辆的习惯,不要“溜”过去。观察其他车辆的到达顺序,避免抢行。
|
||||||
|
|
||||||
|
#### **4. 速度与单位:英里/小时 (mph)**
|
||||||
|
|
||||||
|
加州使用英里,而不是公里。您的车速表和路边的限速牌都将以 **英里/小时 (mph)** 为单位。
|
||||||
|
|
||||||
|
* **牢记换算:** **1 英里 ≈ 1.6 公里**。
|
||||||
|
* **常见限速:**
|
||||||
|
* **市区/居民区 (City/Residential):** 25 mph (约 40 km/h)
|
||||||
|
* **学校区域 (School Zone):** 当有孩子在场时,通常为 25 mph 或更低。
|
||||||
|
* **双车道非高速公路:** 55 mph (约 88 km/h)
|
||||||
|
* **高速公路 (Freeway/Highway):** 65 mph (约 105 km/h),有时会到 70 mph。
|
||||||
|
* **“基本速度法” (Basic Speed Law):** 这是加州的核心法规。即使您没有超过标志限速,但在大雨、大雾或堵车等情况下,如果您的速度被警察认为是“不安全”的,依然可能被开罚单。请根据路况灵活调整车速。
|
||||||
|
|
||||||
|
#### **5. 高速公路 (Freeway) 驾驶文化**
|
||||||
|
|
||||||
|
加州的高速公路系统非常发达,车流量巨大。
|
||||||
|
|
||||||
|
* **车道划分:**
|
||||||
|
* **最右侧车道 (Right Lane):** 主要用于驶入/驶出高速,或慢速行驶。
|
||||||
|
* **中间车道 (Middle Lanes):** 是主要的行车道 (cruising lanes)。
|
||||||
|
* **最左侧车道 (Left Lane):** 被称为**“超车道” (Passing Lane)**。除非您在超车,否则不要长时间占用最左侧车道。这是非常重要的驾驶礼仪,长时间占用会被视为不礼貌甚至危险的行为。
|
||||||
|
* **拼车道 (Carpool/HOV Lane):** 标志为菱形图案。在规定时间内(通常是高峰期),只有车内有2人或3人以上(根据标志要求)才能使用。独自驾驶闯入会面临高额罚款。
|
||||||
|
|
||||||
|
#### **6. 其他重要差异**
|
||||||
|
|
||||||
|
* **U型转弯 (U-Turns):** 在交叉路口,除非有禁止标志,您可以在绿灯时从最左侧车道进行U型转弯。在商业区,除非路口允许,否则不要在道路中间进行U型转弯。
|
||||||
|
* **行人优先权:** 法律严格规定车辆必须给在人行横道 (crosswalk) 上的行人让行。看到行人,请务必停车等待。
|
||||||
|
* **路边停车:**
|
||||||
|
* **停车方向:** 必须与行车方向一致,即车头朝前。
|
||||||
|
* **路沿颜色:** 注意路沿的颜色,它们有特定含义:
|
||||||
|
* **红色:** 禁止停车。
|
||||||
|
* **黄色:** 仅限商业车辆装卸货。
|
||||||
|
* **白色:** 仅限乘客上下车(临时停车)。
|
||||||
|
* **绿色:** 有时间限制的停车。
|
||||||
|
* **蓝色:** 仅限残障人士车辆停放。
|
||||||
|
|
||||||
|
**给您的最后建议:**
|
||||||
|
|
||||||
|
* **租车时:** 确保购买了足够的保险,特别是责任险 (Liability)。
|
||||||
|
* **导航:** 提前下载好离线地图或使用手机支架,因为加州法律禁止手持手机操作。
|
||||||
|
* **保持耐心:** 加州的交通,尤其在洛杉矶和旧金山等大城市,可能会非常拥堵。保持冷静,预留充足的出行时间。
|
||||||
|
|
||||||
|
祝您在加州有一段愉快的自驾旅程!
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
---
|
||||||
|
title: 2025-07-29-technology
|
||||||
|
created: 2025-07-29
|
||||||
|
updated: 2025-07-29
|
||||||
|
type: summary
|
||||||
|
tags: ["newsletter", "technology"]
|
||||||
|
external: http://go/ui/posts/1016/
|
||||||
|
---
|
||||||
|
|
||||||
|
**科技新闻摘要**
|
||||||
|
- [高中生击败全球顶尖AI模型](https://www.wsj.com/tech/ai/imo-gold-math-olympiad-google-deepmind-openai-2450095e?mod=rss_Technology)
|
||||||
|
美国高中生在国际数学奥林匹克竞赛中取得比Google DeepMind和OpenAI的AI模型更高的分数。
|
||||||
|
- [阿里巴巴推出AI智能眼镜,对标Meta](https://www.cnbc.com/2025/07/28/alibaba-ai-smart-glasses-creates-rival-to-meta.html)
|
||||||
|
阿里巴巴的Quark AI眼镜将搭载其Qwen大语言模型和Quark高级AI助手,旨在成为Meta的中国竞争对手。
|
||||||
|
- [华为重夺中国智能手机市场第一,苹果恢复增长](https://www.cnbc.com/2025/07/28/apple-returns-to-growth-in-china-huawei-reclaims-top-smartphone-spot.html)
|
||||||
|
数据显示,华为在中国智能手机市场重回榜首,苹果在该季度出货量同比增长4%。
|
||||||
|
- [马斯克证实特斯拉与三星签署165亿美元芯片合同](https://www.cnbc.com/2025/07/28/samsung-electronics-new-chip-supply-contract.html)
|
||||||
|
三星电子股价在公司披露与一家全球主要企业签订半导体供应合同后上涨3.5%。
|
||||||
|
- [Figma上调IPO发行价区间,估值近190亿美元](https://www.cnbc.com/2025/07/28/figma-raises-ipo-range-to-30-to-32-per-share.html)
|
||||||
|
Figma将IPO发行价区间上调至每股30-32美元,公司估值可能达到近190亿美元,但仍低于Adobe在2022年提出的收购价。
|
||||||
|
- [Firefly Aerospace设定IPO发行价区间,估值55亿美元](https://www.cnbc.com/2025/07/28/firefly-aerospace-ipo-space.html)
|
||||||
|
火箭制造商Firefly Aerospace预计其即将进行的IPO发行价为每股35-39美元,公司估值将达到约55亿美元。
|
||||||
|
- [瑞安·雷诺兹和格温妮丝·帕特洛帮助科技公司应对公关危机](https://www.wsj.com/business/media/astronomer-ad-gwyneth-paltrow-ryan-reynolds-570dd3e7?mod=rss_Technology)
|
||||||
|
好莱坞明星帮助一家因音乐会公关危机受困的科技公司摆脱困境。
|
||||||
|
- [MicroStrategy效仿者增多,加密市场投机热度升温](https://www.cnbc.com/2025/07/28/microstrategy-copycats-out-of-control-as-canadian-vape-company-joins-fray.html)
|
||||||
|
越来越多的公司效仿MicroStrategy购买加密货币,表明加密市场可能正在走向投机狂热。
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
---
|
||||||
|
title: 2025-07-29-chinese-painting
|
||||||
|
created: 2025-07-29
|
||||||
|
updated: 2025-07-29
|
||||||
|
type: summary
|
||||||
|
tags: ["AI", "china", "painting"]
|
||||||
|
external: http://go/ui/posts/1017/
|
||||||
|
---
|
||||||
|
|
||||||
|
## 秋庭戏婴图
|
||||||
|
《秋庭戏婴图》是宋代画家苏汉臣创作的一幅绢本设色画,现藏于台北故宫博物院。这幅画描绘了两个孩童在庭院中嬉戏的场景,笔触细腻,色彩鲜明,展现了宋代儿童丰富多彩的生活和温馨的家庭氛围。画中的孩童形象栩栩如生,表情生动,反映了中国传统文化中对子嗣的珍视和对童趣的欣赏,非常适合帮助孩子理解中国传统文化中的生活场景和人文情怀。
|
||||||
|
|
||||||
|
古画URL : <https://www.gaoqinghua.com/29780.html>
|
||||||
|
搜索古画: <https://go.junv.cc/gi/秋庭戏婴图>
|
||||||
|
|
||||||
|
------
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
---
|
||||||
|
title: 2025-07-29-victoria
|
||||||
|
created: 2025-07-29
|
||||||
|
updated: 2025-07-29
|
||||||
|
type: summary
|
||||||
|
tags: ["local_news", "newsletter"]
|
||||||
|
external: http://go/ui/posts/1018/
|
||||||
|
---
|
||||||
|
|
||||||
|
# 焦点新闻
|
||||||
|
- [以色列驻澳大使馆否认加沙饥荒指控](https://www.sbs.com.au/news/article/false-presentation-of-hunger-israels-embassy-in-australia-denies-starvation-in-gaza/otpcnkqun)
|
||||||
|
以色列政府否认加沙地带存在饥荒的报道,其驻堪培拉高级官员指责哈马斯散布“虚假叙述”。
|
||||||
|
- [阿尔伯特公园大奖赛区域公众禁入期将延长三倍](https://www.theage.com.au/national/victoria/public-lockout-at-albert-park-gp-precinct-set-to-triple-in-length-20250728-p5mi8h.html?ref=rss&utm_medium=rss&utm_source=rss_national_victoria)
|
||||||
|
根据维州政府提出的法律修改,一级方程式赛车区在赛事前后对公众的禁入期将从七天延长至三周。
|
||||||
|
- [原住民女性狱中死亡,婴儿被带离被指是“关键时刻”](https://www.theage.com.au/national/victoria/an-indigenous-woman-s-baby-was-taken-from-her-it-was-a-pivotal-moment-before-she-died-in-prison-20250728-p5miez.html?ref=rss&utm_medium=rss&utm_source=rss_national_victoria)
|
||||||
|
验尸官发现,原住民女性Heather Calgaret在被拘留期间的死亡本可避免,她的健康状况在婴儿出生后立即被带离身边后开始恶化。
|
||||||
|
- [澳大利亚能源账单上涨原因及应对措施](https://www.sbs.com.au/news/article/why-your-energy-bills-could-be-getting-higher-and-what-you-can-do-about-it/jofhpl9it)
|
||||||
|
能源费用持续上涨,对某些弱势群体影响尤为严重,他们常通过关闭供暖和制冷设备来节省开支。
|
||||||
|
- [联合国气候主管敦促澳大利亚采取行动应对气候排放](https://www.sbs.com.au/news/article/this-can-be-australias-moment-strong-message-from-un-climate-chief/jrjp3ytsp)
|
||||||
|
一位联合国高级官员表示,澳大利亚在减少气候排放方面已所剩时间不多,敦促其抓住“这一时刻”。
|
||||||
|
- [难民呼吁解决13年未决身份问题,称之为“澳大利亚最糟糕的政策”](https://www.sbs.com.au/news/article/australias-worst-policy-refugees-plead-with-government-to-resolve-their-13-year-limbo/503ffi758)
|
||||||
|
一群曾参与联盟党现已废止的“快速通道”项目的难民表示,他们仍在等待获得永久居留身份的安全保障。
|
||||||
|
- [银行将向低收入客户退还超9300万澳元](https://www.sbs.com.au/news/article/banks-to-refund-93-million-to-low-income-customers/nk4xrg1ah)
|
||||||
|
在对银行向低收入原住民客户收取高额费用进行审查后,澳大利亚金融市场监管机构发现“更广泛的问题”。
|
||||||
|
- [维州政府考虑征用现有税收以填补115亿澳元城铁环线资金缺口](https://www.theage.com.au/national/victoria/state-eyes-carve-out-of-existing-taxes-to-help-plug-11-5b-srl-funding-hole-20250727-p5mi5x.html?ref=rss&utm_medium=rss&utm_source=rss_national_victoria)
|
||||||
|
根据一项备受争议的提案,郊区铁路环线(SRL)车站附近物业的土地税和印花税款项将被纳入一个专项基金。
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
---
|
||||||
|
title: 2025-07-29-world_news
|
||||||
|
created: 2025-07-29
|
||||||
|
updated: 2025-07-29
|
||||||
|
type: summary
|
||||||
|
tags: ["newsletter", "world_news"]
|
||||||
|
external: http://go/ui/posts/1019/
|
||||||
|
---
|
||||||
|
|
||||||
|
# 全球新闻快报
|
||||||
|
|
||||||
|
- [南欧热浪加剧多地野火](https://www.bbc.com/news/videos/c23pk70mz13o?at_medium=RSS&at_campaign=rss)
|
||||||
|
希腊和土耳其等多国正与野火搏斗,欧洲南部气温飙升。
|
||||||
|
- [曼谷市场大规模枪击事件致五人死亡](https://www.bbc.com/news/articles/c9qyvx771neo?at_medium=RSS&at_campaign=rss)
|
||||||
|
泰国首都发生枪击事件,造成5人死亡。警方正在调查动机。
|
||||||
|
- [尼日利亚绑匪收赎金后仍杀害35名人质](https://www.bbc.com/news/articles/cm2vyw9prlzo?at_medium=RSS&at_campaign=rss)
|
||||||
|
当地官员称,尽管已支付赎金,35名人质仍被杀害。
|
||||||
|
- [厄瓜多尔酒吧遭枪手袭击致17人死亡](https://www.bbc.com/news/articles/c8jp7w43vvmo?at_medium=RSS&at_campaign=rss)
|
||||||
|
警方表示,一名12岁男孩是这个饱受毒品暴力困扰的国家最新一起大规模枪击事件的受害者之一。
|
||||||
|
- [特朗普称普京须在10至12天内同意乌克兰停火](https://www.bbc.com/news/articles/c707zrrd7xqo?at_medium=RSS&at_campaign=rss)
|
||||||
|
美国总统表示,在和平进展甚微的情况下,“没有理由”继续等待。
|
||||||
|
- [以色列人权组织指控以色列在加沙实施种族灭绝](https://www.bbc.com/news/articles/c776xkvz6vno?at_medium=RSS&at_campaign=rss)
|
||||||
|
以色列政府驳斥了B'Tselem和以色列人权医生组织在各自报告中的指控。
|
||||||
|
- [英伟达缺席上海重要AI大会,中国竞争对手抢占风头](https://www.cnbc.com/2025/07/28/nvidia-absent-at-major-china-ai-event-.html)
|
||||||
|
尽管英伟达曾希望再次向中国出售其不太先进的H20芯片,但该公司并未在周六于上海开幕的世界人工智能大会上设置展位。
|
||||||
|
- [欧洲对“不平衡”的美欧贸易协议表示不满](https://www.cnbc.com/2025/07/28/us-trade-deal-offers-initial-relief-leaves-europe-on-the-backfoot.html)
|
||||||
|
美欧周日宣布了一项贸易协议,其中包括15%的关税税率。
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
---
|
||||||
|
title: 2024-12-07-victoria
|
||||||
|
created: 2024-12-07
|
||||||
|
updated: 2024-12-07
|
||||||
|
type: summary
|
||||||
|
tags: [[]]
|
||||||
|
external: http://go/ui/posts/102/
|
||||||
|
---
|
||||||
|
|
||||||
|
Here's the 8-item concise bulletin summary in Chinese and markdown format:
|
||||||
|
|
||||||
|
## 墨尔本和澳大利亚新闻简报
|
||||||
|
|
||||||
|
1. 🔥 **反犹太教堂纵火事件:反恐警察介入调查**
|
||||||
|
[链接](https://www.theage.com.au/national/victoria/in-the-wake-of-synagogue-attack-finger-pointing-and-grief-20241206-p5kwax.html)
|
||||||
|
墨尔本阿达斯以色列犹太教堂遭严重纵火,警方将以反恐方式调查这起被广泛谴责的反犹太主义袭击事件。
|
||||||
|
|
||||||
|
2. 💣 **青少年策划大规模谋杀,法庭拒绝保释**
|
||||||
|
[链接](https://www.theage.com.au/national/victoria/teen-accused-of-plotting-mass-murder-too-dangerous-to-be-released-on-bail-20241206-p5kwfo.html)
|
||||||
|
法庭认为该青少年囤积武器和爆炸物,存在导致"灾难性后果"的高风险,拒绝其保释。
|
||||||
|
|
||||||
|
3. 😢 **悼念拉奥斯假期悲剧:比安卡·琼斯获千人告别**
|
||||||
|
[链接](https://www.theage.com.au/national/victoria/grief-disbelief-and-a-shout-of-colour-bianca-jones-farewelled-after-laos-holiday-tragedy-20241206-p5kwgv.html)
|
||||||
|
逾1000人穿着鲜艳色彩,在墨尔本19岁女孩的前高中为她举行生命庆祝仪式。
|
||||||
|
|
||||||
|
4. 💸 **澳大利亚圣诞礼物浪费问题:价值10亿澳元**
|
||||||
|
[链接](https://www.sbs.com.au/news/article/a-1-billion-throwaway-christmas-problem-and-what-australians-think-of-gifts/lof5d4bn3)
|
||||||
|
超过四分之一的澳大利亚人将收到永远不会使用的节日礼物。
|
||||||
|
|
||||||
|
5. 🏦 **金融服务业隐藏的经济问题:财务滥用**
|
||||||
|
[链接](https://www.sbs.com.au/news/article/the-hidden-epidemic-impacting-millions-and-how-banks-and-super-funds-can-help/m71l9njf5)
|
||||||
|
联邦议会调查发现金融服务业存在广泛的财务虐待问题。
|
||||||
|
|
||||||
|
6. 🎉 **亿万富翁派对:阿德里安·波尔特利通宵狂欢**
|
||||||
|
[链接](https://www.theage.com.au/national/victoria/lambo-guy-adrian-portelli-s-light-party-keeps-the-city-awake-20241206-p5kwdx.html)
|
||||||
|
billionaire在penthouse举办激光灯光派对,惊扰墨尔本市民。
|
||||||
|
|
||||||
|
7. 📚 **墨尔本NAPLAN高绩效学校排名**
|
||||||
|
[链接](https://www.theage.com.au/national/victoria/the-high-performing-naplan-schools-in-your-area-20241206-p5kwcv.html)
|
||||||
|
奥克利南小学从濒临关闭到成为consistently强劲的教育机构。
|
||||||
|
|
||||||
|
8. 🏛️ **政治评论:阿尔巴尼斯领导力讨论**
|
||||||
|
[链接](https://www.theage.com.au/national/victoria/wave-of-hope-largely-lost-in-undertow-of-shortcomings-20241206-p5kwh0.html)
|
||||||
|
读者就澳大利亚总理的领导风格展开讨论。
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
---
|
||||||
|
title: 2025-07-29-world-painting
|
||||||
|
created: 2025-07-29
|
||||||
|
updated: 2025-07-29
|
||||||
|
type: summary
|
||||||
|
tags: ["AI", "painting", "world"]
|
||||||
|
external: http://go/ui/posts/1020/
|
||||||
|
---
|
||||||
|
|
||||||
|
## 梅杜莎之筏
|
||||||
|
《梅杜莎之筏》是法国浪漫主义画家西奥多·籍里柯于1819年创作的巨幅油画。这幅画描绘了法国海军“梅杜莎”号巡防舰在1816年于西非海岸触礁沉没后,幸存者们在一艘临时木筏上漂流的悲惨场景。画作以其强烈的戏剧性、生动的人物表情和构图,展现了人类在绝望中挣扎求生的力量,同时也揭露了当时政府的腐败和无能。这幅画不仅是浪漫主义艺术的代表作,更是一部具有深刻社会批判意义的杰作,非常适合引导孩子思考人性和历史事件。
|
||||||
|
|
||||||
|
名画URL : <https://www.nbfox.com/the-raft-of-the-medusa/>
|
||||||
|
搜索名画: <https://go.junv.cc/gi/梅杜莎之筏>
|
||||||
|
|
||||||
|
------
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
---
|
||||||
|
title: 蒙特雷湾水族馆馆内餐饮服务详尽指南:省时高效、健康美味且适合家庭游客的用餐选择
|
||||||
|
created: 2025-07-29
|
||||||
|
updated: 2025-07-29
|
||||||
|
type: summary
|
||||||
|
tags: ["aquarium", "dining", "family", "notes", "telegram"]
|
||||||
|
external: http://go/ui/posts/1021/
|
||||||
|
---
|
||||||
|
|
||||||
|
非常明智的选择!Monterey Bay Aquarium **馆内确实有餐饮服务**,可以让你们不出门、节省时间,一边欣赏美景一边解决午餐。
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🍴 蒙特雷水族馆内的餐饮选项(截至2025年):
|
||||||
|
|
||||||
|
### 1. **Café at the Aquarium**(主餐厅)
|
||||||
|
|
||||||
|
* 📍位置:水族馆中部一层(靠近海边露台)
|
||||||
|
* 🍽️ 餐点:健康、可持续海鲜为特色的简餐
|
||||||
|
|
||||||
|
* 三明治(鸡肉、金枪鱼)
|
||||||
|
* 沙拉(藜麦沙拉、海藻沙拉)
|
||||||
|
* 热汤(蛤蜊浓汤等)
|
||||||
|
* 简单意面和儿童菜单(如奶酪通心粉)
|
||||||
|
* ☕ 饮品:咖啡、茶、水、果汁、汽水等
|
||||||
|
* 🌊 有少量靠窗或户外座位,可俯瞰太平洋,非常适合边休息边赏景
|
||||||
|
|
||||||
|
### 2. **The Coffee Bar**
|
||||||
|
|
||||||
|
* 📍位置:入口附近
|
||||||
|
* 🍩 提供速食饮品和甜点,如:
|
||||||
|
|
||||||
|
* 面包圈、松饼、果汁、咖啡
|
||||||
|
* 适合简单早点或孩子下午点心
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🧒 家庭友好性:
|
||||||
|
|
||||||
|
* 提供儿童餐(小份、简餐、营养搭配)
|
||||||
|
* 有婴儿椅、推车友好、厕所配儿童设施
|
||||||
|
* 所有包装几乎都使用环保材料
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🕰️ 时间建议:
|
||||||
|
|
||||||
|
| 时间 | 建议安排 |
|
||||||
|
| ------------- | ---------------------- |
|
||||||
|
| 10:30 – 12:30 | 深度游览主要展区(如:海獭、章鱼、深海鱼缸) |
|
||||||
|
| 12:30 – 13:15 | 在馆内 Café 吃午餐 |
|
||||||
|
| 13:15 – 14:00 | 继续参观边缘展区 + 纪念品店 |
|
||||||
|
|
||||||
|
> 🚨 高峰时间建议早点去 Café(如12点前),否则队伍会变长,可能需要排 10–20 分钟。
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## ✅ 总结优点:
|
||||||
|
|
||||||
|
* **省时高效**(无须出馆找餐厅或找车位)
|
||||||
|
* **环境优美**(大窗看海)
|
||||||
|
* **健康饮食**(以本地海鲜与可持续菜单为主)
|
||||||
|
* **适合孩子**(菜单简单、环境安全)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
是否需要我结合这个安排更新你的整个行程时间表?或者你也可以告诉我孩子有没有饮食偏好,我可以帮你推荐合适菜品。
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
---
|
||||||
|
title: 2025-07-30-technology
|
||||||
|
created: 2025-07-30
|
||||||
|
updated: 2025-07-30
|
||||||
|
type: summary
|
||||||
|
tags: ["newsletter", "technology"]
|
||||||
|
external: http://go/ui/posts/1022/
|
||||||
|
---
|
||||||
|
|
||||||
|
**科技新闻**
|
||||||
|
- [AI热潮引发电力成本分摊争议](https://www.wsj.com/business/energy-oil/ai-data-center-power-costs-bbfcd862?mod=rss_Technology)
|
||||||
|
随着AI热潮推动数据中心建设,科技公司与公用事业公司就不断飙升的电力成本分摊问题产生分歧。
|
||||||
|
- [Cadence Design Systems承认违规出口,将支付1.406亿美元](https://www.wsj.com/business/earnings/cadence-design-systems-ups-outlook-amid-increasing-ai-demand-f6782414?mod=rss_Technology)
|
||||||
|
Cadence Design Systems承认违反出口规定,将支付1.406亿美元罚款,涉及非法向中国出口产品。
|
||||||
|
- [印度在对美智能手机出口方面超越中国](https://www.cnbc.com/2025/07/29/india-surpasses-chinese-smartphone-shipments-to-us.html)
|
||||||
|
报告显示,印度在对美智能手机出口方面超越中国,其制造业产量激增240%,第二季度占美国进口总额的44%。
|
||||||
|
- [欧洲斥巨资建设“千兆瓦”AI工厂](https://www.cnbc.com/2025/07/29/europe-sets-its-sights-on-multi-billion-euro-gigawatt-ai-factories.html)
|
||||||
|
为追赶AI领域,欧洲计划投资数十亿欧元建设“千兆瓦工厂”,预计将使其总计算能力增加15%。
|
||||||
|
- [Meta在AI上的巨额投入成华尔街关注焦点](https://www.cnbc.com/2025/07/29/meta-ai-q2-earnings.html)
|
||||||
|
Meta首席执行官马克·扎克伯格在AI领域的招聘扩张将成为投资者关注第二季度财报的焦点。
|
||||||
|
- [稀土作为中国贸易战筹码,美国力求解决依赖问题](https://www.cnbc.com/2025/07/29/rare-earths-china-bargaining-chip-trade-war-us.html)
|
||||||
|
中国在全球稀土开采和加工中占据主导地位,美国正通过投资国内供应链,试图减少对中国的稀土依赖。
|
||||||
|
- [Waymo计划2026年将机器人出租车服务引入达拉斯](https://www.cnbc.com/2025/07/28/waymo-plans-to-bring-its-robotaxi-service-to-dallas-in-2026.html)
|
||||||
|
Waymo宣布计划于2026年在达拉斯推出其自动驾驶出租车服务,并与Avis合作进行车队管理。
|
||||||
|
- [苹果高估值驱动力——服务业务面临威胁](https://www.wsj.com/tech/apple-stock-service-value-growth-analysis-f265a5e7?mod=rss_Technology)
|
||||||
|
本周苹果财报预计将更新其利润丰厚的服务业务情况,该业务是iPhone制造商估值飙升的主要驱动力。
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
---
|
||||||
|
title: 2025-07-30-chinese-painting
|
||||||
|
created: 2025-07-30
|
||||||
|
updated: 2025-07-30
|
||||||
|
type: summary
|
||||||
|
tags: ["AI", "china", "painting"]
|
||||||
|
external: http://go/ui/posts/1023/
|
||||||
|
---
|
||||||
|
|
||||||
|
## 清院本清明上河图
|
||||||
|
《清院本清明上河图》是清乾隆元年(1736年)由清宫画院画家陈枚、孙祜、金昆、戴洪、程志道奉敕合绘的清代版本《清明上河图》。此版本在承袭宋本《清明上河图》的基础上,融入了清代的城市风貌、建筑、人物服饰、生活习俗等元素,并加入了西式建筑和西洋画法,使得画面内容更加丰富,色彩也更为华丽。它展现了清代盛世时期京城繁华的景象,是研究清代社会生活的重要图像资料。
|
||||||
|
|
||||||
|
古画URL : https://www.dpm.org.cn/collection/paint/258169.html
|
||||||
|
搜索古画: https://go.junv.cc/gi/清院本清明上河图
|
||||||
|
|
||||||
|
------
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
---
|
||||||
|
title: 2025-07-30-world_news
|
||||||
|
created: 2025-07-30
|
||||||
|
updated: 2025-07-30
|
||||||
|
type: summary
|
||||||
|
tags: ["newsletter", "world_news"]
|
||||||
|
external: http://go/ui/posts/1024/
|
||||||
|
---
|
||||||
|
|
||||||
|
# 世界要闻速览
|
||||||
|
|
||||||
|
- [泰国指责柬埔寨违反停火协议,柬方否认](https://www.bbc.com/news/articles/cly4l7j3e8zo)
|
||||||
|
泰国称柬埔寨违反停火数小时的协议,而柬埔寨则表示午夜停火后双方未发生武装冲突。
|
||||||
|
- [欧盟-美国贸易协议引关注,英国或成意外赢家](https://www.cnbc.com/2025/07/29/the-eu-us-trade-deal-could-have-one-unexpected-winner-the-uk.html)
|
||||||
|
欧盟与美国间的贸易协议引发疑虑,但英国可能成为意外受益者;同时,制药巨头呼吁明确关税政策以确保协议顺利。
|
||||||
|
- [北京洪灾致30人死亡,中国面临极端天气挑战](https://www.bbc.com/news/articles/cg7j8x3xnrko)
|
||||||
|
持续强降雨导致北京洪灾,至少30人死亡,凸显中国今夏极端天气严峻。
|
||||||
|
- [尼日利亚绑匪在收到赎金后仍杀害35名人质](https://www.bbc.com/news/articles/cm2vyw9prlzo)
|
||||||
|
当地官员称,尼日利亚绑匪在收到赎金后,仍残忍杀害了35名人质。
|
||||||
|
- [特朗普称全球贸易协议将于周五完成,但对华协议或需更久](https://www.cnbc.com/2025/07/29/trump-trade-tariffs-china-lutnick.html)
|
||||||
|
一位贸易官员表示,特朗普总统追求对美更有利条款,预计全球贸易协议将很快敲定,但与中国的谈判将耗时更长。
|
||||||
|
- [联合国专家警告加沙地带“正在发生”饥荒](https://www.bbc.com/news/articles/cvgvxgl5zxpo)
|
||||||
|
联合国支持的专家警告,加沙地带目前正面临饥荒,援助机构称以色列近期增加援助的措施仍不足够。
|
||||||
|
- [英国计划承认巴勒斯坦国,或成英外交政策重大转变](https://www.bbc.com/news/videos/cdxyvndz4gjo)
|
||||||
|
英国首相表示,除非以色列采取实质性措施结束加沙局势,否则英国将于9月承认巴勒斯坦国。
|
||||||
|
- [教宗:人工智能发展须保护人类尊严](https://www.bbc.com/news/articles/cj4wv9xvr4zo)
|
||||||
|
教宗在梵蒂冈首次为社交媒体影响者举行的弥撒中,警告新兴技术可能带来的伦理挑战。
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
---
|
||||||
|
title: 2025-07-30-world-painting
|
||||||
|
created: 2025-07-30
|
||||||
|
updated: 2025-07-30
|
||||||
|
type: summary
|
||||||
|
tags: ["AI", "painting", "world"]
|
||||||
|
external: http://go/ui/posts/1025/
|
||||||
|
---
|
||||||
|
|
||||||
|
## 吃土豆的人
|
||||||
|
《吃土豆的人》是荷兰后印象派画家文森特·梵高在1885年创作的油画。这幅画描绘了荷兰农民家庭在昏暗的灯光下围坐在一起,分享他们简单的一餐——土豆。梵高希望通过这幅画,展现农民的真实生活和他们通过辛勤劳动获得食物的朴实。这幅画的色彩运用和人物描绘,都体现了梵高早期作品的写实风格,以及他对普通劳动人民的同情和关注。通过这幅画,你的孩子可以了解到19世纪荷兰农民的生活状态,以及梵高如何用艺术表达对底层人民的关怀,同时也能观察到光影和色彩在绘画中的运用。
|
||||||
|
|
||||||
|
名画URL : <https://artsandculture.google.com/asset/the-potato-eaters-vincent-van-gogh/rQE6qmf9oVuKPA?hl=en>
|
||||||
|
搜索名画: <https://go.junv.cc/gi/吃土豆的人>
|
||||||
|
|
||||||
|
------
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
---
|
||||||
|
title: 2025-07-31-technology
|
||||||
|
created: 2025-07-31
|
||||||
|
updated: 2025-07-31
|
||||||
|
type: summary
|
||||||
|
tags: ["newsletter", "technology"]
|
||||||
|
external: http://go/ui/posts/1026/
|
||||||
|
---
|
||||||
|
|
||||||
|
** 科技新闻**
|
||||||
|
- [印度智能手机对美出口量超越中国](https://www.cnbc.com/2025/07/29/india-surpasses-chinese-smartphone-shipments-to-us.html)
|
||||||
|
报告显示,印度制造的智能手机在第二季度占美国进口量的44%,较去年同期显著增长240%。
|
||||||
|
- [中国积极备战与美国的AI竞赛](https://www.wsj.com/tech/ai/how-china-is-girding-for-an-ai-battle-with-the-u-s-5b23af51?mod=rss_Technology)
|
||||||
|
面对华盛顿的限制,北京正加大投入建设不依赖美国技术的人工智能生态系统。
|
||||||
|
- [LG新能源签署43亿美元电池供应协议](https://www.cnbc.com/2025/07/30/lg-energy-solution-signs-battery-supply-deal.html)
|
||||||
|
韩国LG新能源公司与未知方签署了一项价值43亿美元的电池供应协议,合同期限最长可延长七年。
|
||||||
|
- [AI金融应用Ramp融资后估值达225亿美元](https://www.wsj.com/articles/ai-finance-app-ramp-is-valued-at-22-5-billion-in-funding-round-5a4269cb?mod=rss_Technology)
|
||||||
|
Ramp在最新一轮融资中筹集5亿美元,用于进一步开发基于AI的代理,估值达到225亿美元。
|
||||||
|
- [华尔街施压苹果,要求明确AI战略](https://www.cnbc.com/2025/07/30/apple-ai-hardware-devices.html)
|
||||||
|
分析师开始质疑苹果在核心业务受影响前,还有多少时间来制定其人工智能战略。
|
||||||
|
- [iPhone制造商富士康进军万亿美元AI数据中心市场](https://www.cnbc.com/2025/07/30/iphone-maker-foxconn-makes-a-major-play-for-the-ai-data-center.html)
|
||||||
|
富士康通过股份互换方式持有TECO 10%股权,将专注于在全球(包括美国)建设数据中心。
|
||||||
|
- [Palo Alto Networks宣布250亿美元收购CyberArk后股价下跌](https://www.cnbc.com/2025/07/30/palo-alto-networks-cyberark-deal.html)
|
||||||
|
网络安全巨头Palo Alto Networks宣布以250亿美元收购以色列网络安全提供商CyberArk。
|
||||||
|
- [Meta旗下Reality Labs第二季度亏损45.3亿美元](https://www.cnbc.com/2025/07/30/metas-reality-labs-second-quarter-2025.html)
|
||||||
|
Meta公司负责元宇宙业务的Reality Labs在第二季度报告了45.3亿美元的运营亏损。
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
---
|
||||||
|
title: 2025-07-31-chinese-painting
|
||||||
|
created: 2025-07-31
|
||||||
|
updated: 2025-07-31
|
||||||
|
type: summary
|
||||||
|
tags: ["AI", "china", "painting"]
|
||||||
|
external: http://go/ui/posts/1027/
|
||||||
|
---
|
||||||
|
|
||||||
|
## 柳鸦芦雁图
|
||||||
|
《柳鸦芦雁图》是宋徽宗赵佶的代表作之一,画卷分为两段,前段绘柳树与乌鸦,后段绘芦苇与大雁。宋徽宗以其独特的“瘦金体”书法题写画名,画中柳鸦飞舞,芦雁憩息,构图精巧,意境深远。这幅画展现了宋代花鸟画的极致,体现了宋徽宗对自然细致入微的观察和精湛的绘画技艺。通过这幅画,您的孩子可以领略中国古代花鸟画的魅力,感受宋代文人雅士的生活情趣,并了解宋徽宗这位皇帝艺术家的非凡才华。
|
||||||
|
|
||||||
|
古画URL : <https://www.jiguzuo.com/guohua/zhao-ji-liu-ya-lu-yan-tu.html>
|
||||||
|
搜索古画: <https://go.junv.cc/gi/柳鸦芦雁图>
|
||||||
|
|
||||||
|
------
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
---
|
||||||
|
title: 2025-07-31-victoria
|
||||||
|
created: 2025-07-31
|
||||||
|
updated: 2025-07-31
|
||||||
|
type: summary
|
||||||
|
tags: ["local_news", "newsletter"]
|
||||||
|
external: http://go/ui/posts/1028/
|
||||||
|
---
|
||||||
|
|
||||||
|
# 大新闻
|
||||||
|
- [澳洲各地巴勒斯坦声援活动持续,总理呼吁理性,警方拟阻悉尼海港大桥游行](https://www.theage.com.au/national/victoria/premier-labels-pro-palestine-protesters-who-rallied-at-ngv-extremists-and-antisemitic-20250729-p5mil1.html?ref=rss&utm_medium=rss&utm_source=rss_national_victoria)
|
||||||
|
维州州长谴责墨尔本国家美术馆(NGV)外的亲巴勒斯坦抗议者为“极端分子”和“反犹太主义者”,而警方计划阻止悉尼海港大桥的游行。同时,澳大利亚国内要求政府效仿英国,承认巴勒斯坦国。
|
||||||
|
- [托儿机构被指存在“掩盖文化”,或将儿童安全置于风险](https://www.theage.com.au/national/victoria/staff-accuse-childcare-chains-of-culture-of-cover-ups-20250729-p5mipb.html?ref=rss&utm_medium=rss&utm_source=rss_national_victoria)
|
||||||
|
内部文件显示,大型托儿连锁机构Affinity被指引员工在通知警方儿童安全指控前,优先考虑声誉受损。
|
||||||
|
- [墨尔本亚拉河谷男子持刀袭姐,遭警方击毙](https://www.theage.com.au/national/victoria/man-shot-dead-by-police-after-confrontation-in-melbourne-s-outer-east-20250730-p5mj40.html?ref=rss&utm_medium=rss&utm_source=rss_national_victoria)
|
||||||
|
一名男子在亚拉河谷家中持剑袭击并勒住其妹妹,警方介入后将其击毙,其妹妹受重伤。
|
||||||
|
- [澳外交部会见以色列大使,回应否认加沙饥荒言论](https://www.sbs.com.au/news/article/dfat-meets-with-israels-ambassador-after-statements-denying-starvation-in-gaza/92v8ersbv)
|
||||||
|
澳大利亚外交贸易部会见以色列大使,此前以色列使团副团长否认加沙存在饥荒的言论,被澳洲总理阿尔巴尼斯斥为“不可理喻”。
|
||||||
|
- [澳政府推行青少年社交媒体禁令,YouTube称“并非社交媒体”](https://www.sbs.com.au/news/article/youtube-will-be-included-in-the-under-16s-social-media-ban/vez5w8g0a)
|
||||||
|
随着联邦政府针对16岁以下青少年的社交媒体禁令生效,YouTube辩称其不属于社交媒体平台,但政府强调不会妥协。
|
||||||
|
- [住房压力影响墨尔本生育率,部分城郊出生率最低](https://www.theage.com.au/national/victoria/the-lowest-and-highest-birth-rates-in-melbourne-by-suburb-20250724-p5mheu.html?ref=rss&utm_medium=rss&utm_source=rss_national_victoria)
|
||||||
|
新分析显示,除少数最经济实惠的城郊外,住房压力可能导致墨尔本人一生中生育的孩子数量减少。
|
||||||
|
- [维州学生NAPLAN成绩显著提升,全国整体表现停滞](https://www.theage.com.au/national/victoria/victorian-kids-the-bright-sparks-as-naplan-fails-to-shine-20250728-p5mifi.html?ref=rss&utm_medium=rss&utm_source=rss_national_victoria)
|
||||||
|
在全国NAPLAN基准测试结果停滞不前的情况下,维多利亚州学生表现出显著进步。
|
||||||
|
- [墨尔本两律师因涉嫌向法庭撒谎将受审](https://www.theage.com.au/national/victoria/make-up-a-reason-melbourne-lawyers-to-stand-trial-over-alleged-lies-to-court-20250729-p5milh.html?ref=rss&utm_medium=rss&utm_source=rss_national_victoria)
|
||||||
|
两名墨尔本律师被指控就客户缺席法庭一事编造车祸理由,将面临审判。
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
---
|
||||||
|
title: 2025-07-31-world_news
|
||||||
|
created: 2025-07-31
|
||||||
|
updated: 2025-07-31
|
||||||
|
type: summary
|
||||||
|
tags: ["newsletter", "world_news"]
|
||||||
|
external: http://go/ui/posts/1029/
|
||||||
|
---
|
||||||
|
|
||||||
|
# 全球要闻速览
|
||||||
|
|
||||||
|
- [Meta宣布AI投入将持续至2026年,以应对日益激烈的市场竞争](https://www.cnbc.com/2025/07/30/metas-big-ai-spending-blitz-will-continue-into-2026-.html)
|
||||||
|
Meta首席执行官马克·扎克伯格表示,公司将把人工智能方面的巨额投入持续到明年,以效仿其他科技巨头。
|
||||||
|
- [美国与韩国达成贸易协议,对韩关税降至15%](https://www.cnbc.com/2025/07/31/trump-announces-trade-deal-with-south-korea-setting-tariffs-at-15percent.html)
|
||||||
|
根据该协议,对韩国的关税将从此前特朗普威胁的25%降至15%。
|
||||||
|
- [中国7月制造业活动连续第四个月收缩,降幅超预期](https://www.cnbc.com/2025/07/31/chinas-july-manufacturing-activity-contracts-more-than-expected-fourth-straight-month-of-dec.html)
|
||||||
|
中国7月份官方制造业采购经理指数(PMI)为49.3,低于路透社调查预测的49.7。
|
||||||
|
- [Meta和微软业绩超预期后,标普500指数期货上涨](https://www.cnbc.com/2025/07/30/stock-market-today-live-updates.html)
|
||||||
|
科技巨头Meta Platforms和微软周三下午公布了强劲的季度业绩,两家公司股价在盘后交易中均大幅上涨。
|
||||||
|
- [三星利润腰斩,芯片业务暴跌94%不及预期](https://www.cnbc.com/2025/07/31/samsung-second-quarter-profit-halves-missing-expectations.html)
|
||||||
|
三星电子第二季度营业利润不及预期,较去年同期腰斩。
|
||||||
|
- [美国对印度征收高额关税,新德里未急于与华盛顿达成协议](https://www.cnbc.com/2025/07/25/india-under-pressure-to-seal-trade-deal-with-us-as-deadline-looms.html)
|
||||||
|
美国总统唐纳德·特朗普周三宣布对从印度进口的商品征收25%的关税。
|
||||||
|
- [加沙民防部称至少30人在等待援助时被以色列火力打死](https://www.bbc.com/news/articles/c74d82pdxjzo?at_medium=RSS&at_campaign=rss)
|
||||||
|
以色列表示正在调查此事,但“不清楚”是否有以色列枪击造成的伤亡。
|
||||||
|
- [乌克兰官员称俄罗斯袭击基辅造成至少6人死亡、50多人受伤](https://www.bbc.com/news/articles/ce930z8g9mvo?at_medium=RSS&at_campaign=rss)
|
||||||
|
俄罗斯的无人机和导弹袭击在基辅造成了20多个地点的破坏。
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
---
|
||||||
|
title: 2024-12-07-world_news
|
||||||
|
created: 2024-12-07
|
||||||
|
updated: 2024-12-07
|
||||||
|
type: summary
|
||||||
|
tags: [[]]
|
||||||
|
external: http://go/ui/posts/103/
|
||||||
|
---
|
||||||
|
|
||||||
|
## 八条世界新闻简报 (Eight World News Headlines)
|
||||||
|
|
||||||
|
**简体中文 (Simplified Chinese):**
|
||||||
|
|
||||||
|
1. **罗马尼亚总统选举结果被推翻:** 罗马尼亚最高法院宣布总统选举第一轮结果无效,需重新举行选举。[cnbc链接](https://www.cnbc.com/2024/12/06/romanian-top-court-annuls-presidential-election-result.html)
|
||||||
|
|
||||||
|
2. **OPEC+延迟增产:** OPEC+成员国决定将石油减产措施延长至4月份,以应对全球需求和地缘政治不确定性。[cnbc链接](https://www.cnbc.com/2024/12/06/opec-oil-output-delay-a-reality-check-as-group-eyes-demand-saudi.html) (包含多个重复新闻的合并)
|
||||||
|
|
||||||
|
3. **印度经济增长预期下调:** 印度央行下调2025年经济增长预期,但维持利率不变。[cnbc链接](https://www.cnbc.com/2024/12/06/india-keeps-interest-rate-unchanged-amid-rising-inflation-risks-and-a-slowing-economy-.html)
|
||||||
|
|
||||||
|
4. **特朗普任命新中国大使:** 美国候任总统特朗普选择前参议员大卫·珀杜担任驻华大使。[cnbc链接](https://www.cnbc.com/2024/12/06/trump-picks-former-senator-david-perdue-to-be-ambassador-to-china.html)
|
||||||
|
|
||||||
|
5. **叙利亚哈马市前总统雕像被推倒:** 反对派称已完全控制哈马市,并推倒了前总统的雕像。[bbc链接](https://www.bbc.com/news/videos/cgm9vkl743jo)
|
||||||
|
|
||||||
|
6. **UniCredit 或将展开双重并购:** UniCredit首席执行官安德烈亚·奥塞尔可能同时进行国内外两项大型并购。[cnbc链接](https://www.cnbc.com/2024/12/06/unicredits-orcel-could-still-sweeten-his-bid-and-take-on-a-double-ma-offensive.html) (包含多个重复新闻的合并)
|
||||||
|
|
||||||
|
7. **印度教徒抗议迫使穆斯林夫妇出售房屋:** 印度一起因邻里纠纷引发的抗议事件引发巨大争议。[bbc链接](https://www.bbc.com/news/articles/cp837p125ywo)
|
||||||
|
|
||||||
|
8. **Lizzo性骚扰案撤诉:** 法官裁定歌手Lizzo无需以个人身份承担诉讼责任。[bbc链接](https://www.bbc.com/news/articles/cvgnwynejd5o)
|
||||||
|
|
||||||
|
|
||||||
|
**Markdown Format:**
|
||||||
|
|
||||||
|
# 八条世界新闻简报 (Eight World News Headlines)
|
||||||
|
|
||||||
|
1. **罗马尼亚总统选举结果被推翻 (Romania's Presidential Election Result Overturned):** 罗马尼亚最高法院宣布总统选举第一轮结果无效,需重新举行选举。 [cnbc link](https://www.cnbc.com/2024/12/06/romanian-top-court-annuls-presidential-election-result.html)
|
||||||
|
|
||||||
|
2. **OPEC+延迟增产 (OPEC+ Delays Oil Production Increase):** OPEC+成员国决定将石油减产措施延长至4月份,以应对全球需求和地缘政治不确定性。(Merges multiple similar news items) [cnbc link](https://www.cnbc.com/2024/12/06/opec-oil-output-delay-a-reality-check-as-group-eyes-demand-saudi.html)
|
||||||
|
|
||||||
|
3. **印度经济增长预期下调 (India's Economic Growth Forecast Revised Down):** 印度央行下调2025年经济增长预期,但维持利率不变。 [cnbc link](https://www.cnbc.com/2024/12/06/india-keeps-interest-rate-unchanged-amid-rising-inflation-risks-and-a-slowing-economy-.html)
|
||||||
|
|
||||||
|
4. **特朗普任命新中国大使 (Trump Appoints New Ambassador to China):** 美国候任总统特朗普选择前参议员大卫·珀杜担任驻华大使。 [cnbc link](https://www.cnbc.com/2024/12/06/trump-picks-former-senator-david-perdue-to-be-ambassador-to-china.html)
|
||||||
|
|
||||||
|
5. **叙利亚哈马市前总统雕像被推倒 (Statue of Former Syrian President Toppled in Hama):** 反对派称已完全控制哈马市,并推倒了前总统的雕像。 [bbc link](https://www.bbc.com/news/videos/cgm9vkl743jo)
|
||||||
|
|
||||||
|
6. **UniCredit 或将展开双重并购 (UniCredit Could Undertake Double M&A Offensive):** UniCredit首席执行官安德烈亚·奥塞尔可能同时进行国内外两项大型并购。(Merges multiple similar news items) [cnbc link](https://www.cnbc.com/2024/12/06/unicredits-orcel-could-still-sweeten-his-bid-and-take-on-a-double-ma-offensive.html)
|
||||||
|
|
||||||
|
7. **印度教徒抗议迫使穆斯林夫妇出售房屋 (Hindu Protests Force Muslim Couple to Sell House):** 印度一起因邻里纠纷引发的抗议事件引发巨大争议。 [bbc link](https://www.bbc.com/news/articles/cp837p125ywo)
|
||||||
|
|
||||||
|
8. **Lizzo性骚扰案撤诉 (Harassment Case Against Lizzo Dropped):** 法官裁定歌手Lizzo无需以个人身份承担诉讼责任。 [bbc link](https://www.bbc.com/news/articles/cvgnwynejd5o)
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
---
|
||||||
|
title: 2025-07-31-world-painting
|
||||||
|
created: 2025-07-31
|
||||||
|
updated: 2025-07-31
|
||||||
|
type: summary
|
||||||
|
tags: ["AI", "painting", "world"]
|
||||||
|
external: http://go/ui/posts/1030/
|
||||||
|
---
|
||||||
|
|
||||||
|
《1808年5月3日的枪杀》是一幅由西班牙画家弗朗西斯科·戈雅创作的油画,完成于1814年。这幅画描绘了1808年5月3日,拿破仑军队占领马德里后,对西班牙起义者进行大规模处决的场景。画中,一名身穿白衣的男子高举双臂,面对着荷枪实弹的法国士兵,他的表情充满了恐惧和绝望,而他身旁和身下是已经倒下的受害者。画作通过强烈的对比和戏剧性的光影效果,揭示了战争的残酷和人性的光辉。
|
||||||
|
|
||||||
|
这幅画对于8岁的孩子来说,具有以下几个方面的教育意义:
|
||||||
|
|
||||||
|
* **历史知识**:让孩子了解欧洲历史上的拿破仑战争,以及西班牙人民反抗侵略的英勇斗争。
|
||||||
|
* **艺术表现**:通过画作的构图、色彩、光影和人物表情,让孩子感受艺术是如何表达情感和记录历史的。可以引导孩子观察画中白衣男子的姿势和表情,以及周围士兵的冷酷无情。
|
||||||
|
* **人文关怀**:这幅画能够启发孩子对生命、和平的思考,理解战争带来的痛苦和伤害,培养他们的同情心和对正义的追求。
|
||||||
|
* **绘画技巧**:虽然是名画,但其强烈的对比和清晰的人物形象,可以激发孩子对绘画的兴趣,尝试用画笔表达自己的感受。
|
||||||
|
|
||||||
|
以下是《1808年5月3日的枪杀》的详细信息:
|
||||||
|
|
||||||
|
## 1808年5月3日的枪杀
|
||||||
|
这幅画由西班牙画家弗朗西斯科·戈雅创作,描绘了西班牙人民在抵抗拿破仑侵略时,起义者被法国军队残酷枪杀的场景。这幅画不仅展现了历史事件的残酷性,也表达了画家对战争暴力的谴责和对受害者的同情。通过这幅画,孩子们可以了解到历史事件、战争的残酷以及艺术如何表达情感和记录历史。画中光线和人物的姿态都非常具有表现力,可以引导孩子观察艺术家的构图和色彩运用。
|
||||||
|
名画URL : <https://zh.wikipedia.org/zh-hans/File:El_Tres_de_Mayo,_by_Francisco_de_Goya,_from_Prado_thin_black_margin.jpg>
|
||||||
|
搜索名画: <https://go.junv.cc/gi/1808年5月3日的枪杀>
|
||||||
|
|
||||||
|
------
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
---
|
||||||
|
title: 2025-08-01-technology
|
||||||
|
created: 2025-08-01
|
||||||
|
updated: 2025-08-01
|
||||||
|
type: summary
|
||||||
|
tags: ["newsletter", "technology"]
|
||||||
|
external: http://go/ui/posts/1031/
|
||||||
|
---
|
||||||
|
|
||||||
|
** 科技新闻速览**
|
||||||
|
- [微软市值突破4万亿美元,Azure云营收强劲](https://www.wsj.com/tech/ai/microsoft-just-became-the-worlds-second-4-trillion-company-60592a04?mod=rss_Technology)
|
||||||
|
微软在发布超预期财报后,市值首次达到4万亿美元,其Azure云业务年收入突破750亿美元,凸显了AI驱动的强劲增长。
|
||||||
|
- [Meta AI巨额投入将持续至2026年](https://www.cnbc.com/2025/07/30/metas-big-ai-spending-blitz-will-continue-into-2026-.html)
|
||||||
|
Meta CEO扎克伯格表示,公司在人工智能领域的巨额支出将延续到明年,以应对日益激烈的竞争。
|
||||||
|
- [英伟达H20 AI芯片在华面临安全审查](https://www.wsj.com/tech/chinas-cybersecurity-regulator-summons-nvidia-over-chip-security-issue-23293fe7?mod=rss_Technology)
|
||||||
|
中国网络安全监管机构召见英伟达,要求解释其H20芯片在华销售相关的“后门安全风险”并提交相关文件。
|
||||||
|
- [OpenAI领衔欧洲大型AI数据中心,将配备10万枚英伟达芯片](https://www.cnbc.com/2025/07/31/openai-backs-ai-data-center-in-norway-with-100000-nvidia-gpus.html)
|
||||||
|
OpenAI宣布支持在挪威建设一座大型AI数据中心,该中心由Nscale和Aker设计建造,预计将容纳10万枚英伟达GPU。
|
||||||
|
- [三星利润腰斩不及预期,芯片业务暴跌94%](https://www.cnbc.com/2025/07/31/samsung-second-quarter-profit-halves-missing-expectations.html)
|
||||||
|
三星电子第二季度营业利润不及预期,同比缩水一半以上,其中芯片业务利润骤降94%。
|
||||||
|
- [英国监管机构:微软和亚马逊损害云市场竞争](https://www.cnbc.com/2025/07/31/uk-cma-cloud-ruling-microsoft-amazon.html)
|
||||||
|
英国竞争监管机构发现微软和亚马逊在云市场的主导地位可能损害竞争,呼吁进行深入调查。
|
||||||
|
- [科技巨头修订受审视的AI产品宣传词](https://www.wsj.com/articles/tech-giants-are-revising-ai-product-claims-that-faced-scrutiny-69f8671e?mod=rss_Technology)
|
||||||
|
面对广告行业组织的审查,苹果、谷歌、微软和三星等科技巨头正在修改其AI产品营销材料,以确保消费者能更好地评估相关主张。
|
||||||
|
- [Arm股价下跌,智能手机版税收入未达预期](https://www.cnbc.com/2025/07/30/arm-stock-q1-earnings.html)
|
||||||
|
Arm公司公布的营收未达分析师预期,主要是受到智能手机版税收入表现令人失望的影响,导致股价下滑。
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
---
|
||||||
|
title: 2025-08-01-chinese-painting
|
||||||
|
created: 2025-08-01
|
||||||
|
updated: 2025-08-01
|
||||||
|
type: summary
|
||||||
|
tags: ["AI", "china", "painting"]
|
||||||
|
external: http://go/ui/posts/1032/
|
||||||
|
---
|
||||||
|
|
||||||
|
## 写生蛱蝶图
|
||||||
|
《写生蛱蝶图》是北宋著名画家赵昌的代表作,赵昌以其精湛的“写生”技艺而闻名,人称“写生赵昌”。这幅画描绘了秋天野外花草与蝴蝶、蚱蜢等昆虫的生动景象。画中蛱蝶的翅膀薄如蝉翼,花纹绚丽,细致入微的刻画展现了画家高超的写生功底。这幅画不仅展现了中国古代花鸟画的精髓,也能让孩子观察到大自然中小昆虫的细微之处,培养他对自然的热爱和对艺术的欣赏。
|
||||||
|
|
||||||
|
古画URL : <https://www.dpm.org.cn/collection/paint/230459.html>
|
||||||
|
搜索古画: <https://go.junv.cc/gi/写生蛱蝶图>
|
||||||
|
|
||||||
|
------
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
---
|
||||||
|
title: 2025-08-01-victoria
|
||||||
|
created: 2025-08-01
|
||||||
|
updated: 2025-08-01
|
||||||
|
type: summary
|
||||||
|
tags: ["local_news", "newsletter"]
|
||||||
|
external: http://go/ui/posts/1033/
|
||||||
|
---
|
||||||
|
|
||||||
|
# 突发新闻
|
||||||
|
- [工党学生债务减免方案已通过,何时生效?](https://www.sbs.com.au/news/article/labor-has-passed-its-student-debt-cut-when-will-you-see-the-changes/73zlarrnq)
|
||||||
|
工党兑现了对年轻澳大利亚人的关键选举承诺,作为首要任务通过了学生债务减免法案。
|
||||||
|
- [ASIO局长警告国际间谍活动“无情”且代价高昂](https://www.sbs.com.au/news/article/tip-of-the-iceberg-asio-director-reveals-the-espionage-acts-costing-australia-billions/2hpogecyc)
|
||||||
|
澳大利亚安全情报组织(ASIO)总干事迈克·伯吉斯警告称,外国间谍机构正在“积极瞄准”多个领域,并对AUKUS协议表现出“非常不健康的兴趣”。
|
||||||
|
- [墨尔本:男子持武士刀袭击并勒颈妹妹后被警方击毙](https://www.theage.com.au/national/victoria/man-shot-dead-by-police-while-strangling-sister-he-also-attacked-with-samurai-sword-20250730-p5mj40.html)
|
||||||
|
在雅拉谷(Yarra Valley)的一处住宅内,一名女子在被其兄弟袭击后生命垂危,手臂部分被砍断。
|
||||||
|
- [墨尔本:黑帮成员光天化日之下遭枪杀,恐引发报复性袭击](https://www.theage.com.au/national/victoria/man-shot-dead-in-deliberate-targeted-daylight-attack-near-kindergarten-20250731-p5mj7t.html)
|
||||||
|
一名属于伊拉克籍黑帮头目Kazem “Kaz” Hamad旗下街头帮派的男子被枪杀,外界担心会引发报复性袭击。
|
||||||
|
- [Garma节:这个文化盛会如何塑造澳大利亚的未来?](https://www.sbs.com.au/news/article/what-is-garma-festival-the-cultural-gathering-shaping-australias-future/c48rdf1gw)
|
||||||
|
Garma节是澳大利亚最大的原住民文化聚会,每年在约尔古(Yolŋu)土地上举行,汇集了仪式、社区和国家对话,2025年将迎来其重要的25周年里程碑。
|
||||||
|
- [亲巴勒斯坦示威者悉尼海港大桥抗议案将提交最高法院](https://www.sbs.com.au/news/article/pro-palestinian-harbour-bridge-protest-case-to-face-supreme-court/16ztcdut1)
|
||||||
|
新南威尔士州最高法院将审议警方禁止抗议者穿越澳大利亚最知名地标之一的申请。
|
||||||
|
- [墨尔本:服用迷幻蘑菇茶后死亡,正在调查是否与“木材爱好者麻痹症”有关](https://www.theage.com.au/national/victoria/wood-lover-paralysis-probed-in-death-of-magic-mushroom-tea-drinker-20250731-p5mj52.html)
|
||||||
|
一名墨尔本母亲在健康静修营地饮用迷幻蘑菇茶后死亡,调查人员正在探究其是否经历了罕见的“木材爱好者麻痹症”,该症状可能导致肢体无力和影响呼吸。
|
||||||
|
- [墨尔本医院厕所偷拍:关键证据失踪,本可更早发现](https://www.theage.com.au/national/victoria/hospital-toilet-spying-could-have-been-sprung-sooner-but-a-key-piece-of-evidence-went-missing-20250728-p5miay.html)
|
||||||
|
皇家墨尔本医院员工被告知,一月份在重症监护室(ICU)卫生间发现了一部手机,但管理层承认现在不知道该设备在哪里。
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
---
|
||||||
|
title: 2025-08-01-world_news
|
||||||
|
created: 2025-08-01
|
||||||
|
updated: 2025-08-01
|
||||||
|
type: summary
|
||||||
|
tags: ["newsletter", "world_news"]
|
||||||
|
external: http://go/ui/posts/1034/
|
||||||
|
---
|
||||||
|
|
||||||
|
# 全球新闻速览
|
||||||
|
|
||||||
|
- [特朗普修改关税税率,全球企业及市场承压](https://www.cnbc.com/2025/08/01/how-asian-countries-are-reacting-to-trumps-latest-tariffs-announcement-as-deadline-looms.html)
|
||||||
|
美国总统特朗普调整多国关税税率,引发亚太市场下跌,全球企业高管正制定新策略应对贸易摩擦和政策不确定性,此前与特朗普的关税协议被形容为“震惊、混乱而空洞的胜利”。
|
||||||
|
- [强风暴袭击美国东海岸,街道和地铁系统被淹](https://www.bbc.com/news/videos/c2enxm0zr8ko?at_medium=RSS&at_campaign=rss)
|
||||||
|
强风暴系统袭击美国东海岸,纽约和新泽西州已发布紧急状态,多地街道和地铁系统被洪水淹没。
|
||||||
|
- [印度国营炼油厂暂停购买俄罗斯石油](https://www.cnbc.com/2025/08/01/indian-state-refiners-pause-russian-oil-purchases-reuters-reports.html)
|
||||||
|
据报道,由于7月份折扣收窄,且美国总统唐纳德·特朗普警告各国不要购买莫斯科石油,印度国营炼油厂已暂停购买俄罗斯石油。
|
||||||
|
- [加沙两名女童中弹身亡,BBC调查儿童枪击案](https://www.bbc.com/news/videos/cjelp738zd7o?at_medium=RSS&at_campaign=rss)
|
||||||
|
加沙地带两名女童莱恩和米拉在以色列国防军士兵附近中弹身亡。以色列军方表示禁止故意伤害平民,并将调查此案。BBC正深入调查数十起儿童枪击事件。
|
||||||
|
- [继TikTok之后,中国企业正利用AI进一步发展视频技术](https://www.cnbc.com/2025/08/01/after-tiktok-chinese-businesses-like-kling-ramp-up-ai-for-video.html)
|
||||||
|
中国公司正利用丰富的视频和游戏经验,加速开发用于生成视频和视觉效果的盈利AI工具,将视频技术推向新高度。
|
||||||
|
- [英伟达否认H20芯片存在“后门”以回应中方担忧](https://www.cnbc.com/2025/07/31/china-probes-nvidia-h20-chips-for-tracking-risks.html)
|
||||||
|
针对北京方面提出的安全隐患,英伟达否认其出口中国的H20 AI芯片存在“后门”,并已就潜在的国家安全风险与中方官员会面。
|
||||||
|
- [白宫公布2亿美元新宴会厅建设计划](https://www.bbc.com/news/articles/c2l7dey54zjo?at_medium=RSS&at_campaign=rss)
|
||||||
|
白宫公布了建设耗资2亿美元的新宴会厅的计划,此前唐纳德·特朗普近十年来一直呼吁建造新宴会厅。
|
||||||
|
- [社交媒体谣言导致日本夏季旅游骤降](https://www.cnbc.com/2025/07/31/asian-visitors-to-japan-fell-because-of-a-manga-prediction-heres-why.html)
|
||||||
|
由于社交媒体上流传的漫画预言“2025年7月日本将发生灾难”,6月份赴日游客兴趣大幅下降。
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
---
|
||||||
|
title: 2025-08-01-world-painting
|
||||||
|
created: 2025-08-01
|
||||||
|
updated: 2025-08-01
|
||||||
|
type: summary
|
||||||
|
tags: ["AI", "painting", "world"]
|
||||||
|
external: http://go/ui/posts/1035/
|
||||||
|
---
|
||||||
|
|
||||||
|
## 干草车 (The Hay Wain)
|
||||||
|
《干草车》是英国浪漫主义风景画家约翰·康斯太勃尔的代表作之一,完成于1821年。这幅画描绘了英格兰萨福克郡和埃塞克斯郡之间斯陶尔河畔的乡村景色,画面中一辆装满干草的马车正穿过浅浅的河流。这幅画以其自然主义的光线、色彩和对日常乡村生活的细腻描绘而闻名,展现了画家对家乡景色的深厚情感和对自然光的敏锐观察,是英国风景画的经典之作,也体现了工业革命前英国乡村的田园风光。
|
||||||
|
|
||||||
|
名画URL : <https://upload.wikimedia.org/wikipedia/commons/e/ea/John_Constable_The_Hay_Wain.jpg>
|
||||||
|
搜索名画: <https://go.junv.cc/gi/干草车>
|
||||||
|
|
||||||
|
------
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
---
|
||||||
|
title: 2025-08-02-technology
|
||||||
|
created: 2025-08-02
|
||||||
|
updated: 2025-08-02
|
||||||
|
type: summary
|
||||||
|
tags: ["newsletter", "technology"]
|
||||||
|
external: http://go/ui/posts/1036/
|
||||||
|
---
|
||||||
|
|
||||||
|
**Tech news**
|
||||||
|
- [特斯拉自动驾驶致死事故索赔3.45亿美元](https://www.cnbc.com/2025/07/31/tesla-autopilot-plaintiffs-seek-345-million-over-fatal-florida-crash.html)
|
||||||
|
一起特斯拉Autopilot自动驾驶系统致死事故的庭审已开始陪审团审议,原告要求3.45亿美元赔偿。
|
||||||
|
- [科技巨头斥资4000亿美元押注AI获华尔街认可](https://www.wsj.com/tech/ai/tech-ai-spending-company-valuations-7b92104b?mod=rss_Technology)
|
||||||
|
微软和英伟达市值突破4万亿美元,Meta逼近2万亿美元,华尔街看好科技公司在AI领域的巨额投资。
|
||||||
|
- [Figma IPO大涨,顶级风投账面获利240亿美元](https://www.cnbc.com/2025/07/31/figmas-top-vcs-sitting-on-20-billion-in-stock-after-ipo-pop.html)
|
||||||
|
在经历长时间的IPO低迷后,Figma的成功上市让其顶级风险投资公司获得了数十亿美元的回报。
|
||||||
|
- [亚马逊云计算业务AWS增长18%,零售主导地位面临挑战](https://www.cnbc.com/2025/07/31/aws-q2-2025-earnings-report-amazon-cloud.html)
|
||||||
|
亚马逊云服务AWS第二季度营收超300亿美元,增长18%;但相比微软和谷歌在AI领域的云增长,亚马逊在AI势头方面仍显不足。
|
||||||
|
- [英伟达否认对华H20芯片存在“后门”](https://www.cnbc.com/2025/07/31/china-probes-nvidia-h20-chips-for-tracking-risks.html)
|
||||||
|
针对北京方面的安全担忧,英伟达否认其销往中国的H20 AI芯片存在“后门”,并与中方官员进行了会晤。
|
||||||
|
- [任天堂季度营收翻倍,Switch 2销量达580万台](https://www.cnbc.com/2025/08/01/nintendo-earnings-q1-2025.html)
|
||||||
|
受新一代Switch 2主机热销的推动,任天堂本季度营收翻番,股价今年已上涨约40%。
|
||||||
|
- [硅谷新战略:慢工出细活,专注于基础设施建设](https://www.wsj.com/tech/ai/silicon-valley-ai-infrastructure-capex-cffe0431?mod=rss_Technology)
|
||||||
|
科技巨头正转变为基础设施公司,效仿昔日的钢铁和铁路巨头,将重心放在长期建设上。
|
||||||
|
- [人机关系不再是科幻,人们与AI建立情感连接](https://www.cnbc.com/2025/08/01/human-ai-relationships-love-nomi.html)
|
||||||
|
自ChatGPT推出以来,普通人开始与聊天机器人建立情感联系,将其视为深厚的友谊甚至生活伴侣。
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
---
|
||||||
|
title: 2025-08-02-chinese-painting
|
||||||
|
created: 2025-08-02
|
||||||
|
updated: 2025-08-02
|
||||||
|
type: summary
|
||||||
|
tags: ["AI", "china", "painting"]
|
||||||
|
external: http://go/ui/posts/1037/
|
||||||
|
---
|
||||||
|
|
||||||
|
好的,我为您推荐了《潇湘卧游图》。这幅画能够帮助您的孩子了解中国山水画的意境之美和古人寄情山水的生活雅趣。
|
||||||
|
|
||||||
|
以下是关于《潇湘卧游图》的详细信息:
|
||||||
|
|
||||||
|
## 潇湘卧游图
|
||||||
|
《潇湘卧游图》是一幅描绘中国古代潇湘地区壮丽山水景色的画作。画中展现了烟波浩渺的江面、连绵起伏的山峦以及富有诗意的自然风光。这幅画能够帮助孩子感受中国山水画的意境之美,了解古人寄情山水、卧游林泉的雅致生活,同时也可以激发他对中国地理和传统文化的兴趣。
|
||||||
|
|
||||||
|
古画URL : <http://www.aihuahua.net/ziyuan/guohua/10617.html>
|
||||||
|
搜索古画: <https://go.junv.cc/gi/潇湘卧游图>
|
||||||
|
|
||||||
|
------
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
---
|
||||||
|
title: 2025-08-02-victoria
|
||||||
|
created: 2025-08-02
|
||||||
|
updated: 2025-08-02
|
||||||
|
type: summary
|
||||||
|
tags: ["local_news", "newsletter"]
|
||||||
|
external: http://go/ui/posts/1038/
|
||||||
|
---
|
||||||
|
|
||||||
|
# Big news
|
||||||
|
- [癌症诊断等待时间长达九个月,患者面临“痛苦”](https://www.theage.com.au/national/victoria/patients-face-agonising-nine-month-wait-for-cancer-diagnosis-20250730-p5miw9.html)
|
||||||
|
维多利亚州部分公共医疗系统的癌症患者面临长达九个月的诊断等待时间,严重影响及时治疗,引发对公共医疗资源分配的担忧。
|
||||||
|
- [警方警告墨尔本CBD桥梁封锁“可能危及生命”](https://www.theage.com.au/national/victoria/find-another-route-police-warn-cbd-bridge-blockade-will-put-lives-at-risk-20250801-p5mjj3.html)
|
||||||
|
警方警告,本周日计划在墨尔本CBD国王街桥举行的抗议活动可能导致交通中断,危及民众生命安全,敦促示威者选择其他路线。
|
||||||
|
- [新电动自行车引发悲剧:男子上班途中身亡,妻子呼吁加强监管](https://www.theage.com.au/national/victoria/nitin-left-for-work-riding-a-new-e-bike-he-never-made-it-home-20250729-p5mipu.html)
|
||||||
|
一名男子骑着新电动自行车上班途中不幸身亡,其妻子指出该电动自行车不符合上路规定,呼吁政府出台更严格的电动自行车法规。
|
||||||
|
- [维州西南部发生凶杀案:一女子被刺身亡,涉案男子被捕](https://www.theage.com.au/national/victoria/man-arrested-after-woman-stabbed-to-death-in-victoria-s-south-west-20250802-p5mjqd.html)
|
||||||
|
维多利亚州西南部Coleraine地区发生一起凶杀案,一名女子被刺身亡,警方已逮捕一名与受害者相识的男子。
|
||||||
|
- [Elisabeth Membrey谋杀案法院大门关闭,破案希望是否已失?](https://www.theage.com.au/national/victoria/the-court-door-closed-on-the-elisabeth-membrey-killing-but-is-hope-finally-lost-20250731-p5mj73.html)
|
||||||
|
尽管警方已锁定一名嫌疑人,但由于证据不足,法院未能对Elisabeth Membrey谋杀案进行进一步审理,该悬案的未来走向仍不明朗。
|
||||||
|
- [阿尔巴尼斯总理赞扬维州原住民“真相讲述”进程](https://www.sbs.com.au/news/article/albanese-signals-indigenous-truth-telling-support-at-garma/kgbvk40wo)
|
||||||
|
在“原住民之声”公投失败后,总理阿尔巴尼斯在加尔玛原住民文化节上表彰了维多利亚州首个真相讲述调查委员会Yoorrook司法委员会的工作。
|
||||||
|
- [澳大利亚活动家声称在以色列被拘留期间遭脱衣搜身和殴打](https://www.sbs.com.au/news/article/australian-activists-allege-they-were-strip-searched-bruised-while-detained-in-israel/jrsy96sbw)
|
||||||
|
两名“自由船队”活动家在前往加沙的船只被以色列拦截后,返回澳大利亚,声称在被拘留期间遭到粗暴对待,包括脱衣搜身和被推撞墙壁。
|
||||||
|
- [维州邪教调查:韩国新天地教会成焦点](https://www.sbs.com.au/news/article/behind-the-shincheonji-cult/nu0thspec)
|
||||||
|
维多利亚州对邪教和边缘团体的招募策略及控制方法进行调查,其中韩国新天地教会预计将成为关注焦点之一。
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
---
|
||||||
|
title: 2025-08-02-world_news
|
||||||
|
created: 2025-08-02
|
||||||
|
updated: 2025-08-02
|
||||||
|
type: summary
|
||||||
|
tags: ["newsletter", "world_news"]
|
||||||
|
external: http://go/ui/posts/1039/
|
||||||
|
---
|
||||||
|
|
||||||
|
# 全球新闻快讯
|
||||||
|
|
||||||
|
- [特朗普关税政策调整影响全球市场](https://www.cnbc.com/2025/08/01/asia-stock-markets-today-live-updates-nikkei-225-asx-200-kospi-hang-seng-csi-300-sensex-nifty-50.html)
|
||||||
|
美国总统特朗普修改多国关税税率,导致亚太和欧洲股市下跌,其中对瑞士征收的关税税率更高达39%,引发多国关注。
|
||||||
|
- [澳大利亚天空“UFO”确认为中国火箭](https://www.bbc.com/news/videos/cnv738l2qm9o?at_medium=RSS&at_campaign=rss)
|
||||||
|
澳大利亚布里斯班上空出现的不明光点已被天体物理学家证实与中国卫星发射有关。
|
||||||
|
- [任天堂营收翻倍,Switch 2销量强劲](https://www.cnbc.com/2025/08/01/nintendo-earnings-q1-2025.html)
|
||||||
|
任天堂公布季度营收翻倍,新主机Switch 2销量达580万台,股价今年已上涨约40%。
|
||||||
|
- [欧元区7月通胀率高于预期稳定在2%](https://www.cnbc.com/2025/08/01/euro-zone-inflation-july-2025.html)
|
||||||
|
欧元区7月通胀率保持在2%,略高于路透经济学家此前预测的1.9%。
|
||||||
|
- [亚洲企业青睐稳定币,推动加密货币浪潮](https://www.cnbc.com/2025/08/01/crypto-wave-asia-stablecoins.html)
|
||||||
|
亚洲地区企业对稳定币的接受度提高,因其交易即时且成本远低于传统银行转账,带动全球加密货币浪潮。
|
||||||
|
- [特朗普施压药企降价,引行业震动](https://www.cnbc.com/2025/08/01/trumps-drug-price-ultimatum-sets-pharma-firms-scrambling.html)
|
||||||
|
美国总统特朗普发出最后通牒,要求制药公司做出降低美国药品价格的“有约束力承诺”,药企纷纷紧急应对。
|
||||||
|
- [亚马逊财报喜忧参半,AI投资引关注](https://www.cnbc.com/2025/07/31/amazon-amzn-q2-earnings-report-2025.html)
|
||||||
|
亚马逊第二季度业绩好于预期,但其不乐观的盈利预测令投资者担忧对人工智能的巨额投资回报。
|
||||||
|
- [法国暂停加沙撤离行动,因学生反犹争议](https://www.bbc.com/news/articles/c5yl7n42325o?at_medium=RSS&at_campaign=rss)
|
||||||
|
一名巴勒斯坦学生因反犹太主义争议被撤销大学认证后,法国暂停了加沙撤离行动。
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
---
|
||||||
|
title: 2024-12-08-technology
|
||||||
|
created: 2024-12-08
|
||||||
|
updated: 2024-12-08
|
||||||
|
type: summary
|
||||||
|
tags: [[]]
|
||||||
|
external: http://go/ui/posts/104/
|
||||||
|
---
|
||||||
|
|
||||||
|
**科技新闻**
|
||||||
|
|
||||||
|
- [美国法院支持禁止TikTok](https://www.wsj.com/articles/tik-tok-congress-ban-court-ruling-1f0d6837?mod=rss_Technology)
|
||||||
|
三法官小组裁定国会有权因国家安全担忧关闭这款中国支持的应用程序。
|
||||||
|
|
||||||
|
- [Meta股价创新高,受TikTok禁令影响](https://www.cnbc.com/2024/12/06/meta-shares-rise-on-potential-tiktok-ban-in-us-closing-at-record.html)
|
||||||
|
Meta股价上涨2.4%,创历史新高,原因是联邦上诉法院支持要求字节跳动出售TikTok。
|
||||||
|
|
||||||
|
- [AI发展中人类的重要作用](https://www.wsj.com/articles/the-secret-weapon-helping-businesses-get-results-from-ai-humans-f99a0907?mod=rss_Technology)
|
||||||
|
最新技术机器同样需要人类的帮助和支持。
|
||||||
|
|
||||||
|
- [Workday股价因纳入标普500而上涨](https://www.cnbc.com/2024/12/06/workday-shares-pop-9percent-on-inclusion-in-sp-500.html)
|
||||||
|
Workday近年来已实现盈利,预计明年订阅收入将增长14%。
|
||||||
|
|
||||||
|
- [Meta元宇宙的未来发展](https://www.cnbc.com/2024/12/07/whats-next-for-metas-metaverse.html)
|
||||||
|
自Facebook更名为Meta并全面投入元宇宙已三年,收购Oculus已十年。
|
||||||
|
|
||||||
|
- [Super Micro获得纳斯达克上市延期](https://www.cnbc.com/2024/12/06/super-micro-gets-nasdaq-extension-can-file-financials-by-february.html)
|
||||||
|
公司收到纳斯达克通知,获得继续上市的延期。
|
||||||
|
|
||||||
|
- [科技、媒体和电信市场洞察](https://www.wsj.com/articles/tech-media-telecom-roundup-market-talk-03da9b1b?mod=rss_Technology)
|
||||||
|
关于Rubrik和沃达丰英国与Three合并的最新市场分析。
|
||||||
|
|
||||||
|
- [技术创新与商业趋势](https://www.wsj.com/articles/tech-media-telecom-roundup-market-talk-03da9b1b?mod=rss_Technology)
|
||||||
|
科技行业最新市场动态和重要商业洞察。
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
---
|
||||||
|
title: 2025-08-02-world-painting
|
||||||
|
created: 2025-08-02
|
||||||
|
updated: 2025-08-02
|
||||||
|
type: summary
|
||||||
|
tags: ["AI", "painting", "world"]
|
||||||
|
external: http://go/ui/posts/1040/
|
||||||
|
---
|
||||||
|
|
||||||
|
好的,我为您推荐了《斗狗扑克牌局》(Dogs Playing Poker) 这幅画作,并提供了相关信息:
|
||||||
|
|
||||||
|
## 斗狗扑克牌局 (Dogs Playing Poker)
|
||||||
|
《斗狗扑克牌局》是美国艺术家卡修斯·马塞勒斯·库利奇创作的一系列油画的总称。这些画作以拟人化的方式描绘了狗在玩扑克牌,它们穿着人类的衣服,叼着雪茄,表情生动,滑稽有趣。这系列画作虽然在艺术评论界评价不高,但因其幽默感和独特的题材而深受大众喜爱,成为流行文化的标志性作品。对于8岁的孩子来说,这些画作能轻松吸引他们的注意力,激发他们对动物、幽默艺术和故事的兴趣,同时也能让他们了解非传统艺术的表现形式。
|
||||||
|
名画URL : <https://upload.wikimedia.org/wikipedia/commons/e/ec/A_Friend_in_Need_by_Coolidge.jpg>
|
||||||
|
搜索名画: <https://go.junv.cc/gi/DogsPlayingPoker>
|
||||||
|
|
||||||
|
------
|
||||||
|
|
||||||
|
这些信息也已经保存到您的Google Docs中了。
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
---
|
||||||
|
title: 2025-08-03-technology
|
||||||
|
created: 2025-08-03
|
||||||
|
updated: 2025-08-03
|
||||||
|
type: summary
|
||||||
|
tags: ["newsletter", "technology"]
|
||||||
|
external: http://go/ui/posts/1041/
|
||||||
|
---
|
||||||
|
|
||||||
|
** Tech news**
|
||||||
|
- [Strava CEO推出新方式改进用户锻炼](https://www.wsj.com/tech/personal-tech/strava-athlete-intelligence-michael-martin-ceo-37c9a993?mod=rss_Technology)
|
||||||
|
健身应用Strava的用户超1.5亿,其CEO希望通过新的“运动员智能”功能吸引更多人付费。
|
||||||
|
- [拒绝扎克伯格的10亿美元工作邀约](https://www.wsj.com/tech/ai/meta-zuckerberg-ai-recruiting-fail-e6107555?mod=rss_Technology)
|
||||||
|
一些人因忠诚度和个人信念,拒绝了Meta创始人马克·扎克伯格的巨额AI招聘要约。
|
||||||
|
- [新一代用“先买后付”购买美容和演唱会门票](https://www.wsj.com/personal-finance/credit/the-perils-of-buying-botox-and-concert-tickets-with-buy-now-pay-later-loans-23a59c7e?mod=rss_Technology)
|
||||||
|
年轻美国人正转向高息的“先买后付”贷款,用于购买肉毒杆菌注射和演唱会门票等,研究显示部分人因此消费更多。
|
||||||
|
- [七种方法追踪并预防跌倒风险](https://www.wsj.com/health/wellness/fall-prevention-injuries-safety-tech-19fb8638?mod=rss_Technology)
|
||||||
|
专家称,即使是健康的“年轻老年人”,若缺乏适当监测,也可能因跌倒而受伤。
|
||||||
|
- [特朗普对华AI战略迎来首次重大考验](https://www.wsj.com/tech/ai/trump-china-ai-race-strategy-apec-64487dcc?mod=rss_Technology)
|
||||||
|
美国政府准备在韩国举行的亚太经合组织会议上推销其芯片和软件,以应对与中国的AI竞争。
|
||||||
|
- [AI颠覆咨询业:麦肯锡称其“关乎存亡”](https://www.wsj.com/tech/ai/mckinsey-consulting-firms-ai-strategy-89fbf1be?mod=rss_Technology)
|
||||||
|
如果AI能在几秒内完成信息分析、数据处理和幻灯片制作,咨询巨头麦肯锡如何保持其相关性成为关键。
|
||||||
|
- [佛罗里达州在太阳能增长方面悄然超越加州](https://www.cnbc.com/2025/08/02/how-florida-quietly-surpassed-california-in-solar-growth.html)
|
||||||
|
尽管没有气候任务,佛罗里达州在2024年新增的太阳能发电量超过加州,其发展势头能否持续备受关注。
|
||||||
|
- [以太坊十年:从实验性项目到华尔街的“隐形骨干”](https://www.cnbc.com/2025/08/02/ethereum-turns-10-from-scrappy-experiment-to-wall-streets-invisible-backbone.html)
|
||||||
|
以太坊曾被视为比特币的副产品,如今其区块链技术已成为稳定币、代币化资产及主要银行支付轨道的底层动力。
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
---
|
||||||
|
title: 2025-08-03-chinese-painting
|
||||||
|
created: 2025-08-03
|
||||||
|
updated: 2025-08-03
|
||||||
|
type: summary
|
||||||
|
tags: ["AI", "china", "painting"]
|
||||||
|
external: http://go/ui/posts/1042/
|
||||||
|
---
|
||||||
|
|
||||||
|
## 水月观音图
|
||||||
|
水月观音是观音菩萨三十三化身之一,相传她常现身于月光下的水中,因此得名。水月观音图通常描绘观音菩萨在水边岩石上,月光洒在水面,意境清幽。这幅画可以帮助孩子了解佛教文化中观音菩萨的形象,以及中国传统绘画中对意境和神韵的追求。
|
||||||
|
|
||||||
|
古画URL : <https://www.sgyinji.com/pic-573.html>
|
||||||
|
搜索古画: <https://go.junv.cc/gi/水月观音图>
|
||||||
|
|
||||||
|
------
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
---
|
||||||
|
title: 2025-08-03-victoria
|
||||||
|
created: 2025-08-03
|
||||||
|
updated: 2025-08-03
|
||||||
|
type: summary
|
||||||
|
tags: ["local_news", "newsletter"]
|
||||||
|
external: http://go/ui/posts/1043/
|
||||||
|
---
|
||||||
|
|
||||||
|
# 要闻速览
|
||||||
|
- [维州州长与警方就周末亲巴勒斯坦游行发出警告,ALP成员就AUKUS和巴勒斯坦建国问题投票](https://www.theage.com.au/national/victoria/premier-warns-protesters-over-bridge-march-as-alp-members-vote-on-aukus-and-palestinian-statehood-20250802-p5mjrd.html)
|
||||||
|
维州州长Jacinta Allan和警方警告称,周日墨尔本和悉尼的亲巴勒斯坦游行若阻碍紧急服务,将迅速采取行动。同时,工党成员将就AUKUS协议和巴勒斯坦建国问题进行投票。
|
||||||
|
- [345亿澳元铁路项目引担忧:城郊铁路线新车站出入不便](https://www.theage.com.au/national/victoria/it-s-a-34-5b-train-line-but-how-will-you-get-to-the-station-20250801-p5mjj8.html)
|
||||||
|
批评人士指出,维州城郊铁路线(SRL)耗资345亿澳元,但其草案计划缺乏必要的基础设施,导致行人、自行车和电动滑板车难以抵达新的地下车站。
|
||||||
|
- [维州政府推行新居家办公计划,引各界褒贬不一评论](https://www.sbs.com.au/news/article/reaction-to-victorian-premier-jacinta-allan-new-work-from-home-plan/jl6rx3tel)
|
||||||
|
维州政府提出的新居家办公计划引发了社会各界的不同反响,一些人称之为“一项非常重要的举措”,而另一些商业团体则斥其为“完全越权”。
|
||||||
|
- [丹德农医院计划转移高风险孕妇遭强烈反对](https://www.theage.com.au/national/victoria/uproar-at-dandenong-hospital-plan-to-redirect-mothers-with-high-risk-pregnancies-20250730-p5mixo.html)
|
||||||
|
丹德农医院一项旨在将高风险孕妇转诊至其他医院的争议性计划,遭到了助产士、护士工会和州反对党的强烈批评。
|
||||||
|
- [《时代报》前著名摄影师Cathryn Tremain去世,享年66岁](https://www.theage.com.au/national/victoria/a-photographic-hero-former-age-photographer-cathryn-tremain-dies-aged-66-20250731-p5mjeu.html)
|
||||||
|
屡获殊荣的《时代报》前摄影师Cathryn Tremain去世,享年66岁。朋友和前同事们称赞她是一位具有创造力和敏锐洞察力的“摄影英雄”。
|
||||||
|
- [广岛原子弹幸存者Tess分享求生故事与人生教训](https://www.sbs.com.au/news/small-business-secrets/article/an-atomic-bomb-a-missed-train-and-an-incredible-story-of-survival/toam4v7m2)
|
||||||
|
在广岛原子弹爆炸80周年之际,96岁的幸存者Tess回忆了那场改变她命运的事件,以及她作为“战争新娘”来到澳大利亚的经历,并分享了对当今世界核紧张局势的深刻教训。
|
||||||
|
- [社区力争保留历史遗产桥梁,与议会修复成本论据抗争](https://www.theage.com.au/national/victoria/a-bridge-to-the-past-communities-fighting-to-preserve-their-heritage-20250731-p5mj6l.html)
|
||||||
|
地方议会声称修复历史遗产桥梁成本过高,但当地居民坚持认为这些结构值得为之奋斗和投资,积极争取保留。
|
||||||
|
- [维州高收入家庭子女就读专属精英学校,费用高昂引发关注](https://www.theage.com.au/national/victoria/the-exclusive-schools-high-earning-parents-are-sending-their-children-to-20250724-p5mhft.html)
|
||||||
|
数据显示,维州收入最高的父母将子女送往州内一些最专属和昂贵的私立学校就读,这一趋势引发社会关注。
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
---
|
||||||
|
title: 2025-08-03-world_news
|
||||||
|
created: 2025-08-03
|
||||||
|
updated: 2025-08-03
|
||||||
|
type: summary
|
||||||
|
tags: ["newsletter", "world_news"]
|
||||||
|
external: http://go/ui/posts/1044/
|
||||||
|
---
|
||||||
|
|
||||||
|
# 全球要闻速览
|
||||||
|
|
||||||
|
- [人机关系不再是科幻小说,人类与AI情感连接日深](https://www.cnbc.com/2025/08/01/human-ai-relationships-love-nomi.html)
|
||||||
|
自ChatGPT发布以来,人们开始与聊天机器人建立情感联系,将其视为深厚友谊甚至人生伴侣。
|
||||||
|
- [爱泼斯坦案受害者及家属谴责特朗普转移吉斯莱恩·麦克斯韦尔](https://www.cnbc.com/2025/08/01/jeffrey-epstein-ghislaine-maxwell-prison-florida-texas.html)
|
||||||
|
特朗普政府及司法部因未公开爱泼斯坦案调查信息而面临批评。
|
||||||
|
- [特朗普政府提高加拿大关税,墨西哥获暂缓征税](https://www.bbc.com/news/videos/c3wnewjw2yqo?at_medium=RSS&at_campaign=rss)
|
||||||
|
特朗普政府将加拿大关税从25%提高到35%,同时给予墨西哥90天的更高征税暂缓期。
|
||||||
|
- [英国最高法院推翻汽车金融支付裁决](https://www.cnbc.com/2025/08/02/uk-supreme-court-overturns-ruling-on-motor-finance-commissions.html)
|
||||||
|
英国最高法院在很大程度上推翻了下级法院关于某些汽车金融协议非法的裁决。
|
||||||
|
- [特朗普下令核潜艇靠近俄罗斯,俄方保持沉默](https://www.bbc.com/news/articles/cly4kgv9238o?at_medium=RSS&at_campaign=rss)
|
||||||
|
美国总统下令两艘核潜艇靠近俄罗斯,此前他与俄罗斯前总统在社交媒体上发生争执。
|
||||||
|
- [上诉法院阻止特朗普政府在加州进行任意移民搜捕](https://www.cnbc.com/2025/08/02/appeals-court-blocks-trump-immigration-sweeps.html)
|
||||||
|
联邦上诉法院维持了一项临时命令,阻止特朗普政府在南加州进行不分青红皂白的移民拦截和逮捕。
|
||||||
|
- [伯克希尔哈撒韦营业利润下降4%,受关税影响](https://www.cnbc.com/2025/08/02/berkshire-hathaway-brk-earnings-q2-2025.html)
|
||||||
|
伯克希尔公司第二季度营业利润同比下降4%至111.6亿美元,面临关税影响。
|
||||||
|
- [微软股价恐面临大幅回调风险](https://www.cnbc.com/2025/08/02/microsoft-may-be-due-for-pullback-as-one-of-the-most-overbought-stocks.html)
|
||||||
|
作为华尔街最超买的股票之一,微软股价可能面临大幅回调。
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
---
|
||||||
|
title: 2025-08-03-world-painting
|
||||||
|
created: 2025-08-03
|
||||||
|
updated: 2025-08-03
|
||||||
|
type: summary
|
||||||
|
tags: ["AI", "painting", "world"]
|
||||||
|
external: http://go/ui/posts/1045/
|
||||||
|
---
|
||||||
|
|
||||||
|
## 召唤圣马太 (The Calling of Saint Matthew)
|
||||||
|
《召唤圣马太》是意大利巴洛克艺术家卡拉瓦乔的杰作,创作于1599-1600年。这幅画描绘了耶稣基督召唤税吏马太跟随他的瞬间。画中运用了强烈的光影对比(明暗对照法),光线从右上方射入,照亮了人物的面部和手,营造出戏剧性的氛围。这幅画以其逼真的细节和对普通人生活的描绘而闻名,将神圣的事件置于日常环境中,让观众更容易理解和感受画作的魅力。通过这幅画,你可以和孩子探讨光线在绘画中的作用,以及画家如何通过生动的场景讲述一个历史或宗教故事。
|
||||||
|
|
||||||
|
名画URL : <https://upload.wikimedia.org/wikipedia/commons/2/25/Caravaggio%2C_Michelangelo_Merisi_da_-_The_Calling_of_Saint_Matthew_-_1599-1600_%28hi_res%29.jpg>
|
||||||
|
搜索名画: <https://go.junv.cc/gi/召唤圣马太>
|
||||||
|
|
||||||
|
------
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
---
|
||||||
|
title: 2025-08-04-technology
|
||||||
|
created: 2025-08-04
|
||||||
|
updated: 2025-08-04
|
||||||
|
type: summary
|
||||||
|
tags: ["newsletter", "technology"]
|
||||||
|
external: http://go/ui/posts/1046/
|
||||||
|
---
|
||||||
|
|
||||||
|
**科技新闻**
|
||||||
|
- [以太坊十周年:从实验项目到华尔街的隐形支柱](https://www.cnbc.com/2025/08/02/ethereum-turns-10-from-scrappy-experiment-to-wall-streets-invisible-backbone.html)
|
||||||
|
曾被视为比特币的副项目,以太坊区块链现已成为稳定币、代币化资产及主要银行支付轨道的基础。
|
||||||
|
- [特朗普新关税引发避险情绪,加密市场八月动荡](https://www.cnbc.com/2025/08/01/crypto-market-today.html)
|
||||||
|
随着特朗普新关税引发避险情绪,加密货币市场在八月波动。比特币表现相对坚挺,而加密相关股票则遭受更深损失。
|
||||||
|
- [蒙大拿州力推成为生物黑客和实验性治疗中心](https://www.wsj.com/tech/biotech/the-push-to-make-montana-a-hub-for-experimental-medical-treatments-716e1992?mod=rss_Technology)
|
||||||
|
“尝试权”法旨在增加未经批准疗法的可及性,但仍存在障碍和安全担忧。
|
||||||
|
- [马克·扎克伯格向iPhone宣战](https://www.wsj.com/tech/ai/mark-zuckerberg-just-declared-war-on-the-iphone-30163885?mod=rss_Technology)
|
||||||
|
Meta首席执行官描绘了AI如何为新的“主要计算设备”创造机会的愿景。
|
||||||
|
- [微软不仅是AI宠儿,核心业务也蓬勃发展](https://www.wsj.com/tech/ai/microsoft-is-an-ai-darling-but-its-core-businesses-are-booming-too-2213126f?mod=rss_Technology)
|
||||||
|
该公司的非AI业务,包括生产力软件和云计算,也表现强劲。
|
||||||
|
- [Figma首席执行官从辍学生到科技亿万富翁之路](https://www.cnbc.com/2025/08/03/figma-ceo-dylan-fields-path-from-college-dropout-to-billionaire.html)
|
||||||
|
Figma在纽交所上市交易两天后,33岁的首席执行官Dylan Field所持股份价值约66亿美元。
|
||||||
|
- [谷歌通过屏蔽虚假广告打击银行诈骗](https://www.wsj.com/opinion/stop-banking-scammers-by-blocking-fake-ads-1e695b5e?mod=rss_Technology)
|
||||||
|
谷歌通过要求金融广告商在授权名单上,已在英国打击了虚假金融广告。
|
||||||
|
- [佛罗里达州太阳能增长悄然超越加州](https://www.cnbc.com/2025/08/02/how-florida-qui...california-in-solar-growth.html)
|
||||||
|
2024年佛罗里达州新增太阳能装机量超过加州,尽管没有气候强制要求。
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
---
|
||||||
|
title: 2025-08-04-chinese-painting
|
||||||
|
created: 2025-08-04
|
||||||
|
updated: 2025-08-04
|
||||||
|
type: summary
|
||||||
|
tags: ["AI", "china", "painting"]
|
||||||
|
external: http://go/ui/posts/1047/
|
||||||
|
---
|
||||||
|
|
||||||
|
## 闸口盘车图
|
||||||
|
《闸口盘车图》是南宋画家李唐的代表作之一,描绘了乡村水车磨坊的场景。画中水流湍急,水车转动,人物形象生动,展现了宋代农村生活劳作的景象,体现了画家对细节的精妙刻画和对自然景物的生动捕捉。这幅画对于了解宋代社会风貌和农耕文明有重要价值。
|
||||||
|
|
||||||
|
古画URL : https://www.dpm.org.cn/attachments/image/62/12189/12189.jpg
|
||||||
|
搜索古画: https://go.junv.cc/gi/闸口盘车图
|
||||||
|
|
||||||
|
------
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
---
|
||||||
|
title: 2025-08-04-victoria
|
||||||
|
created: 2025-08-04
|
||||||
|
updated: 2025-08-04
|
||||||
|
type: summary
|
||||||
|
tags: ["local_news", "newsletter"]
|
||||||
|
external: http://go/ui/posts/1048/
|
||||||
|
---
|
||||||
|
|
||||||
|
# Big news
|
||||||
|
- [墨尔本和悉尼十万人游行抗议以色列轰炸加沙](https://www.theage.com.au/national/victoria/thousands-of-pro-palestine-protesters-to-block-melbourne-bridge-20250803-p5mjur.html)
|
||||||
|
数万名抗议者在墨尔本和悉尼举行大规模游行,抗议以色列在加沙的军事行动,其中悉尼的游行导致海港大桥关闭并造成严重交通中断。
|
||||||
|
- [莫纳什大学教授因涉嫌在讲座中展示儿童性虐待材料被点名](https://www.theage.com.au/national/victoria/monash-university-academic-named-after-child-abuse-material-allegedly-shown-in-lecture-20250803-p5mjvr.html)
|
||||||
|
一名曾在公平工作委员会任职的著名劳动法讲师,被指控在墨尔本的一次讲座中涉嫌展示儿童性虐待材料,目前已被公开点名。
|
||||||
|
- [紧急服务部门面临“混乱”局面,新州洪水中失踪女性的搜寻工作仍在进行](https://www.sbs.com.au/news/article/emergency-services-face-hectic-conditions-search-for-woman-in-floodwaters-ongoing/w44wb0xjp)
|
||||||
|
澳大利亚两岸正遭受恶劣天气袭击,救援人员在新南威尔士州持续搜寻一名被洪水冲走的女性。
|
||||||
|
- [专家警告,试管婴儿“附加服务”滥用现象日益猖獗且缺乏科学证据](https://www.theage.com.au/national/victoria/deanna-tried-ivf-with-the-lot-none-of-the-costly-unproven-add-ons-worked-so-she-went-back-to-basics-20250722-p5mgy5.html)
|
||||||
|
专家警告,澳大利亚生育监管方面存在漏洞,导致大量缺乏科学证据的试管婴儿“附加服务”被滥用。
|
||||||
|
- [学校食堂巧克力和糖果销售禁令形同虚设](https://www.theage.com.au/national/victoria/chocolate-and-lollies-are-meant-to-be-banned-from-school-canteens-but-their-sales-are-as-strong-as-ever-20250727-p5mi3y.html)
|
||||||
|
州政府未能执行其针对学校食堂的健康指南,本应禁止销售的含糖食品仍然是小学生最受欢迎的零食之一。
|
||||||
|
- [男子戴“惊声尖叫”面具涂鸦犹太教堂,已五次作案](https://www.theage.com.au/national/victoria/synagogue-targeted-with-graffiti-by-man-in-scream-mask-20250804-p5mk0t.html)
|
||||||
|
警方指控一名男子自三月以来已五次针对犹太教堂进行涂鸦,并在最近一次事件中佩戴了白色的恐怖电影面具。
|
||||||
|
- [内城区街头发生枪击和斗殴,六人被捕](https://www.theage.com.au/national/victoria/six-arrested-after-gunshot-screams-heard-in-fight-on-inner-city-street-20250803-p5mjxs.html)
|
||||||
|
圣基尔达西区一条街道在周日上午发生至少六人参与的斗殴事件,期间传出枪声和尖叫声,警方已逮捕六人并持续搜查该区域。
|
||||||
|
- [克拉拉的世界悄然瓦解,老师们却错过了预警信号](https://www.theage.com.au/national/victoria/as-clara-s-world-quietly-unravelled-her-teachers-missed-the-signs-20250731-p5mj9x.html)
|
||||||
|
一名年轻女孩滑向无家可归的迹象未能引起老师们的警觉,她现在呼吁为面临风险的年轻人提供更好的帮助。
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
---
|
||||||
|
title: 2025-08-04-world_news
|
||||||
|
created: 2025-08-04
|
||||||
|
updated: 2025-08-04
|
||||||
|
type: summary
|
||||||
|
tags: ["newsletter", "world_news"]
|
||||||
|
external: http://go/ui/posts/1049/
|
||||||
|
---
|
||||||
|
|
||||||
|
# 全球新闻快报
|
||||||
|
|
||||||
|
- [全球经济:关税、通胀与市场波动](https://www.cnbc.com/2025/08/03/stock-market-today-live-updates.html)
|
||||||
|
新增全球关税引发市场对通胀和经济放缓的担忧;美国对瑞士征收39%关税,恐重创其出口导向型经济;亚洲股市在权衡关税和欧佩克增产后表现不一。
|
||||||
|
|
||||||
|
- [肯尼亚儿童性交易链被揭露](https://www.bbc.com/news/articles/c15l9zl508eo?at_medium=RSS&at_campaign=rss)
|
||||||
|
英国广播公司卧底调查曝光肯尼亚有女性将13岁儿童卷入性交易。
|
||||||
|
|
||||||
|
- [欧洲热浪持续推高空调需求](https://www.cnbc.com/2025/08/04/heatwaves-drive-spikes-in-demand-for-air-conditioning-across-europe.html)
|
||||||
|
欧洲创纪录的频繁和持久热浪,正显著增加对空调设备的需求。
|
||||||
|
|
||||||
|
- [亚洲加密货币浪潮兴起:稳定币受青睐](https://www.cnbc.com/2025/08/01/crypto-wave-asia-stablecoins.html)
|
||||||
|
亚洲企业逐渐接受稳定币,因其交易即时且费用远低于传统银行转账。
|
||||||
|
|
||||||
|
- [自动驾驶出租车步入现实:中国成为关键市场](https://www.cnbc.com/2025/08/03/robotaxis-are-becoming-a-reality-whos-poised-to-win-in-china-and-beyond.html)
|
||||||
|
上海已允许全自动驾驶出租车在部分区域收取费用,全球竞争格局正在重塑。
|
||||||
|
|
||||||
|
- [中国比亚迪交付量首降:电动车价格战加剧](https://www.cnbc.com/2025/08/04/chinas-byd-posts-first-delivery-dip-in-2025-as-ev-price-war-bites.html)
|
||||||
|
受电动车价格战影响,比亚迪及其他中国主要电动车制造商7月交付量出现下滑。
|
||||||
|
|
||||||
|
- [波音防务工人罢工:航空巨头面临新挑战](https://www.bbc.com/news/articles/c4gze2medkdo?at_medium=RSS&at_campaign=rss)
|
||||||
|
约3200名F-15战斗机等军用飞机制造工人投票否决了波音的最新合同提议。
|
||||||
|
|
||||||
|
- [也门海岸移民船只沉没 数十人死亡失踪](https://www.bbc.com/news/articles/cn84rrmlxvxo?at_medium=RSS&at_campaign=rss)
|
||||||
|
一艘载有超过150名移民的船只在也门海岸附近因恶劣天气倾覆,造成数十人死亡和失踪。
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
---
|
||||||
|
title: 2024-12-08-victoria
|
||||||
|
created: 2024-12-08
|
||||||
|
updated: 2024-12-08
|
||||||
|
type: summary
|
||||||
|
tags: [[]]
|
||||||
|
external: http://go/ui/posts/105/
|
||||||
|
---
|
||||||
|
|
||||||
|
Here's the 8-item concise bulletin summary in Chinese, focusing on the most significant news:
|
||||||
|
|
||||||
|
## 墨尔本和澳大利亚新闻速报
|
||||||
|
|
||||||
|
1. 🏭 **沃尔沃斯仓库罢工事件解决**
|
||||||
|
[沃尔沃斯与工会达成协议,结束仓库工业纠纷](https://www.theage.com.au/national/victoria/woolworths-strikes-deal-with-union-to-end-warehouse-strike-20241207-p5kwls.html)
|
||||||
|
工会宣布胜利,成功获得防止因拣货速率受处罚的条款
|
||||||
|
|
||||||
|
2. 🕍 **里普利纳犹太教堂遭纵火调查**
|
||||||
|
[警方调查犹太教堂纵火案,发现可疑子弹](https://www.theage.com.au/national/victoria/after-the-fire-heavy-security-at-synagogues-as-community-expresses-sorrow-and-anger-20241207-p5kwki.html)
|
||||||
|
政治敏感事件引发社区关注和安全担忧
|
||||||
|
|
||||||
|
3. 🐖 **维多利亚野猪肆虐**
|
||||||
|
[野猪在维州造成严重破坏](https://www.theage.com.au/national/victoria/gosh-they-re-savvy-it-s-no-porky-feral-pigs-are-wreaking-havoc-across-victoria-20241204-p5kvs3.html)
|
||||||
|
野生动物对农业和生态造成重大威胁
|
||||||
|
|
||||||
|
4. 🏠 **墨尔本面临住房危机**
|
||||||
|
[政府被敦促设定经济适用房目标](https://www.theage.com.au/national/victoria/like-gold-allan-government-urged-to-set-affordable-housing-targets-20241205-p5kw41.html)
|
||||||
|
预计到2041年需要17.7万个经济适用住房
|
||||||
|
|
||||||
|
5. 🏳️🌈 **2025年悉尼同性骄傲游行争议**
|
||||||
|
[警察将参与游行,尽管有人反对](https://www.sbs.com.au/news/article/police-will-march-in-2025-mardi-gras-but-supporters-of-a-ban-say-its-a-big-step-forward/z7zb3zlsx)
|
||||||
|
关于警察参与游行的争论持续
|
||||||
|
|
||||||
|
6. 🏃 **16岁青少年打破澳大利亚运动纪录**
|
||||||
|
[Gout Gout打破短跑记录](https://www.sbs.com.au/news/article/gout-gout-smashes-one-of-australias-most-famous-sporting-records/c9bv3p2md)
|
||||||
|
年轻运动员展现惊人天赋
|
||||||
|
|
||||||
|
7. 📚 **国际学生奇特求学之路**
|
||||||
|
[学生每周飞8800公里上课](https://www.sbs.com.au/news/article/international-students-commuting-thousands-of-kilometres-for-uni-in-australia/bhblojv2z)
|
||||||
|
展现留学生求知的决心
|
||||||
|
|
||||||
|
8. 🔞 **青少年性骚扰调查**
|
||||||
|
[报告揭示16-19岁青少年性骚扰严重情况](https://www.sbs.com.au/news/article/its-happening-everywhere-the-lesser-known-australians-being-sexually-harassed/5lv26h3ww)
|
||||||
|
呼吁采取更多行动保护青少年
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
---
|
||||||
|
title: 2025-08-04-world-painting
|
||||||
|
created: 2025-08-04
|
||||||
|
updated: 2025-08-04
|
||||||
|
type: summary
|
||||||
|
tags: ["AI", "painting", "world"]
|
||||||
|
external: http://go/ui/posts/1050/
|
||||||
|
---
|
||||||
|
|
||||||
|
## 夜间的咖啡馆
|
||||||
|
文森特·梵高在1888年创作的《夜间的咖啡馆》是他的“星光三部曲”之一。这幅画展现了法国阿尔勒一个夜晚的露天咖啡馆景象。梵高在这幅画中没有使用黑色,而是用蓝色、紫色和绿色来描绘夜晚,用鲜明的黄色灯光来形成对比,营造出一种温暖而又略带孤独的氛围,非常适合引导孩子感受色彩和光影的魅力。
|
||||||
|
|
||||||
|
名画URL : https://www.nbfox.com/wp-content/uploads/2020/08/The-Night-Cafe-Vincent-van-Gogh.jpg
|
||||||
|
搜索名画: https://go.junv.cc/gi/夜间的咖啡馆
|
||||||
|
|
||||||
|
------
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
---
|
||||||
|
title: 2025-08-05-technology
|
||||||
|
created: 2025-08-05
|
||||||
|
updated: 2025-08-05
|
||||||
|
type: summary
|
||||||
|
tags: ["newsletter", "technology"]
|
||||||
|
external: http://go/ui/posts/1051/
|
||||||
|
---
|
||||||
|
|
||||||
|
**科技新闻**
|
||||||
|
- [安费诺在AI热潮中达成大型宽带交易](https://www.wsj.com/business/deals/amphenol-nears-big-broadband-deal-in-ai-boom-3909b0df?mod=rss_Technology)
|
||||||
|
互连产品制造商安费诺正收购康普的宽带连接和电缆部门,此举正值AI需求激增。
|
||||||
|
- [富士康计划将前Lordstown电动车厂改造为AI服务器生产基地](https://www.wsj.com/tech/lordstown-ev-plant-to-be-converted-into-ai-hardware-factory-849eadfa?mod=rss_Technology)
|
||||||
|
这家台湾公司计划与合作伙伴将该工厂转变为AI应用云计算硬件的生产基地。
|
||||||
|
- [英伟达有望重获部分中国市场准入,但AI芯片份额仍面临侵蚀](https://www.cnbc.com/2025/08/04/nvidia-h20-china-market-share-recovery.html)
|
||||||
|
英伟达的H20芯片有望重返中国市场,但专家预计鉴于新竞争和监管审查,其受欢迎程度将不如以往。
|
||||||
|
- [法律AI初创公司Harvey年经常性收入达1亿美元](https://www.cnbc.com/2025/08/04/legal-ai-startup-harvey-revenue.html)
|
||||||
|
Harvey于2022年推出,其创始人在OpenAI的GPT-3大型语言模型基础上进行实验,并在ChatGPT发布前问世。
|
||||||
|
- [百度计划与Lyft合作将Robotaxi业务扩展至欧洲](https://www.cnbc.com/2025/08/04/baidu-plans-to-expand-its-robotaxis-to-europe-with-lyft-deal.html)
|
||||||
|
中国科技巨头百度正寻求通过与Lyft和优步的交易,在全球范围内拓展其自动驾驶汽车业务。
|
||||||
|
- [特斯拉向马斯克授予290亿美元股票,此前薪酬方案悬而未决](https://www.cnbc.com/2025/08/04/tesla-stock-musk-pay.html)
|
||||||
|
马斯克2018年560亿美元薪酬方案的法律纠纷目前正在特拉华州最高法院审理,特斯拉在此期间向其授予股票。
|
||||||
|
- [亚马逊在其音频业务重组中裁减Wondery部门逾百名员工](https://www.cnbc.com/2025/08/04/amazon-cuts-some-wondery-podcast-jobs-as-part-of-audio-business-reorg.html)
|
||||||
|
作为亚马逊进军原创音频内容的一部分,该公司约五年前收购了Wondery。
|
||||||
|
- [Palantir营收首次突破10亿美元,并上调业绩指引](https://www.cnbc.com/2025/08/04/palantir-pltr-q2-earnings-2025.html)
|
||||||
|
Palantir的收入超出华尔街预期,并上调了其全年业绩展望。
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
---
|
||||||
|
title: 2025-08-05-chinese-painting
|
||||||
|
created: 2025-08-05
|
||||||
|
updated: 2025-08-05
|
||||||
|
type: summary
|
||||||
|
tags: ["AI", "china", "painting"]
|
||||||
|
external: http://go/ui/posts/1052/
|
||||||
|
---
|
||||||
|
|
||||||
|
## 孔雀东南飞图
|
||||||
|
《孔雀东南飞图》是根据中国古代著名叙事诗《孔雀东南飞》所创作的画作。这首诗讲述了焦仲卿和刘兰芝这对夫妻被迫分离,最终双双殉情的故事,是中国文学史上的一部悲剧经典。通过这幅画,您的儿子可以了解中国古代的爱情悲剧故事,感受中国传统文化中对忠贞爱情的歌颂与无奈,同时也可以了解中国古代的服饰和生活场景。
|
||||||
|
|
||||||
|
古画URL : <https://www.nipic.com/show/3673756.html>
|
||||||
|
搜索古画: <https://go.junv.cc/gi/孔雀东南飞图>
|
||||||
|
|
||||||
|
------
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
---
|
||||||
|
title: 2025-08-05-victoria
|
||||||
|
created: 2025-08-05
|
||||||
|
updated: 2025-08-05
|
||||||
|
type: summary
|
||||||
|
tags: ["local_news", "newsletter"]
|
||||||
|
external: http://go/ui/posts/1053/
|
||||||
|
---
|
||||||
|
|
||||||
|
# Big news
|
||||||
|
|
||||||
|
* [**墨尔本警方悬赏100万澳元征集Robert Issa谋杀案线索**](https://www.theage.com.au/national/victoria/police-announce-1-million-reward-for-information-on-robert-issa-murder-20250804-p5mk25.html?ref=rss&utm_medium=rss&utm_source=rss_national_victoria)
|
||||||
|
警方宣布,为Robert Issa谋杀案的侦破提供线索,将悬赏100万澳元。此前警方已逮捕五名涉案“打手”。
|
||||||
|
* [**“毒蘑菇”谋杀案庭审视频曝光:垃圾场之行与假手机**](https://www.theage.com.au/national/victoria/the-tip-trip-and-a-dummy-phone-videos-from-mushroom-murder-trial-released-20250804-p5mk75.html?ref=rss&utm_medium=rss&utm_source=rss_national_victoria)
|
||||||
|
备受关注的“毒蘑菇”谋杀案庭审中,法庭公布了Erin Patterson声称惊慌中扔掉食物脱水机的视频,向陪审团展示了关键证据。
|
||||||
|
* [**维州政府居家办公立法面临高等法院挑战**](https://www.theage.com.au/national/victoria/high-court-battle-looms-for-state-labor-s-work-from-home-push-20250804-p5mk5o.html?ref=rss&utm_medium=rss&utm_source=rss_national_victoria)
|
||||||
|
维州工党政府推行的居家办公权利立法可能面临法律挑战,或需通过强制立法来实施。
|
||||||
|
* [**Krissy Barrett:澳大利亚首位女性联邦警察局长**](https://www.sbs.com.au/news/article/who-is-krissy-barrett-australias-first-female-federal-police-commissioner/f430njkyw)
|
||||||
|
Krissy Barrett将于十月上任,成为澳大利亚联邦警察局首位女性局长,任期五年。
|
||||||
|
* [**一名中国公民因涉嫌外国干预被起诉**](https://www.sbs.com.au/news/article/chinese-national-charged-with-foreign-interference-allegedly-targeting-buddhist-group/4sm8gwyf8)
|
||||||
|
一名中国籍女性在堪培拉被指控涉嫌外国干预,据称其目标为一个佛教团体,这是澳大利亚相关法律下的重要案件。
|
||||||
|
* [**Hannah McGuire谋杀案:据称凶手曾向证人寄恐吓信**](https://www.theage.com.au/national/victoria/hannah-mcguire-s-killer-allegedly-sent-menacing-letters-to-witness-20250804-p5mk8s.html?ref=rss&utm_medium=rss&utm_source=rss_national_victoria)
|
||||||
|
Lachlan Young试图压制针对其恐吓和骚扰证人指控的申请被驳回,案件进展受到关注。
|
||||||
|
* [**澳大利亚国防军寻求发展壮大,应对复杂地缘战略环境**](https://www.sbs.com.au/news/article/the-adf-has-ambitions-to-grow-but-can-it-fix-a-terribly-difficult-geo-strategic-climate/9uq28l1hs)
|
||||||
|
安全专家指出,澳大利亚国防军正适应新挑战和期望,努力在“极其困难”的地缘战略气候中导航。
|
||||||
|
* [**墨尔本首家“戴帽”千层面餐厅1800 Lasagne进入破产管理**](https://www.theage.com.au/national/victoria/melbourne-s-first-hatted-lasagne-restaurant-1800-lasagne-enters-administration-20250805-p5mkcm.html?ref=rss&utm_medium=rss&utm_source=rss_national_victoria)
|
||||||
|
Thornbury的网红餐厅1800 Lasagne已进入破产管理阶段,该餐厅曾是墨尔本首家获得美食帽的千层面餐厅。
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
---
|
||||||
|
title: 2025-08-05-world-painting
|
||||||
|
created: 2025-08-05
|
||||||
|
updated: 2025-08-05
|
||||||
|
type: summary
|
||||||
|
tags: ["AI", "painting", "world"]
|
||||||
|
external: http://go/ui/posts/1054/
|
||||||
|
---
|
||||||
|
|
||||||
|
## 戴金翅雀的少女
|
||||||
|
《戴金翅雀的少女》(The Goldfinch)是荷兰黄金时代画家卡雷尔·法布里蒂乌斯于1654年创作的一幅油画。这幅画以其逼真的细节和光影效果而闻名,描绘了一只被铁链拴住的金翅雀栖息在一个白色石膏墙上的场景。这幅画不仅展示了画家高超的技巧,也因为画作背后悲剧性的历史(画家在创作此画后不久死于代尔夫特爆炸)而增添了一层神秘色彩。它能让孩子了解荷兰黄金时代的艺术风格,感受画家如何通过光线和细节描绘出栩栩如生的动物,同时也能引发他们对历史事件的思考。
|
||||||
|
|
||||||
|
名画URL : <https://www.mauritshuis.nl/en/our-collection/artworks/605-the-goldfinch>
|
||||||
|
搜索名画: <https://go.junv.cc/gi/戴金翅雀的少女>
|
||||||
|
|
||||||
|
------
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user