How to render single post hexo
According my discussion on github I solved how to render single post markdown using HexoJS.
Render existing loaded post
Basically render a single post you need load database, like below:
const hexo = require('hexo')();
// Replace 'my-first-post' with the actual filename of your post (without the file extension).
const postToRender = 'my-first-post';
// Initialize Hexo
hexo.init().then(() => {
// Load the Hexo database
return hexo.load();
}).then(( ...
spring boot with eclipse gradle plugin
Spring Boot DevTools provides a set of tools that can help improve the development experience. One of the features is automatic class reloading, which can be particularly useful during development. Eclipse, on the other hand, has its own set of tools for Java development. To sync compiled classes from the Eclipse Gradle plugin with Spring Boot DevTools, you can follow these general steps:
Ensure Spring Boot DevTools is Configured
Make sure that the spring-boot-devtools dependency is included in ...
auto configure classpath config using eclipse gradle plugin
according this issue about automatically configuring classpath and build settings for an Eclipse project that uses the Gradle build tool. Configuring classpath and build settings in Eclipse for a Gradle project involves a few steps. Here is a framework for auto-configuring the classpath using the Eclipse Gradle plugin:
Install Eclipse Gradle Plugin
activate eclipse plugin each gradle subprojects
Using plugins block
plugins {
id "eclipse"
}
Using native classpath
apply plugi ...
classpath config for gradle within vscode redhat java extension
Configuring the classpath for a Gradle project in Visual Studio Code (VSCode) involves specifying the dependencies and build settings.
Here’s a guide for both IDEs:
Search java source
Searching source configs inside .classpath and *.prefs files
Search java source config by substring path="src/main/java"
Replace output attribute to gradle build folder output="build/classes/java/main"
result looks like:
<classpathentry excluding="**/*.txt" output="build/clas ...
__dirname is not defined in ES module scope
explanation
Using typescript hybrid compiler to compile for ESM and CommonJS is a experimental for NodeJS.
Some function/magic function/constructor is not supported by CommonJS. So, you must define them manually, such as: __dirname, __filename
for an example below error outputs:
(node:11396) ExperimentalWarning: Custom ESM Loaders is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
(node:11396) ExperimentalWarning: The N ...
How to overwrite cache in github actions workflow
Introduction
Introduction
In software development, caching is a commonly used technique to store frequently accessed data in a temporary storage location. This helps to improve performance and reduce the load on the server. Github Actions allows developers to incorporate caching in their workflows to speed up the build process. However, there may be situations where the cached data needs to be refreshed or overwritten. In this article, we will discuss how to overwrite cache in Github Actions ...
Install PHP for Android CLI or Web Server
Install PHP for Android
Introduction
Brief explanation of PHP programming language
Increasing popularity of using PHP in mobile app development
Purpose of the article
Overview of PHP programming in Android
History of PHP in Android
Advantages of using PHP in Android
Challenges faced in integrating PHP with Android
Getting Started with PHP in Android
Installing the necessary tools and software
Setting up a development environment
Creating a basic PHP app in Android
Utilizing PHP Features ...
custom passwordEncoder for spring boot java
Spring Boot Custom Password Encoder
Introduction
Brief explanation about the purpose of the article
Mention that the article will focus on how to implement a custom password encoder in Spring Boot
Understanding Password Encoding
Define password encoding
Explain the importance of password encoding in web applications
Mention common password encoding techniques (e.g. MD5, SHA-256)
Default Password Encoder in Spring Boot
Briefly explain the default password encoder used in Spring Boot
Menti ...
NPM Package Agent For Programmer In China
.yarnrc
disable-self-update-check true
registry "https://registry.npm.taobao.org"
phantomjs_cdnurl "https://npm.taobao.org/dist/phantomjs/"
electron_mirror "https://npm.taobao.org/mirrors/electron/"
electron_builder_binaries_mirror "https://npm.taobao.org/mirrors/electron-builder-binaries/"
sass_binary_site "https://npm.taobao.org/mirrors/node-sass/"
profiler_binary_host_mirror "https://npm.taobao.org/mirrors/node-inspector/"
chromedriv ...
git detach subfolder to their own repository
If you create a new clone of a repository, you can split the folder into another repository without losing your Git history or changes.
Open Git Bash.
Change your current working directory to where you want to create the new repository. 3. Clone the repository including subfolders.
$ git clone https://github.com/USERNAME/REPOSITORY-NAME
Change your current working directory to the cloned repository.
$ cd REPOSITORY-NAME
Five. To filter subfolders from the rest of the files in the reposit ...