Change Shapes of Selection in Photoshop (and Photopea)

Change shapes or move corner points of selection. Simple way Select (polygonal lasco L) Ctrl+T to transform Hold Ctrl, use mouse to drag corners Complex shape altering Select (polygonal lasco L) Ctrl+T to transform Click 'Warp' button (Photopea: on toolbar) Drag the corner points or other points Warp will make many lines no longer straight, try these before Warp (and use Warp after for fine putting the corner points only): Skew, Perspective, Distort (All in Edit >> Transform, if...
Read post

How to Run Popular Windows Binaries in WSL

Many popular binaries in Windows can be executed from WSL (eg. Ubuntu WSL). The way to call them from WSL is adding .exe to executable names. Some popular binaries: powershell.exe notepad.exe explorer.exe calc.exe etc. ...
Read post

Essential Extensions to Use with VS Code as a DevOps Suite

Extensions Material Icon Theme Settings: Folder icon: None (to see files icons clearly) Explorer sort order: Type (to see groups of files in folder) Run Terminal Command Settings Choose WSL as the default shell first, and put these settings: (Remember to use powershell.exe, not powershell for running in WSL) "runTerminalCommand.commands": [ { "command": "bash '{resource}'", "auto": true, "preserve": false }, { "command": "powershell.exe -file '{...
Read post

Set Which Command to Run for Specific File Type in Midnight Commander

Create command Menu >> Command >> Edit extension file Go to '### Includes' section at bottom of file Add open with Bash: include/bash Open=/bin/bash %f Bind a file type to command Menu >> Command >> Edit extension file Go to '### Documents' section roughly above Includes section Add a file type to open with include/bash: shell/i/.sh Include=bash ...
Read post

AI = Instincts + ML

Formula AI = Instincts + ML Components Instincts: Genetic, known data, known processes, classic algorithms, etc. ML: Neuralnet, SVM, D-Tree, etc. ...
Read post

Terms in Reinforcement Learning Based on Bellman Equation

Q-learning The method of learning based on Bellman equation Q-function The function used by Q-learning to calculate q-value Q-value The output of q-function Q-table The q-function in the form of a table This table can take a huge and scary amount of RAM Q-network (DQN) The q-function in the form of a neuralnet This function is less accurate but takes much much less RAM Deep Q-Network is another term for q-network. ...
Read post

Encrypted Email Services, Pros and Cons

Tuta (free) Pros: Reputation (first ever E2EE mail), fast Cons: Search range of 1 month from present date for free users, login with email instead of username Proton (free) Pros: Full search range (Tuta can organise in folder tree), login with username (shorter but not even everyday logging in), comes with Proton Pass (same password for a few trusted services isn't a problem) Cons: Small (500 MB) Mailfence (free) Cons: Not even usable, "Authentication disabled for some time" always P...
Read post

Customise Websites for Different Screen Sizes the Easy Way

Many websites have left-aligned design and don't look nice on large display, eg home desktop display for gaming. How to customise it with just a single CSS line Install Stylus extension Open the site Create CSS for the site using Stylus eg. body { padding-left:200px; } Align it to centre or from around 25vw should be nice Add padding-right also if the UI is shifted. ...
Read post

Methods of Accessing Local Files in JavaScript

Modern (File System Access API): https://developer.mozilla.org/en-US/docs/Web/API/Window/showOpenFilePicker From Input tag (File Reader API): https://developer.mozilla.org/en-US/docs/Web/API/FileReader/readAsDataURL From Sandbox File System (OPFS): https://developer.mozilla.org/en-US/docs/Web/API/File_System_API/Origin_private_file_system ...
Read post

How to Autofill into Desktop Apps

In web browser, it's rather simple to use browser built-in password manager or vault extension to do auto-filling of passwords, however, it's not popular to do auto-filling of passwords in desktop environment. Some games are a bit frustrating by enforcing player to enter password again and again each launch. Here's how to do auto-filling in desktop environment: Install X-Mouse Buttons Assign the password key sequence to middle-mouse Use middle-mouse for auto-filling instead of left mouse butt...
Read post

Services for Hosting HTML Websites

Tiiny.host Host only 1 site per account, cant publish multiple books Uncertain service continuation in the future Static.app Bad business, advertised as free but just free trial, site is down after Also uncertain future Dropbox Good, reliable, but fits to share page by page only ...
Read post

Choices for Essential Accounts

Anyone should use E2EE tech by now 2024, it's crucial. Some essential stuff: Email (to create accounts), Vault (to access accounts), Extra: Cloud Drive (a generic storage). Set 1: Tuta Mail (first E2EE email service ever). Bitwarden (top 1 open-source vault). MEGA (top 1 free encrypted drive). Set 2: Proton as a whole: Proton Mail, Proton Pass, Proton Drive. Set 2 has some contras: Proton Mail is slower than Tuta Mail, small 500 MB. Proton Pass is rather okay, with TOTP feature free. Proton...
Read post

How to Fix MEGA Error "Invalid Sync Status Due to Too Many Changes in Your Account"

MEGA Error "Invalid Sync Status Due to Too Many Changes in Your Account" Solution 1: Open MEGA app from systray, click 'Force Full Scan'. This option may not work, may take unlimited time like freezing (as per my experience). Solution 2: Open MEGA app, remove the folder with the error notice. Wait for MEGA to do "Saving synchronised folders". Add back the folder, MEGA will to scanning (possibly checksums), wait for it to be done. That's fixed. This seems faster and never freeze. ...
Read post

How to Make Webpack and Import Statement in JavaScript Understand the Same Paths

Example project structure project/ src/ mod1/ mod2/ app.js mod1 (symbolic link) -> src/mod1 mod2 (symbolic link) -> src/mod2 pack.sh Inside JavaScript code import mod1 from "/mod1/file.js" import mod2 from "/mod2/file.js" When run Webpack inside pack.sh, all the root slashes will make Webpack to find in src dir instead of current working directory. Browser also understand the same, the root slash means from src dir, if Ngix aliasing there. ...
Read post

Electron and Exception/Rejection without Code Lines

Some calls to Electron, eg. nativeImage., webContents. won't tell the code lines when bugs happens. It shows the lines in Electron bundles those are kinda vague. Example: https://github.com/electron/electron/issues/7657 TypeError: Error processing argument at index 0, conversion failure from To avoid those bugs, always check value before passing to Electron. ...
Read post

Make Resizable Corner in HTML and CSS

#My-Div { resize:both; overflow:auto; } ...
Read post

CSS Flex Flow in Multiple Columns Similar to float:top

float:top doesn't exist, flex layout can make something similar to it. This trick is used in Netblen MOS new tab columns. Sample: https://jsbin.com/gijiniqani/edit?html,css,output HTML <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width"> <title>JS Bin</title> </head> <body> <div style="height:52px; display:flex; flex-direction:column; flex-wrap:wrap; align-content:...
Read post

How to Force Renew Specific Cert with Certbot by Let's Encrypt

sudo certbot renew --force-renew --cert-name CERTNAME # CERTNAME is a main domain inside /etc/letsencrypt/live dir ...
Read post

Human Vision and the UI of Apps and Games

Human vision is elliptical, for the 4 rims of display, it easier to see the central parts. And thus, the 4 corners are for showing UI displaying statuses only, not to click use directly most of the time. ...
Read post

How to Embed Image from Google Drive to HTML IMG Tag

Example image link from Google Drive (no need to enable anyone with the link to view): https://drive.google.com/file/d/1YmI4i04yhXIHBfDgrVjGQkZDbXWAihx5/view Change the URL to: https://drive.google.com/uc?id=1YmI4i04yhXIHBfDgrVjGQkZDbXWAihx5 UC means user's content, remove anything after id. The above URL will be available to logged-in user. If to be published to blog, enable 'anyone with the link' can view. ...
Read post

Key Bindings for Battlefield and Other Shooters

...
Read post

Proton E2EE Service Set

Proton E2EE Service Set is nice, all the essential stuff. However, there are some features don't fit what I want: Proton Pass: The PIN lock needs the timeout to lock: The 'Lock Extension' button on extension popup doesn't work Proton Mail: Email service storage is a bit small, only 500MB free Proton Drive: The storage size is extremely small, can't use this, 500MB free. Good services: Proton VPN: Fast and free, usable level of bandwidth. Proton Calendar: Good just as any other calendar. ...
Read post

Army Ranks

Top 11. Marshal of all armies. Superemes 10. General (Army) 9. Lieu. G (Corp) 8. Maj. G (Division) Between Senior & Supreme 7. Brigadier (Brigade) Seniors 6. Colonel (Regiment) 5. Lieu. C (Battalion) 4. Maj. C (Battalion) Juniors 3. Captain (Company) 2. Lieu. (Platoon) 1. 2nd Lieu. (Platoon) ...
Read post

Disable Password for Sudo Users when Already Logged In

Command sudo visudo Enable or add these lines # Existing line root ALL=(ALL) ALL # Line A: Existing line %sudo ALL=(ALL) ALL # Line B: Add or change the above line to: %sudo ALL=(ALL) NOPASSWD:ALL Important Line A and line B must be in the above order, if line A is after, it overwrites the NOPASSWD option to empty and the line B that disables password makes no sense. ...
Read post

JS: How to Import in Raw Source Code and Webpack the Same Way

Relative JS imports in a file in a deep folder structure is crazy with double-dots: ../ However, browser will allow only: / or ./ or ../ Webpack can't understand ./ nor ../ because it runs in a current working dir, not resolving using hostname and URL the way browser does. There's 1 option to fit both browser & Webpack: The root slash Always use root slash / in import so browser will resolve from root after hostname Webpack consider / as the root of file system However, if a symbolic ...
Read post

How to Create SSH Hostname without /etc/hosts

The file /etc/hosts in WSL is always overwritten by the contents from Windows every time when WSL start. Changes applied to it will be removed. If using with SSH, a short hostname can be created in ~/.ssh/config file. For example, use server1 instead of server1.mycompany.com: Add to ~/.ssh/config file: Host server1 HostName server1.mycompany.com ...
Read post

Crazy Bars in Browsers and Software in the Past

Browsers used to have all these bars: Title bar Menu bar Tool bar Address bar Bookmark bar Tab bar Status bar They have change into using only these: Omni-bar (1. title, 6. tabs, 2. menu button, 3. tools/extensions) Address bar (4.) Bookmark bar (5. optional, some people don't use) Status bar (7. optional, overlay) If not using optional bars above, they'll be: Omni-bar Address bar ...
Read post

The Obsolete Desktop in Modern Use

Windows has a desktop, designed to put anything there, shortcuts, documents. However, in modern use, users work a lot on the web and not offline files, every file is only and desktop will be just app icons only. When using desktop to put app icons only, it seems redundant. Taskbar can hold ready to use apps, running apps; and Start Menu hold the rest of apps. Desktop in my personal use is just to show a nice background. No icons. ...
Read post

How to Break If-clause in JavaScript

People often don't think of using this break statement inside if-clause, but it's sometimes very useful. For example, without break, another code indentation depth to be added if (cond1){ do1(); if (cond2) { do2(); } } But if with 'break' statement, it's neat: if (cond1){ do1(); if (!cond2) break; do2(); } However, break inside if-clause is illegal, a trick with 'for' loop should work: for (let _ of [1]) if (cond1){ do1(); if (!cond2) break; do2();...
Read post

How Brexit Was

Again about Brexit, I shouldn't have happened, together is always better. But one country is for one country first anyway. Maybe just put UK country name on top of EU on passport better than leaving EU. ...
Read post