Site Tools


tech_public:webdev (text)

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tech_public:webdev [2024/12/13 14:14] – ↷ Page name changed from tech_public:contrastchecker to tech_public:webdev jasonwchtech_public:webdev [2025/02/27 17:50] (current) – [Flarum migration] jasonwch
Line 1: Line 1:
 ====== Website dev ====== ====== Website dev ======
  
 +~~stoggle_buttons~~
  
 ===== Color contrast check ===== ===== Color contrast check =====
Line 10: Line 11:
  
 https://www.freecodecamp.org/news/css-only-back-to-top-button/ https://www.freecodecamp.org/news/css-only-back-to-top-button/
 +
 +===== Export icon list from Fontawesome =====
 +\\
 +https://fontawesome.com/changelog
 +\\
 +\\
 +https://github.com/mackilroy007/font-awesome-v6
 +
 +Using Node js:
 +  - download icons.json file
 +  - execute following code in node js:
 +
 +<code>
 +var json = require("{file-path}/icons.json"); 
 +var FA6Json = {}; Object.keys(json).forEach(iconName => { const icon = json[iconName]; icon.styles.forEach(style => { if (!FA6Json[style]) { FA6Json[style] = []; } FA6Json[style].push(`fa-${style} fa-${iconName}`); }) }); require("fs").writeFile("{file-path}/FA6icons.json", JSON.stringify(FA6Json,null,2), () => {});
 +</code>
 +
 +===== Local Apache HTTPS SSL =====
 +
 +https://shaonmajumder.medium.com/secure-local-development-with-mkcert-a-step-by-step-guide-99e24317b305
 +
 +https://www.baeldung.com/linux/secure-sockets-layer-local-network
 +
 +https://www.digitalocean.com/community/tutorials/how-to-create-a-self-signed-ssl-certificate-for-apache-in-ubuntu-18-04
 +
 +https://medium.com/@pasanglamatamang/configuring-a-self-signed-ssl-certificate-on-a-apache-server-cbcd6eefdf1a
 +
 +===== Flarum migration =====
 +
 +https://discuss.flarum.org/d/5138-moving-flarum-install-between-servers/11
 +
 +**<fs x-large>Backup following elements</fs>**
 +  - Database \\ PhpMyAdmin \\ mysqldump -u mysql_user -p DATABASE_NAME > backup.sql
 +  - composer.json
 +  - composer.lock
 +  - config.php files,
 +  - extend.php for those who added any customizations,
 +  - assets directory.
 +
 +----
 +
 +**<fs x-large>Restore</fs>**
 +  - Install a bare flarum as per the instructions here without configuring it.
 +  - Copy over your composer.json and composer.lock files.
 +  - Run composer install --prefer-dist --no-dev
 +  - Copy over your config.php file.
 +  - Restore your database:
 +    - PhpMyAdmin 
 +    - b. mysql -u mysql_user -p DATABASE < backup.sql
 +  - Copy over your flarum-root/assets folder.
 +
 +----
 +
 +**<fs x-large>Reindex search (for chinese, <fc #ff0000>MySQL only, performance impact</fc>)</fs>**
 +
 +<code>
 +USE YourFlarumDataBaseName;
 +ALTER TABLE posts DROP INDEX content;
 +CREATE FULLTEXT INDEX content ON `posts` (`content`) WITH PARSER ngram;
 +</code>
 +
 +<code>
 +USE YourFlarumDataBaseName;
 +ALTER TABLE discussions DROP INDEX title;
 +CREATE FULLTEXT INDEX title ON `discussions` (`title`) WITH PARSER ngram;
 +</code>
 +
tech_public/webdev.1734070463.txt.gz · Last modified: by jasonwch (text)

Top ↑