Рубрика: notes
Serial (COM port) to USB cable for old APC UPS
Firstly find and buy cable on aliexpress by keywords «APC Smart UPS DB9, CP2102, USB RS232, serial 9 D-Sub, cable 940-0024C, Windows 7/8/10, Mac, Linux».
Infrastructure Plan For Small Developers Team
Software
- Base for virtualization on bare-metal server (KVM + web): Proxmox
- Linux for VM: Debian or Ubuntu
- Password manager (Docker + web): Passbolt
- Git & Team (Docker + web): GitLab
- Task manager (Docker + web): Taiga
- NAS: OpenMediaVault
- An open-source & self-hostable Heroku / Netlify alternative: Coolify (Self hosting in 2023)
Minimal Hardware Requirements
- CPU: 4 core (AMD Athlon 3000G, Intel i3 — all CPU with little TDP).
- Disk: 500 Gb SSD/NVMe 1 disk for proxmox and VMs + 1 Tb HDD/SSD 1 disk for backup.
- Memory: 32 Gb
WordPress Free Themes
GPLDL Premium WordPress Themes Repository
The GPLDL Premium WordPress Themes Repository currently counts 604 downloads.
GPLDL provides free downloads of Premium WordPress Themes from all leading WordPress Developers like AppThemes, CSSIgniter, Dessign, Cyberchimps, Elegant Themes, Elmastudio, Envato/Themeforest, Graph Paper Press, Obox, PanKogut, BuddyPress Team, ThemeZilla, Themify, WooThemes, WPMUDEV including regular updates when they become available.
All WordPress Themes at GPLDL are true originals (no modifications, not nulled, no malware) obtained from the respective developers and are redistributed legally under the terms of the GNU General Public License.
Replace switch and if-else on Literal Object in JavaScript (TypeScript)
Alternative syntax with Literal Object:
const x = 0; const height = { [true]: 0, [x < 100]: 100, [100 <= x && x < 200]: 200, [x >= 200]: 250, }[true]; console.log(height); // you can see "100"
Static Site Generator, SSR And Other Framework For Site Generation
Based on Vue.js
VuePress
VuePress is composed of two parts: a minimalistic static site generator (opens new window) with a Vue-powered theming system and Plugin API, and a default theme optimized for writing technical documentation. It was created to support the documentation needs of Vue’s own sub projects.
Each page generated by VuePress has its own pre-rendered static HTML, providing great loading performance and is SEO-friendly. Yet, once the page is loaded, Vue takes over the static content and turns it into a full Single-Page Application (SPA). Extra pages are fetched on demand as the user navigates around the site.
Base on Go
Hugo
Hugo is a fast and modern static site generator written in Go, and designed to make website creation fun again.
Hugo is a general-purpose website framework. Technically speaking, Hugo is a static site generator. Unlike systems that dynamically build a page with each visitor request, Hugo builds pages when you create or update your content. Since websites are viewed far more often than they are edited, Hugo is designed to provide an optimal viewing experience for your website’s end users and an ideal writing experience for website authors.
Websites built with Hugo are extremely fast and secure. Hugo sites can be hosted anywhere, including Netlify, Heroku, GoDaddy, DreamHost, GitHub Pages, GitLab Pages, Surge, Firebase, Google Cloud Storage, Amazon S3, Rackspace, Azure, and CloudFront and work well with CDNs. Hugo sites run without the need for a database or dependencies on expensive runtimes like Ruby, Python, or PHP.
Bash scripts with NodeJS
Use Google’s package ZX for bash scripts on NodeJS: github and npm package.
Example:
#!/usr/bin/env zx await $`cat package.json | grep name` let branch = await $`git branch --show-current` await $`dep deploy --branch=${branch}` await Promise.all([ $`sleep 1; echo 1`, $`sleep 2; echo 2`, $`sleep 3; echo 3`, ]) let name = 'foo bar' await $`mkdir /tmp/${name}`