ntk148v / til Goto Github PK
View Code? Open in Web Editor NEWToday I learned
Today I learned
The 3.0 release includes extended support for JSON Schema, which means you can use more JSON Schema keywords than with version 2.0. Some keywords supported in version 3.0 are handled slightly differently than in JSON Schema, including:
OpenAPI 2.0 does not support the oneOf or anyOf keywords, but you can use these keywords with version 3.0.
Version 3.0 includes improvements to parameter descriptions. The body
and formData
parameter types have been removed and replaced with requestBody
. The specification supports arrays and objects in operation parameters, and you can specify the method of serialization. Operation parameters include path, query, header, and cookie.
Source: https://blog.stoplight.io/difference-between-open-v2-v3-v31
https://www.velotio.com/engineering-blog/hashicorp-consul-guide-1
Source: https://thinhnotes.com/chuyen-nghe-ba/phan-biet-sketch-wireframe-mockup-va-prototype/
Sketch >> Wireframe >> Mockup >> Prototype
Source: https://www.sethvargo.com/writing-github-actions-in-go/
<IS_HOME>/repository/resources/security/wso2carbon.jks
.pkcs12
format. Default password is wso2carbon
.keytool -importkeystore -srckeystore wso2carbon.jks -destkeystore wso2carbon.jks -deststoretype pkcs12
keytool -export -rfc -alias wso2carbon -keystore wso2carbon.jks -file pub.pem
Source: https://www.mongodb.com/developer/article/mongodb-schema-design-best-practices/
Source: http://wiki.c2.com/?FeynmanAlgorithm
The Feynman Algorithm:
Source: https://earthhow.com/lava-magma-difference/
“When volcanoes erupt, magma consists of liquid rock within the interior of the Earth. But as molten rock finds its way to the surface, we refer to it as lava. So, the main difference between magma and lava is location.”
Magma is within the interior of the Earth.
But lava is on the outside.
Source: https://docstore.mik.ua/orelly/unix3/vi/ch05_03.htm
:w
Writes (saves) the buffer to the file but does not exit. You can (and should) use :w
throughout your editing session to protect your edits against system failure or a major editing error.
:q
Quits the editor (and returns to the UNIX prompt).
:wq
Both writes the file and quits the editor. The write happens unconditionally, even if the file was not changed.
:x
Both writes the file and quits (exits) the editor. The file is written only if it has been modified.
What's the difference between :wq
and :x
? Modification time. If you :x
a buffer that hasn’t changed, the modification time will be untouched because the file isn’t re-saved. The :wq
command will alter the modification time no matter what.
Source: https://www.mongodb.com/nosql-explained/data-modeling
Source:
Note links here, update later:
Source:
Source: https://www.freedesktop.org/software/systemd/man/systemd-analyze.html
systemd-analyze
- Analyze and debug system managersystemd-analyze
is used to determine system boot-up performance statistics and retrieve other state and tracing information from the system and service manager, and to verify correctness of unit files. It is also used to access special functions useful for advanced system manager debugging.# Example 1. Show how long the boot took
# in a container
$ systemd-analyze time
Startup finished in 296ms (userspace)
multi-user.target reached after 275ms in userspace
# on a real machine
$ systemd-analyze time
Startup finished in 2.584s (kernel) + 19.176s (initrd) + 47.847s (userspace) = 1min 9.608s
multi-user.target reached after 47.820s in userspace
# Example 2. Show which units took the most time during boot
$ systemd-analyze blame
32.875s pmlogger.service
20.905s systemd-networkd-wait-online.service
13.299s dev-vda1.device
...
23ms sysroot.mount
11ms initrd-udevadm-cleanup-db.service
3ms sys-kernel-config.mount
# Example 3. systemd-analyze critical-chain
# prints a tree of the time-critical chain of units
$ systemd-analyze critical-chain
multi-user.target @47.820s
└─pmie.service @35.968s +548ms
└─pmcd.service @33.715s +2.247s
└─network-online.target @33.712s
└─systemd-networkd-wait-online.service @12.804s +20.905s
└─systemd-networkd.service @11.109s +1.690s
└─systemd-udevd.service @9.201s +1.904s
└─systemd-tmpfiles-setup-dev.service @7.306s +1.776s
└─kmod-static-nodes.service @6.976s +177ms
└─systemd-journald.socket
└─system.slice
└─-.slice
# Example 4. Show the internal state of user manager
$ systemd-analyze --user dump
Timestamp userspace: Thu 2019-03-14 23:28:07 CET
Timestamp finish: Thu 2019-03-14 23:28:07 CET
Timestamp generators-start: Thu 2019-03-14 23:28:07 CET
Timestamp generators-finish: Thu 2019-03-14 23:28:07 CET
Timestamp units-load-start: Thu 2019-03-14 23:28:07 CET
Timestamp units-load-finish: Thu 2019-03-14 23:28:07 CET
-> Unit proc-timer_list.mount:
Description: /proc/timer_list
...
-> Unit default.target:
Description: Main user target
...
# Example 5. Plot a bootchart
$ systemd-analyze plot >bootup.svg
$ eog bootup.svg&
# Example 6. Plot all dependencies of any unit whose name starts with "avahi-daemon"
$ systemd-analyze dot 'avahi-daemon.*' | dot -Tsvg >avahi.svg
$ eog avahi.svg
# Example 7. Plot the dependencies between all known target units
$ systemd-analyze dot --to-pattern='*.target' --from-pattern='*.target' \
| dot -Tsvg >targets.svg
$ eog targets.svg
Source: https://www.mongodb.com/scale/types-of-nosql-databases
Source: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers
HTTP headers let the client and the server pass additional information with an HTTP request or response.
I don't aim to list all headers here, just some interested me.
Accept-Ranges
HTTP response header is a marker used by the server to advertise its support for partial requests from the client for file downloads. The value of this field indicates the unit that can be used to define a range.Accept-Ranges
header, the browser may try to resume an interrupted download instead of trying to restart the download.Accept-Ranges: <range-unit>
Accept-Ranges: none
Range
HTTP request header to indicate the part of a document that the server should return.
206 Partial Content
for the response.416 Range Not Statisfiable
.200
.Range: <unit>=<range-start>-
Range: <unit>=<range-start>-<range-end>
Range: <unit>=<range-start>-<range-end>, <range-start>-<range-end>
Range: <unit>=<range-start>-<range-end>, <range-start>-<range-end>, <range-start>-<range-end>
Range: <unit>=-<suffix-length>
// WIP: Add example here.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.