$content = @filter_var($content, FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES);
Reference: https://ithelp.ithome.com.tw/questions/10191261
https://www.magentaa11y.com/ | |
https://userway.org/audit/ (JAWS + Chrome, NVDA + Firefox, VoiceOver + iOS) |
$content = @filter_var($content, FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES);
Reference: https://ithelp.ithome.com.tw/questions/10191261
# 1 commit | |
cp --parents `git diff-tree -r --no-commit-id --name-only --diff-filter=ACMRT $commit_id` ../output | |
# between commits | |
cp --parents `git diff-tree -r --no-commit-id --name-only --diff-filter=ACMRT $commit_id_start $commit_id_end` ../output | |
# reference | |
https://stackoverflow.com/questions/4541300/export-only-modified-and-added-files-with-folder-structure-in-git | |
https://stackoverflow.com/questions/29300910/how-to-send-output-of-ls-l-to-cp-command-using-pipes |
for file in *.png; do convert $file -rotate 90 rotated-$file; done | |
# ref: https://www.howtogeek.com/109369/how-to-quickly-resize-convert-modify-images-from-the-linux-terminal/ |
- install windows | |
- show file extension | |
- install chrome, classic shell, office, dropbox, firefox, thunderbird, filezilla (no bundle), libreoffice, notepad++, 7-zip (assign all archive extensions) | |
- show delete confirmation of rubbish bin | |
- power to high, no sleep | |
- remove microsoft store, mail in quick launch | |
- show all icons in tray | |
- disable onedrive | |
- use traditional photo viewer | |
- add outlook shortcut in desktop |
/etc/sysctl.conf | |
net.core.somaxconn = 8192 | |
net.ipv4.tcp_max_syn_backlog = 8192 | |
// mysql | |
Connection failed: SQLSTATE[HY000] [1040] Too many connections | |
Connection failed: SQLSTATE[HY000] [2002] Resource temporarily unavailable | |
fix: | |
/etc/systemd/system/mysql.service |
# mysql 8 / mariadb 10.11 | |
mysql -u root | |
CREATE DATABASE <database_name> CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci; | |
CREATE DATABASE <database_name> CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci; | |
CREATE USER '<username>'@'localhost' IDENTIFIED BY '<password>'; | |
GRANT ALL PRIVILEGES ON <database_name>.* TO '<username>'@'localhost'; | |
flush privileges; |
<?php | |
global $wp_query; | |
$wp_query->set_404(); | |
status_header(404); | |
include '404.php'; | |
exit; |
In Windows environment, the error is occured when executing "gem install compass" in cygwin. | |
$ gem install compass | |
ERROR: While executing gem ... (ArgumentError) | |
invalid byte sequence in UTF-8 | |
How to solve: | |
1) open C:\cygwin\usr\share\ruby\2.0.0\win32\registry.rb | |
(change to your version when necessary) | |
2) comment out line 172 and change "\r" to "\r\n" in line 173 (line numbers may vary) |