Skip to main content

Posts

Showing posts from July, 2019

Notes on regex sed, bash DOM html, meta tag

Using bash tool sed, awk, grep, vim ... to edit multiple file. Case study DOM tag <html DOCTYPE, meta, charset... https://unix.stackexchange.com/questions/26284/how-can-i-use-sed-to-replace-a-multi-line-string Sed cheatsheet https://gist.github.com/asenchi/2291903 HTML meta tags (recommend way ?) https://www.quackit.com/html_5/tags/html_meta_tag.cfm Example <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml " xml:lang="ja" lang="ja"> <head> <meta http-equiv="Content-Type" content="text/html" charset="EUC-JP" /> <meta http-equiv="Content-Script-Type" content="text/javascript" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <meta name="description" content="content here"

Notes PSQL, Apache X-Forwarded-Proto ...

 PSQL search column by name; select t.table_schema,        t.table_name from information_schema.tables t inner join information_schema.columns c on c.table_name = t.table_name                                 and c.table_schema = t.table_schema where c.column_name = 'last_name'       and t.table_schema not in ('information_schema', 'pg_catalog')       and t.table_type = 'BASE TABLE' order by t.table_schema; oh detail ab flow request HTTP to HTTPS only To understand X-Forwarded-Proto you have to understand the normal flow of communication when a client makes an HTTP request to a HTTPS-only resource. https://community.pivotal.io/s/article/Purpose-of-the-X-Forwarded-Proto-HTTP-Header   https://stackoverflow.com/questions/2987433/how-to-import-csv-file-data-into-a-postgresql-table https://stackoverflow.com/questions/26620670/apache-httpx-forwarded-proto-in-htaccess-is-causing-redirect-loop-in-dev-envir  It seem redirect first permanent br

Notes Windows 10 Virtualbox config, PHP Storm Japanese, custom PHP, Apache build, Postgresql

 cmd => Ctrl + Shift + Enter mklink "C:\Users\HauNT\Videos\host3" "C:\Windows\System32\drivers\etc\hosts" https://www.quora.com/How-to-create-a-router-in-php https://serverfault.com/questions/225155/virtualbox-how-to-set-up-networking-so-both-host-and-guest-can-access-internet 1 NAT + 1 host only config https://unix.stackexchange.com/questions/115464/how-to-properly-set-up-2-network-interfaces-in-centos-running-in-virtualbox DEVICE=eth0 TYPE=Ethernet #BOOTPROTO=dhcp BOOTPROTO=none #IPADDR=10.9.11.246 #PREFIX=24 #GATEWAY=10.9.11.1 #IPV4_FAILURE_FATAL=yes #HWADDR=08:00:27:CC:AC:AC ONBOOT=yes NAME="System eth0" [root@localhost www]# cat /etc/sysconfig/network-scripts/ifcfg-eth1 # Advanced Micro Devices, Inc. [AMD] 79c970 [PCnet32 LANCE] DEVICE=eth1 IPADDR=192.168.56.28 <= no eff => auto like DHCP #GATEWAY=192.168.56.1 #BOOTPROTO=dhcp BOOTPROTO=static <= no eff ONBOOT=yes HWADDR=08:00:27:b4:20:10 [root@localhost www]#