My Notebook
1 WEBP
https://developers.google.com/speed/webp
The bin/ directory contains tools for encoding (cwebp.exe) and decoding (dwebp.exe) images.
The easiest use should look like:
|
|
which will convert the input file to a WebP file using a quality factor of 80 on a 0 -> 100 scale (0 being the lowest quality, 100 being the best. Default value is 75). You might want to try the -lossless flag too, which will compress the source (in RGBA format) without any loss. The -q quality parameter will in this case control the amount of processing time spent trying to make the output file as small as possible.
If you also want to resize the image, use parameter -resize width height
Resize the source to a rectangle with size width x height. If either (but not both) of the width or height parameters is 0, the value will be calculated preserving the aspect-ratio. Note: scaling is applied after cropping.
Example:
|
|
2 WEBM
how-to-create-a-webm-video-file
|
|
By default the CRF value can be from 4–63, and 10 is a good starting point. Lower values mean better quality.
▨ Trim Videos with ffmpeg
:
|
|
-
-ss
: It defines the start of the section that you want to trim. -
hh:mm:ss(1)
: This concrete point (start time) can be sought from the input file. -
-to
: It’s the end of the section that you want to trim. -
hh:mm:ss(2)
: This specific point (end time) can be sought from the input file.
If you only want to trim the video, use copy
parameter. The command’s copy part is intended to copy both the original audio and video content without re-encoding:
|
|
Sometimes you may want to crop the video:
|
|
-
-vf
is the command for video filter, or can be typed as-filter:v
. -
crop=1920:1080:0:200
means to make a 1920×1080 video starting from the leftmost side of the source image (=0 pixels horizontally) and 200 pixels down from the top.
▨ Use cmder for better experience.
3 Markdown guide
Go to
3.1 Links:
- Text in [] and URL goes in ()
|
|
Result: Duck Duck Go.
- Text in [] and URL goes in (), text in this case can’t have blank space.
|
|
Result: cmder
- Reference-style Links: are a special kind of link that make URLs easier to display and read in Markdown, keep the text easy to read.
|
|
the rendered output:
In a hole in the ground there lived a hobbit. Not a nasty, dirty, wet hole, filled with the ends of worms and an oozy smell, nor yet a dry, bare, sandy hole with nothing in it to sit down on or to eat: it was a [hobbit-hole][1], and that means comfort. [1]:https://en.wikipedia.org/wiki/Hobbit#Lifestyle “Hobbit lifestyles”
(ref link doesn’t work?)
4 Math and Formula
https://imronuke.wordpress.com/2012/02/17/how-to-convert-equation-in-mathtype-to-latex/
https://github.com/maginapp/vuepress-plugin-katex
|
|
|
|
|
|
$\Gamma(n) = (n-1)!\quad\forall n\in\mathbb N$
Euler’s identity $e^{i\pi}+1=0$ is a beautiful formula in $\mathbb{R}^2$.
Supposing that $y >= 0$ and that $[\log x]$ represents the integer part of $\log x$, let:
$$\Phi (y) = \frac {1} {2 \pi i} \int_{2 - i \infty}^{2 + i \infty} \frac {y^{\omega} \mathrm{d} \omega} {\omega \left(1 + \frac {\omega} {(\log x)^{1.1}}\right)^{[ \log x ] + 1}}, x > 1$$
Obviously, when $0 <= y <= 1$, there is $\Phi(y) = 0$. For all $y >= 0$, $\Phi(y)$ is a non-decreasing function.
When $\log x>=10^4$ and $y>= e^{2{(\log x)}^{-0.1}}$, thus:
$$1 - x^{- 0.1} <= \Phi (y) <= 1$$
Supported Functions: https://katex.org
Note: There is problem with bracket { } when convert MathType form MS Word to LaTeX 2.09. If too many { } brackets than necessary, npm run build will fail with errors. Since KaTeX seems to require less { } in formula. Solution is that manually deleting redundant { } brackets after conversion will work, but if there are so many math formula in document then it’ll become a boring chore. => need a more refined answer to this hurdle (some tool maybe, or a fine LaTeX/MathJax plugin).
As for now, since I has some problem with KaTeX plugin (can’t make it work anymore), switch back to MathJax: => It also allows quickly copy converted MathType formula to .md file without editing { }.
https://vuepress-community.netlify.app/en/plugins/mathjax/
|
|
5 Nginx
6 Photoshop and Krita
I’m using Krita as a light weight Image Editor, portable-app ready. I’m still using Photoshop but if my machine I’m working on doesn’t have it installed, then I should just grab a portable Krita for a quick edit.
BTW, if you are a Photoshop user (like me) and you’re looking for Eraser, then check Krita’s manual:
In Krita, the eraser is not its own tool; it is a Blending mode (or Composite mode). You can toggle between erase mode and paint mode by pressing the E key, individually for each of your brushes.
7 SSH
As SSH is built in with Cmder, you may use it anytime by typing: ssh @ip [-p port]
Here is an example: ssh user@10.0.0.8 -p8888
|
|
8 Cmder
Unable to cd to another drive? Try D:
if cd D:
doesn’t work.
https://github.com/cmderdev/cmder/issues/6
9 Rclone
How to transfer files that marked as abused
You can use --drive-acknowledge-abuse
option:
|
|
--drive-shared-with-me
:
Only show files that are shared with me.
Instructs rclone to operate on your “Shared with me” folder (where Google Drive lets you access the files and folders others have shared with you).
This works both with the “list” (lsd, lsl, etc.) and the “copy” commands (copy, sync, etc.), and with all other commands too.
Example:
|
|
See also: Rclone
10 Yarn
Restore registry: https://stackoverflow.com/questions/49048013/yarn-keeps-using-old-registry
|
|
11 Youtube
11.1 Programming channels
11.2 YouTube Creators
Video Chapters
To add your own video chapters:
- Sign in to YouTube Studio.
- From the left menu, select Content.
- Click the video that you’d like to edit.
- In the Description, add a list of timestamps and titles.
- Make sure that the first timestamp you list starts with 00:00.
- Your video should have at least three timestamps listed in ascending order.
- he minimum length for video chapters is 10 seconds.
Example:
|
|
Video Guide: How to Add Chapters to Your Videos Using Timestamps
11.3 Youtube-DL
|
|
◈ There is a youtube-dl
fork with additional features and fixes, that is called yt-dlp
. See here for its available command and options:
https://github.com/yt-dlp/yt-dlp#general-options
11.3.1 Common usage and options:
◈ By default, yt-dlp
tries to download the best available quality if you don’t pass any options:
|
|
◈ Download the best video available with the largest resolution but no better than 1080p, or the best video with the smallest resolution if there is no video under 1080p:
|
|
◈ --hls-use-mpegts
is enabled by default for live streams
◈ Extract audio from Youtube link only:
|
|
Audio format: Format to convert the audio to when -x
(--extract-audio
) is used. (currently supported: best (default), mp3, aac, m4a, opus, vorbis, flac, alac, wav).
- yt-dlp works well with Bilibili video links too.
- If you don’t want to use CLI, then there is a GUI for
yt-dlp
oryoutube-dl
.
12 Obsidian.md
The human brain is non-linear: we jump from idea to idea, all the time. Your second brain should work the same.
In Obsidian, making and following connections is frictionless. Tend to your notes like a gardener; at the end of the day, sit back and marvel at your own knowledge graph.
Also read here.
13 Visual Studio Code
Release Notes: https://code.visualstudio.com/updates
In Visual Studio Code, just open the Command Palette (Ctrl+Shift+P on Windows/Linux, CMD+Shift+P on macOs), type Show Release Notes, then hit Enter.
The release notes will be displayed on the same tab.
It is also available from the Help menu > Release Notes.
14 Python
14.1 Pycharm
Pycharm gets error “can’t find '__main__'
module”?
The way I got around is that in the configuration window:
- Leave the script path empty.
- Add the path to the script’s directory in the working directory.
- In the parameters, add
$FileName$
This will automatically pick your file and run it.
14.2 Python tutorials
Python Tutorial: Web Scraping with Requests-HTML
Python Tutorial: Web Scraping with BeautifulSoup and Requests
https://code.visualstudio.com/docs/python/tutorial-django
Web search interface for Python’s documentation
15 Midas Civil
15.1 Guides
- Elite Training Series Session 1 Steel Composite I Girder Bridge
https://www.youtube.com/watch?v=s3JF99CDI-4
- Elite Training Series Session 2 Frame Culvert Bridge
https://www.youtube.com/watch?v=UVSR9EEWxjk
- Download the Training Materials
https://www.mediafire.com/folder/os5z1cfczthv8/MIDAS
15.2 Issues
[Error] Boundary condition has not been defined:
- The support nodes were not assigned to any structure group. Hence, these nodes and the boundaries which need these nodes are not activated in the construction stage. Kindly add all the support nodes to any structure group activated in the first construction stage. Once this is done, the model is analyzed as expected.
16 Mechanical and civil engineering concepts
The Efficient Engineer Channel:
https://www.youtube.com/c/TheEfficientEngineer/videos
17 Vue.Js
Vue JS Crash Course 2021: https://www.youtube.com/watch?v=qZXt1Aom3Cs
Vue.js Developers Blog: https://vuejsdevelopers.com/topics/vue-js/
18 Github
18.1 GitHub Desktop
GitHub Desktop won’t open on Windows 10. When double clicking on the shortcut nothing happens. GitHub Desktop don’t show in the Task Manager > Processes but shows in the Task Manager > Details
Solution: Go to C:\Users\YOUR USER NAMEn\AppData\Local\GitHubDesktop
, and then delete the most recent app-
.
See also: https://github.com/desktop/desktop/issues/3757
19 Unsorted lists:
Down here is my unsorted lists for anything catching my eyes:
(will be sorted into proper categories eventually)
Thank Suisei Archive Guide for bringing me the joyful adventure of Vue.Js and VuePress -> I have started creating this blog not so long after I visited that site and love it. ❤️ Although I’m not even interested in Hololive 😂
https://www.bookstack.cn/read/vuepress2-en/41c7610565ee1a40.md
https://www.reddit.com/r/vuejs/comments/qge221/what_backend_to_use_for_vue/
https://dev.to/frontendfoxes/build-a-beautiful-website-with-vuepress-and-tailwindcss--3a03
https://github.com/HEIGE-PCloud/DoIt
🎶 monster-siren.hypergryph.com/music 🎶
https://mrfz.fandom.com/wiki/Requiem#Romanized 🎵
Bridge Technology Series: Improving Inspection Access at Segmental Bridge Abutments
https://www.udemy.com/course/practical-regex
https://web.archive.org/save => save an archive of webpage, just in case it’s 404 in the future.
https://www.researchgate.net/figure/Hognestad-Parabola-30_fig10_40540797
https://www.lightgalleryjs.com/docs/vue/
List of VTuber-related software and resources
https://xbeibeix.com/api/bilibili Website for downloading HD video from Bilibili.
https://mirror.codebucket.de: Codebucket Webmirror (powered by h5ai)
https://larsjung.de/h5ai: modern HTTP web server index
https://anibrain.ai: An anime/manga recommender system with machine learning techniques focused on innate features (e.g. plot) to determine similarity and make recommendations
https://developers.google.com/search/docs/advanced/javascript/javascript-seo-basics
https://abseil.io/docs/python (Python Guides)
https://github.com/magic-akari/lrc-maker: An online tool which helps you create your lrc file
.
https://realfavicongenerator.net: For generating your favicons.
Yandex OCR: To translate text from photos and images.
taylantatli.github.io/Moon/: Moon is a minimal, one column Jekyll theme.
Quillbot: QuillBot was created as a full-sentence thesaurus to help students and professionals write more confidently and quickly.
https://openai.com/blog/chatgpt/
https://camas.unddit.com: Search reddit using the pushshift.io API, can search by username and subreddit.