After releasing a website just within 2 weeks, my server is scanned with these URLs. I publish it here for my later reference and also hope that it helps others for a good beforehand protection. From a first server (hosted in AWS). /07-accessing-data/begin/vue-heroes/.env /07-accessing-data/end/vue-heroes/.env
I usually get confused when handling date datatype with databases, especially when connecting to the databases via libraries/drivers. In this post, I will summarize the results of their specification after my tests. Environment: Node: v16.0.0.Postgres nodejs driver: email@example.com.Mysqlite nodejs driver: sqlite3@5.
ffmpeg is a popular open-source tool to manipulate your video/audio files. Remove video segments (without audio)For example, you want to remove 108→157, 226 → 341, 404 → 407 (unit: second) segments from your video recording. Note that the audio is not modified. ffmpeg \ -i 'screenrecord.mp4' \ -filter_complex \ "[0:
Init project: terraform init. This command will set up modules, download provider modules, and create the .terraform.lock.hcl lock file.If there is an error with this command, you can delete .terraform directory and .terraform.lock.hcl and re-run terraform init. Show update plan: terraform plan. User -target=<
Regular expression, invented by the American mathematician Stephen Cole Kleene, is a search pattern used to match, or find and replace, strings. While its name is the same as regular expression in formal theory, (they even have the same Wikipedia article), they are different things, representing the different capabilities of
In computer science, formal language is a field that studies formal languages. Language definitionA non-empty, finite set Σ is called an alphabet.An alphabet's elements are called letter, or character, or symbol.A (finite or infinite) subset of the power set of an alphabet is called a language.Language classesFormal
WebGradients is a collection of 180 color gradients provided for free. Here is the thumbnail previewing all 180 gradients. Original image link. The collection in photoshop format The collection in sketch format There is also a website for this collection. The list of color codes and css is open sourced
I combined several beautiful color palettes into a single image file. This image includes 43 color palettes. Original image link. Preview: This image includes another set of 41 color palettes. Original image link. Preview: This is another collection of 32 color palettes with gradients. Original file link. Preview: You can
Webpack does have the option to control the value of __dirname in bundled code. However, the description of the API (link) is difficult to understand without a concreted example. From the docs node.__dirname string boolean = false Options: - true: The dirname of the input file relative to the context
Updated: I have published the snippets in this post to an npm package named enhanced-reducer. Some of the killing features that IMHO useReducer should support natively to convince react programmers to switch from using redux to useReducer hook are Provide a convenient way to get the current state, i.e.
When you are not sure how an API/library call/language instruction works, you absolutely should add several tests on it. It does not hurt your test performance muchIt assures the expected behavior when the API changes, library updates, language compiler/interpreter upgrades.Let me show an example with the