<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>SciTech</title>
    <link>https://qua.name/scitech/</link>
    <description></description>
    <pubDate>Sat, 16 May 2026 09:39:55 +0200</pubDate>
    <item>
      <title>Log of Great Dev Tips</title>
      <link>https://qua.name/scitech/log-of-great-dev-tips</link>
      <description>&lt;![CDATA[Online code editor/IDE: codesandbox.io | Codepen | Stackblitz | Glitch |  JSbin | Gitpod |&#xA;repl.it (most languages; any OS/device; github integration) | &#xA;&#xA;Tune PHP performance&#xA;&#xA;Use HTML character entities: &amp;alpha; &amp;Alpha; &amp;Xi; ... &amp;xi; ... &amp;Kappa;  &amp;kappa; ... &amp;lambda;CDM .. &amp;Lambda; .. &amp;Omega; $\Omega$ .. ... &amp;sigma; ... &amp;tau; $\tau$   ..  &amp;Beta;  ..  &amp;beta;  .. &amp;sum;  [entities cheat sheet] &#xA;Compare files/text snippets with VS Code editor | git as diff tool with --no-index | ListDiff.com |&#xA;GCE MDP tags:  DevTips | PHP | Javascript | Html | Snippets | htaccess | Complete tags list |!--more--&#xA;MDP Dev Tips&#xA;Unminify JS, CSS, HTML, XML and JSON; works locally in browser&#xA;a href=&#34;https://dev.to/iainfreestone/50-developer-tools-to-make-your-life-a-little-easier-4oc5&#34;50 Developer tools to make your life a little easier/a]]&gt;</description>
      <content:encoded><![CDATA[<ul><li><p>Online code editor/IDE: <a href="https://codesandbox.io/" rel="nofollow">codesandbox.io</a> | <a href="https://codepen.io/" rel="nofollow">Codepen</a> | <a href="https://stackblitz.com/" rel="nofollow">Stackblitz</a> | <a href="https://glitch.com" rel="nofollow">Glitch</a> |  <a href="https://jsbin.com/" rel="nofollow">JSbin</a> | <a href="https://www.gitpod.io/" rel="nofollow">Gitpod</a> |
<a href="https://repl.it/" rel="nofollow">repl.it (most languages; any OS/device; github integration)</a> |</p></li>

<li><p><a href="https://emanuelpina.pt/php-installation-on-ubuntu/#tune-php" rel="nofollow">Tune PHP performance</a></p></li>

<li><p>Use HTML character entities: α Α Ξ ... ξ ... Κ  κ ... λCDM .. Λ .. Ω $\Omega$ .. ... σ ... τ $\tau$   ..  Β  ..  β  .. ∑  <a href="http://code.iamkate.com/html-and-css/character-entity-references-cheat-sheet/" rel="nofollow">[entities cheat sheet]</a></p></li>

<li><p><a href="https://www.meziantou.net/comparing-files-using-visual-studio-code.htm" rel="nofollow">Compare files/text snippets with VS Code editor</a> | <a href="https://www.reddit.com/r/PHP/comments/6cupyi/best_way_to_compare_changes_to_a_block_of_text/" rel="nofollow">git as diff tool with —no-index</a> | <a href="http://www.listdiff.com/compare-2-lists-difference-tool" rel="nofollow">ListDiff.com</a> |</p></li>

<li><p>GCE MDP tags:  <a href="https://18941969.xyz/mdp/index.html?tag=devtips" rel="nofollow">DevTips</a> | <a href="https://18941969.xyz/mdp/pedit.html?q=63" rel="nofollow">PHP</a> | <a href="https://18941969.xyz/mdp/index.html?tag=javascript" rel="nofollow">Javascript</a> | <a href="https://18941969.xyz/mdp/index.html?tag=htmltips" rel="nofollow">Html</a> | <a href="https://18941969.xyz/mdp/index.html?tag=snippets" rel="nofollow">Snippets</a> | <a href="https://18941969.xyz/mdp/blogview.html?q=85" rel="nofollow">htaccess</a> | <a href="https://18941969.xyz/mdp/pedit.html?q=7" rel="nofollow">Complete tags list</a> |</p></li>

<li><p><a href="https://18941969.xyz/mdp/index.html?tag=devtips" rel="nofollow">MDP Dev Tips</a></p></li>

<li><p><a href="https://unminify.com/" rel="nofollow">Unminify JS, CSS, HTML, XML and JSON; works locally in browser</a></p></li>

<li><p><a href="https://dev.to/iainfreestone/50-developer-tools-to-make-your-life-a-little-easier-4oc5" rel="nofollow">50 Developer tools to make your life a little easier</a></p></li></ul>
]]></content:encoded>
      <guid>https://qua.name/scitech/log-of-great-dev-tips</guid>
      <pubDate>Thu, 12 Nov 2020 23:11:07 +0100</pubDate>
    </item>
    <item>
      <title>Commands in new format</title>
      <link>https://qua.name/scitech/new-commands</link>
      <description>&lt;![CDATA[Cheat sheets: muo Vim | vim | tldr simpler man pages | find | find dev.to | awk | awk quickref | htg awk | lxe awk | awk in 20 | sed | sed, htg | 13 CLI cmds | dig | netstat cmds | html | bash alias: function ct { curl cheat.sh\/&#34;$1&#34;; } | on github |&#xA;CLI articles |!--more--&#xA;&#xA;apachectl sudo apache2ctl -M   (show all loaded modules) | sudo apache2ctl -D DUMPRUNCFG | sudo apache2ctl -D DUMPVHOSTS | sudo apache2ctl -S  (show parsed VHost settings) | sudo apachectl -t  (apache config test) |&#xA;apt    apt-cache search php7.3 |  apt-cache show php7.3 &#xA;install pkgs &#34;kept back&#34;: sudo apt-get dist-upgrade | sudo apt-get --with-new-pkgs upgrade |&#xA;Clean up partial package: sudo apt autoclean&#xA;Clean up apt cache: sudo apt-get clean&#xA;Clean up unused dependencies: sudo apt autoremove&#xA;Uninstall application: sudo apt autoremove application-name&#xA; apt list --installed | grep &#34; installed&#34; /var/log/dpkg.log (also log.1) | apt show pkg | apt purge unneeded package |  sudo apt-mark showhold | sudo apt-mark unhold packagename | sudo apt autoremove | sudo apt autoclean |&#xA;sudo apt-get remove --purge $(dpkg -l | grep &#34;^rc&#34; | awk &#39;{print $2}&#39;) markremove rc residual packages/mark&#xA;awk   awk &#39;{print $5}&#39; | grep -Eo &#39;([0-9]{1,3}\.){3}[0-9]{1,3}&#39;| sort &#xA;cat   cat paperstoread.htm | sort | cut -c 1-50 | uniq -d (find duplicate lines)&#xA;chmod   chmod --reference=referencefile file [f2 f3] | chown chown --reference=referencefile file [f2]f3 |&#xA;comm   comm -12 &lt;(sort file1.txt) &lt;(sort file2.txt) find common lines in two files&#xA;cp   sudo cp -p pedit.html blogview.html cp -rp doc] | [cp preserving ownership, permissions &#xA;curl   curl cheat.sh/find | curl ifconfig.io | curl ipinfo.io | curl http://ipv4.icanhazip.com or curl http://icanhazip.com or curl http://ip.fossdaily.xyz | curl --ssl | curl --insecure | curl -I http://domain.com (headers info) | article | curl cookbook |&#xA;dig  dig example.com ANY +noall +answer&#xA;dpkg dpkg -l | grep &#34;^rc&#34; | sudo apt-get remove --purge $(dpkg -l | grep &#34;^rc&#34; | awk &#39;{print $2}&#39;)&#xA;find   find . -maxdepth 1 -type f -name &#34;.md&#34; -exec ls -al {} \; | find /tmp -type f -name &#34;.htaccess&#34; -exec grep -EHi &#39;(Redirect|RewriteRule)&#39; {} \; | find . -type f -perm 777 -exec chmod 644 {} \; | find /home -type d -perm -o+w -exec ls -ld {} \;  find world-writable directories in /home&#xA;gpg   gpg --output outfile.gpg --symmetric --cipher-algo AES256 file.ext |  gpg -o originalfile.txt -d file.txt.gpg |&#xA;grep   grep -Eri &#39;(Redirect|RewriteRule)&#39; /etc/apache2/&#xA;iptables sudo iptables -L | sudo iptables-save   iptables.rules | sudo iptables-restore &lt;iptables.rules | ubuntu iptables doc |&#xA;journalctl   journalctl -u ssh.service | journalctl -u network.service | journalctl article | &#xA;ls ls -H (follow symbolic links) | ls -Al | tr -s &#39; &#39; | cut -f9- -d&#39; &#39; (list just file and folder names; -R for dir recursion)&#xA;netstat   netstat -tulpn | netstat -npl | netstat -tulpn | netstat -npl | netstat -plane | grep :80 | awk &#39;{print $5}&#39; | grep -Eo &#39;([0-9]{1,3}\.){3}[0-9]{1,3}&#39; | sort | uniq -c | sort -n  conn port 80&#xA;perl   perl -pi -e &#39;s,RoseHosting,BestManagedVPS&#39; file.php Replace all string instances w/o opening file w text editor&#xA;pscp pscp -agent -i keyfile -P port (-agent is for pageant)&#xA;sed   sed -e &#34;s/\r//g&#34; file   newfile remove newline chars from file | sed -i &#39;s/search/repace/g&#39; .php  replace string in all specified files |&#xA;systemctl   sudo systemctl restart apache2 | sudo systemctl -a | sudo systemctl --state active | sudo systemctl list-timers | sudo systemctl list-unit-files | sudo systemctl list-unit-files | grep -i docker |&#xA;sudo systemctl | grep running (list running services) | sudo systemctl list-unit-files | grep enabled  (list enabled services) |&#xA;sudo systemctl reload ssh.service | systemctl list-unit-files --type=service | systemctl list-dependencies graphical.target | article | sudo systemctl enable apache2 | sudo systemctl disable apache2 | sudo systemctl is-enabled apache2 | article |&#xA;tar   tar -cvzf archive-name.tar.gz directory-name |  tar -C /diff-folder -xvf yourfile.tar to extract to a different directory |&#xA;timedatectl   timedatectl | Bash date to/from unix epoch time: date +%s | date -d @unix epoch time |&#xA;vim :w !sudo tee % |  :set ignorecase |  :set ff=unix or :set ff=dos | :set number or :set nonumber | :nohl |&#xA;&#xA;df -h | df -T &#xA;du -sh&#xA;dpkg-query -L package name   (list files in package)&#xA;faillog | free |&#xA;history -c&#xA;host ipaddr|domain  (Cloud Shell: get ip addr for domain or domain for ip addr, etc)&#xA;hostnamectl status&#xA;id username&#xA;sudo iptables -L -nv --line-numbers | sudo iptables-restore &lt; /etc/iptables/rules.v4 |&#xA;lastlog | last&#xA;sudo lshw&#xA;sudo sshd -T | /etc/ssh/sshd\config | ssh security hardening |&#xA;lsb&amp;lowbar;release -a | cat /proc/version&#xA;wget --no-check-certificate&#xA;whatis&#xA;zgrep -E &#34;^(Remove:|Purge)&#34; /var/log/apt/history.log&#xA;sudo -u www-data php occ app:list&#xA;zip -d gallery.zip &#34;picture439.jpg&#34;  (delete file from zip, note zip goes first, followed by file)&#xA;&#xA;gcloud info | gcloud version |&#xA;Windows: netstat | findstr ESTABLISHED&#xA;&#xA;Replace string recursively with find and sed&#xA;Remove all dpkg rc residual packages&#xA;&#xA;delete every line until PATTERN, that line included: cat index.html | sed &#39;1,/body onload/d&#39;&#xA;print (p) from the first line matching PATTERN to the end ($): cat index.html | sed -n &#39;/body onload/,$p&#39;&#xA;&#xA;Which Linux distro is running: cat /etc/-release&#xA;&#xA;101 Bash Commands | Text Processing in the Shell |&#xA;a href=&#34;https://towardsdatascience.com/mastering-file-and-text-manipulation-with-awk-utility-65fc09d56bef&#34;Mastering File And Text Manipulation With Awk Utility/a&#xA;&#xA;dpkg queries:&#xA;&#xA;-l, --list package-name-pattern...&#xA;    List packages matching given pattern.&#xA;-s, --status package-name...&#xA;    Report status of specified package.&#xA;-L, --listfiles package-name...&#xA;    List files installed to your system from package-name.&#xA;-S, --search filename-search-pattern...&#xA;    Search for a filename from installed packages.&#xA;-p, --print-avail package-name...&#xA;    On debian/ubuntu, use instead: apt-cache show package-name&#xA;    Display details about package-name, as found in /var/lib/dpkg/available. &#xA;Useful network commands, labnol&#xA;Basic regex in javascript&#xA;&#xA;/etc/alternatives (e.g., php cli version, check vs apache version)&#xA;&#xA;what process(es) are running for port 443: sudo lsof -t -i:443&#xA;&#xA;journalctl -- query the systemd journal.&#xA;Systemd has its own logging system called the journal.  To read those logs, journalctl is used. &#xA;The journal (journald) stores log data in binary format, unlike past services that stored logs in plain text. As such, journalctl is used to transmute binary logs into readable plain text. Check out The ultimate guide to using journalctl.&#xA;Another good read is kmsg. Kmsg (/dev/kmsg) is a file stored in the Linux filesystem, used to store messages from the Kernel, and is used by dmesg and klogd.&#xA;&#xA;a href=&#34;https://haydenjames.io/linux-commands-frequently-used-by-linux-sysadmins-part-5/&#34;Linux Commands frequently used by Linux Sysadmins – Part 5/a&#xA;&#xA;a href=&#34;https://dev.to/shaikh/how-to-manage-background-processes-in-linux-1d2m&#34;How to manage background processes in Linux/a&#xA;&#xA;cheatsheet for ip commands #network #linux&#xA;&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>Cheat sheets: <a href="https://www.makeuseof.com/tag/vim-shortcuts-cheat-sheet/" rel="nofollow">muo Vim</a> | <a href="https://vim.rtorr.com/" rel="nofollow">vim</a> | <a href="https://tldr.fossdaily.xyz/" rel="nofollow">tldr simpler man pages</a> | <a href="http://www.grymoire.com/Unix/Find.html" rel="nofollow">find</a> | <a href="https://dev.to/yashsugandh/finding-files-and-directories-in-linux-system-hlc" rel="nofollow">find dev.to</a> | <a href="http://www.grymoire.com/Unix/Awk.html" rel="nofollow">awk</a> | <a href="http://www.grymoire.com/Unix/AwkRef.html" rel="nofollow">awk quickref</a> | <a href="https://www.howtogeek.com/562941/how-to-use-the-awk-command-on-linux/" rel="nofollow">htg awk</a> | <a href="https://linuxize.com/post/awk-command/" rel="nofollow">lxe awk</a> | <a href="https://ferd.ca/awk-in-20-minutes.html" rel="nofollow">awk in 20</a> | <a href="http://www.grymoire.com/Unix/Sed.html" rel="nofollow">sed</a> | <a href="https://www.howtogeek.com/666395/how-to-use-the-sed-command-on-linux" rel="nofollow">sed, htg</a> | <a href="https://www.maketecheasier.com/working-with-text-on-linux-command-line/" rel="nofollow">13 CLI cmds</a> | <a href="https://www.howtogeek.com/663056/how-to-use-the-dig-command-on-linux/" rel="nofollow">dig</a> | <a href="https://geekflare.com/netstat-command-usage-on-windows/" rel="nofollow">netstat cmds</a> | <a href="https://www.makeuseof.com/tag/html-cheat-sheet/" rel="nofollow">html</a> | bash alias: <code>function ct { curl cheat.sh\/&#34;$1&#34;; }</code> | <a href="https://github.com/chubin/cheat.sh" rel="nofollow">on github</a> |
<a href="https://opensource.com/tags/command-line" rel="nofollow">CLI articles</a> |</p>

<p><strong>apachectl</strong> <code>sudo apache2ctl -M</code>   (show all loaded modules) | <code>sudo apache2ctl -D DUMP_RUN_CFG</code> | <code>sudo apache2ctl -D DUMP_VHOSTS</code> | <code>sudo apache2ctl -S</code>  (show parsed VHost settings) | <code>sudo apachectl -t</code>  (apache config test) |
<strong>apt</strong>   <code>apt-cache search php7.3</code> | <code>apt-cache show php7.3</code>
install pkgs “kept back”: <code>sudo apt-get dist-upgrade</code> | <code>sudo apt-get --with-new-pkgs upgrade</code> |
Clean up partial package: <code>sudo apt autoclean</code>
Clean up apt cache: <code>sudo apt-get clean</code>
Clean up unused dependencies: <code>sudo apt autoremove</code>
Uninstall application: <code>sudo apt autoremove application-name</code>
<code>apt list --installed</code> | <code>grep &#34; installed&#34; /var/log/dpkg.log</code> (also log.1) | <code>apt show &lt;pkg&gt;</code> | <code>apt purge &lt;unneeded package&gt;</code> | <code>sudo apt-mark showhold</code> | <code>sudo apt-mark unhold package_name</code> | <code>sudo apt autoremove</code> | <code>sudo apt autoclean</code> |
<code>sudo apt-get remove --purge $(dpkg -l | grep &#34;^rc&#34; | awk &#39;{print $2}&#39;)</code> <mark>remove rc residual packages</mark>
<strong>awk</strong>   <code>awk &#39;{print $5}&#39; | grep -Eo &#39;([0-9]{1,3}\.){3}[0-9]{1,3}&#39;| sort</code>
<strong>cat</strong>   <code>cat papers_to_read.htm | sort | cut -c 1-50 | uniq -d</code> (find duplicate lines)
<strong>chmod</strong>   <code>chmod --reference=reference_file file [f2 f3]</code> | <strong>chown</strong> <code>chown --reference=reference_file file [f2]f3</code> |
<strong>comm</strong>   <code>comm -12 &lt;(sort file1.txt) &lt;(sort file2.txt)</code> find common lines in two files
<strong>cp</strong>   <code>sudo cp -p pedit.html blogview.html</code> [cp -rp doc] | <a href="https://fabianlee.org/2018/10/15/linux-copy-a-directory-preserving-ownership-permissions-and-modification-date/" rel="nofollow">cp preserving ownership, permissions</a>
<strong>curl</strong>   <code>curl cheat.sh/find</code> | <code>curl ifconfig.io</code> | <code>curl ipinfo.io</code> | <code>curl http://ipv4.icanhazip.com</code> or <code>curl http://icanhazip.com</code> or <code>curl http://ip.fossdaily.xyz</code> | <code>curl --ssl</code> | <code>curl --insecure</code> | <code>curl -I http://domain.com</code> (headers info) | <a href="https://opensource.com/article/20/5/curl-cheat-sheet" rel="nofollow">article</a> | <a href="https://catonmat.net/cookbooks/curl" rel="nofollow">curl cookbook</a> |
<strong>dig</strong>  <code>dig example.com ANY +noall +answer</code>
<strong>dpkg</strong> <code>dpkg -l | grep &#34;^rc&#34;</code> | <code>sudo apt-get remove --purge $(dpkg -l | grep &#34;^rc&#34; | awk &#39;{print $2}&#39;)</code>
<strong>find</strong>   <code>find . -maxdepth 1 -type f -name &#34;*.md&#34; -exec ls -al {} \;</code> | <code>find /tmp -type f -name &#34;.htaccess&#34; -exec grep -EHi &#39;(Redirect|RewriteRule)&#39; {} \;</code> | <code>find . -type f -perm 777 -exec chmod 644 {} \;</code> | <code>find /home -type d -perm -o+w -exec ls -ld {} \;</code>  find world-writable directories in /home
<strong>gpg</strong>   <code>gpg --output outfile.gpg --symmetric --cipher-algo AES256 file.ext</code> |  <code>gpg -o original_file.txt -d file.txt.gpg</code> |
<strong>grep</strong>   <code>grep -Eri &#39;(Redirect|RewriteRule)&#39; /etc/apache2/</code>
<strong>iptables</strong> <code>sudo iptables -L</code> | <code>sudo iptables-save &gt;iptables.rules</code> | <code>sudo iptables-restore &lt;iptables.rules</code> | <a href="https://help.ubuntu.com/community/IptablesHowTo" rel="nofollow">ubuntu iptables doc</a> |
<strong>journalctl</strong>   <code>journalctl -u ssh.service | journalctl -u network.service</code> | <a href="https://www.howtogeek.com/499623/how-to-use-journalctl-to-read-linux-system-logs/" rel="nofollow">journalctl article</a> |
<strong>ls</strong> <code>ls -H</code> (follow symbolic links) | <code>ls -Al | tr -s &#39; &#39; | cut -f9- -d&#39; &#39;</code> (list just file and folder names; -R for dir recursion)
<strong>netstat</strong>   <code>netstat -tulpn | netstat -npl</code> | <code>netstat -tulpn | netstat -npl</code> | <code>netstat -plane | grep :80 | awk &#39;{print $5}&#39;</code> | <code>grep -Eo &#39;([0-9]{1,3}\.){3}[0-9]{1,3}&#39; | sort | uniq -c | sort -n</code>  conn port 80
<strong>perl</strong>   <code>perl -pi -e &#39;s,RoseHosting,BestManagedVPS&#39; file.php</code> Replace all string instances w/o opening file w text editor
<strong>pscp</strong> <code>pscp -agent -i &lt;keyfile&gt; -P &lt;port&gt;</code> (-agent is for pageant)
<strong>sed</strong>   <code>sed -e &#34;s/\r//g&#34; file &gt; newfile</code> remove newline chars from file | <code>sed -i &#39;s/search/repace/g&#39; *.php</code>  replace string in all specified files |
<strong>systemctl</strong>   <code>sudo systemctl restart apache2</code> | <code>sudo systemctl -a</code> | <code>sudo systemctl --state active</code> | <code>sudo systemctl list-timers</code> | <code>sudo systemctl list-unit-files</code> | <code>sudo systemctl list-unit-files | grep -i docker</code> |
<code>sudo systemctl | grep running</code> (list <em>running</em> services) | <code>sudo systemctl list-unit-files | grep enabled</code>  (list <em>enabled</em> services) |
<code>sudo systemctl reload ssh.service</code> | <code>systemctl list-unit-files --type=service</code> | <code>systemctl list-dependencies graphical.target</code> | <a href="https://opensource.com/article/20/5/systemd-units" rel="nofollow">article</a> | <code>sudo systemctl enable apache2</code> | <code>sudo systemctl disable apache2</code> | <code>sudo systemctl is-enabled apache2</code> | <a href="https://linoxide.com/linux-how-to/enable-disable-services-ubuntu-systemd-upstart/" rel="nofollow">article</a> |
<strong>tar</strong>   <code>tar -cvzf archive-name.tar.gz directory-name</code> |  <code>tar -C /diff-folder -xvf yourfile.tar</code> to extract to a different directory |
<strong>timedatectl</strong>   <code>timedatectl</code> | Bash date to/from unix epoch time: <code>date +%s</code> | <code>date -d @&lt;unix epoch time&gt;</code> |
<strong>vim</strong> <code>:w !sudo tee %</code> |  <code>:set ignorecase</code> |  <code>:set ff=unix</code> or <code>:set ff=dos</code> | <code>:set number</code> or <code>:set nonumber</code> | <code>:nohl</code> |</p>

<p><code>df -h</code> | <code>df -T</code>
<code>du -sh</code>
<code>dpkg-query -L &lt;package name&gt;</code>   (list files in package)
<code>faillog</code> | <code>free</code> |
<code>history -c</code>
<code>host ipaddr|domain</code>  (Cloud Shell: get ip addr for domain or domain for ip addr, etc)
<code>hostnamectl status</code>
<code>id &lt;username&gt;</code>
<code>sudo iptables -L -nv --line-numbers</code> | <code>sudo iptables-restore &lt; /etc/iptables/rules.v4</code> |
<code>lastlog</code> | <code>last</code>
<code>sudo lshw</code>
<code>sudo sshd -T</code> | /etc/ssh/sshd_config | <a href="https://linux-audit.com/audit-and-harden-your-ssh-configuration/" rel="nofollow">ssh security hardening</a> |
lsb_release -a <code>| cat /proc/version</code>
<code>wget --no-check-certificate</code>
<code>whatis</code>
<code>zgrep -E &#34;^(Remove:|Purge)&#34; /var/log/apt/history.log*</code>
<code>sudo -u www-data php occ app:list</code>
<code>zip -d gallery.zip &#34;picture_43_9.jpg&#34;</code>  (delete file from zip, note zip goes first, followed by file)</p>

<p><code>gcloud info</code> | <code>gcloud version</code> |
Windows: <code>netstat | findstr ESTABLISHED</code></p>

<p><a href="https://victoria.dev/blog/how-to-replace-a-string-in-a-dozen-old-blog-posts-with-one-sed-terminal-command/" rel="nofollow">Replace string recursively with find and sed</a>
<a href="https://askubuntu.com/questions/365965/how-to-remove-all-rc-residual-packages-using-command-line-at-once" rel="nofollow">Remove all dpkg rc residual packages</a></p>

<p>delete every line until PATTERN, that line included: <code>cat index.html | sed &#39;1,/body onload/d&#39;</code>
print (p) from the first line matching PATTERN to the end ($): <code>cat index.html | sed -n &#39;/body onload/,$p&#39;</code></p>

<p>Which Linux distro is running: <code>cat /etc/*-release</code></p>

<p><a href="https://dev.to/awwsmm/101-bash-commands-and-tips-for-beginners-to-experts-30je" rel="nofollow">101 Bash Commands</a> | <a href="https://blog.balthazar-rouberol.com/text-processing-in-the-shell" rel="nofollow">Text Processing in the Shell</a> |
<a href="https://towardsdatascience.com/mastering-file-and-text-manipulation-with-awk-utility-65fc09d56bef" rel="nofollow">Mastering File And Text Manipulation With Awk Utility</a></p>

<pre><code>dpkg queries:

-l, --list package-name-pattern...
    List packages matching given pattern.
-s, --status package-name...
    Report status of specified package.
-L, --listfiles package-name...
    List files installed to your system from package-name.
-S, --search filename-search-pattern...
    Search for a filename from installed packages.
-p, --print-avail package-name...
    On debian/ubuntu, use instead: apt-cache show package-name
    Display details about package-name, as found in /var/lib/dpkg/available. 
</code></pre>

<p><a href="https://www.labnol.org/network-commands-200706" rel="nofollow">Useful network commands, labnol</a>
<a href="https://dev.to/tracycss/basic-regex-in-javascript-for-beginners-1dnn" rel="nofollow">Basic regex in javascript</a></p>

<p>/etc/alternatives (e.g., php cli version, check vs apache version)</p>

<p>what process(es) are running for port 443: <code>sudo lsof -t -i:443</code></p>

<p><strong><code>journalctl</code> — query the systemd journal.</strong>
<a href="https://systemd.io/" rel="nofollow">Systemd</a> has its own logging system called the <strong>journal</strong>.  To read those logs, <a href="https://www.freedesktop.org/software/systemd/man/journalctl.html" rel="nofollow">journalctl</a> is used.
The journal (<a href="https://docs.datadoghq.com/integrations/journald/" rel="nofollow">journald</a>) stores log data in binary format, unlike past services that stored logs in plain text. As such, <code>journalctl</code> is used to transmute binary logs into readable plain text. Check out <a href="https://www.loggly.com/ultimate-guide/using-journalctl/" rel="nofollow">The ultimate guide to using journalctl</a>.
Another good read is <a href="https://www.kernel.org/doc/Documentation/ABI/testing/dev-kmsg" rel="nofollow">kmsg</a>. Kmsg (/dev/kmsg) is a file stored in the Linux filesystem, used to store messages from the Kernel, and is used by dmesg and klogd.</p>

<p><a href="https://haydenjames.io/linux-commands-frequently-used-by-linux-sysadmins-part-5/" rel="nofollow">Linux Commands frequently used by Linux Sysadmins – Part 5</a></p>

<p><a href="https://dev.to/shaikh/how-to-manage-background-processes-in-linux-1d2m" rel="nofollow">How to manage background processes in Linux</a></p>

<p><a href="https://access.redhat.com/sites/default/files/attachments/rh_ip_command_cheatsheet_1214_jcs_print.pdf" rel="nofollow">cheatsheet for ip commands <a href="/scitech/tag:network" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">network</span></a> <a href="/scitech/tag:linux" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">linux</span></a></a></p>
]]></content:encoded>
      <guid>https://qua.name/scitech/new-commands</guid>
      <pubDate>Thu, 12 Nov 2020 23:10:54 +0100</pubDate>
    </item>
    <item>
      <title>DynamoDB</title>
      <link>https://qua.name/scitech/dynamodb</link>
      <description>&lt;![CDATA[AWS DynamoDB forum&#xA;&#xA;Efficiency considerations:&#xA;FilterExpressions are executed one the items are returned.&#xA;&#xA;Example Code:&#xA;Complete example, stackoverflow&#xA;&#xA;a href=&#34;https://www.infoq.com/articles/mars-rover-application-DynamoDB/&#34;Building a Mars Rover Application with DynamoDB/a&#xA;&#xA;Two videos, you will find some solutions there if you really want to make it right [source]: &#xA;https://www.youtube.com/watch?v=HaEPXoXVf2k&#xA;https://www.youtube.com/watch?v=DIQVJqiSUkE]]&gt;</description>
      <content:encoded><![CDATA[<p><a href="https://forums.aws.amazon.com/tags/dynamodb" rel="nofollow">AWS DynamoDB forum</a></p>

<p><strong>Efficiency considerations:</strong>
+ FilterExpressions are executed one the items are returned.</p>

<p><strong>Example Code:</strong>
<a href="https://stackoverflow.com/questions/25806267/need-a-complete-example-for-dynamodb-with-php/30701842" rel="nofollow">Complete example, stackoverflow</a></p>

<p><a href="https://www.infoq.com/articles/mars-rover-application-DynamoDB/" rel="nofollow">Building a Mars Rover Application with DynamoDB</a></p>

<p>Two videos, you will find some solutions there if you really want to make it right <a href="https://old.reddit.com/r/serverless/comments/k24218/nosql_dynamodb_model_design_architecture_help/" rel="nofollow">[source]</a>:
<a href="https://www.youtube.com/watch?v=HaEPXoXVf2k" rel="nofollow">https://www.youtube.com/watch?v=HaEPXoXVf2k</a>
<a href="https://www.youtube.com/watch?v=DIQVJqiSUkE" rel="nofollow">https://www.youtube.com/watch?v=DIQVJqiSUkE</a></p>
]]></content:encoded>
      <guid>https://qua.name/scitech/dynamodb</guid>
      <pubDate>Thu, 12 Nov 2020 20:55:01 +0100</pubDate>
    </item>
    <item>
      <title>Best Encryption Info</title>
      <link>https://qua.name/scitech/best-encryption-info</link>
      <description>&lt;![CDATA[Sodium-Plus references, notes&#xA;a href=&#34;https://dev.to/paragonie/sodium-plus-a-positive-cryptography-experience-for-javascript-developers-2p08&#34;Sodium-Plus: A Positive Cryptography Experience for JavaScript Developers/a&#xA;&#xA;a href=&#34;https://dev.to/paragonie/message-encryption-in-javascript-and-php-cg9&#34;Message Encryption in JavaScript and PHP/a&#xA;a href=&#34;https://paragonie.com/blog/2019/10/improving-cryptography-javascript-ecosystem&#34;Improving the Cryptography of the JavaScript Ecosystem/a&#xA;a href=&#34;https://dev.to/paragonie/libsodium-quick-reference&#34;Libsodium Quick Reference on Dev.to/a&#xA;Scott Arciszewski articles on Dev.to&#xA;a href=&#34;https://dev.to/martinheinz/security-and-cryptography-mistakes-you-are-probably-doing-all-the-time-4ill&#34;Security and Cryptography Mistakes You Are Probably Doing All The Time/a&#xA;https://download.libsodium.org/doc/&#xA;&#xA;Cryptography Terms and Concepts for Developers | Comparison of Cryptography Libraries  &#xA;Cryptographic tutorial using libsodium and javascript  &#xA;2018 Guide to Building Secure PHP Software  &#xA;Article on libsodium with Scott Arciszewski, on Twitter as CiPHPerCoder&#xA;&#xA;Libsodium jedisct1 | &#xA;Using Libsodium in PHP Projects |&#xA;Libsodium quick reference | Official Libsodium docs | Libsodium Functions and Constants | How to install Libsodium on Php 7 in Windows&#xA;Libsodium documentation&#xA;&#xA;How to get Libsodium to work on Xampp 7.2+ | Docs on github   &#xA;Random strings and ints in PHP using sodium&#xA;&#xA;Javascript sodium: 1 | 2 | low-level API | &#xA;\_&#xA;&#xA;a href=&#34;https://pynacl.readthedocs.io/en/stable/&#34;PyNaCl: Python binding to the libsodium library — PyNaCl 1.3.0 documentation/a&#xA;&#xA;How to use HMAC: Using Encryption and Authentication Correctly (for PHP developers)  |  PHP, Simplest Two Way Encryption and How to encrypt/decrypt data in php? [source]&#xA;&#xA;Php hmac example:  https://secure.php.net/manual/en/function.openssl-encrypt.php#refsect1-function.openssl-encrypt-examples&#xA;After encrypting a MAC (message authentication code) is computed over the ciphertext and stored. This MAC should be recomputed before decrypting the ciphertext, and if it does not match the stored MAC then the ciphertext has been modified and is invalid.&#xA;&#xA;Php encryption: https://github.com/defuse/php-encryption&#xA;&#xA;How to make Php openssl encryption compatible with command line openssl&#xA;https://secure.php.net/manual/en/function.openssl-encrypt.php#104438&#xA;Commandline openssl enc by default does password-based encryption -- the supplied &#39;password&#39; is not used as the key, but is instead run through a (rather poor) derivation function to produce the actual key (also IV for cipher modes that use one). The third argument of PHP opensslencrypt is the key. You can give enc the actual key instead of a password by using -K (uppercase, not -k) with the key in hex. When using this option you also need to provide the IV explicitly with -iv and hex if the cipher mode requires it, but ECB doesn&#39;t. [source]&#xA;PS: if you don&#39;t set OPENSSLRAWDATA, opensslencrypt does base64 for you.&#xA;&#xA;You should ALWAYS use unique IV&#39;s every time you encrypt, and they should be random. If you cannot guarantee they are random, use OCB as it only requires a nonce, not an IV, and there is a distinct difference. A nonce does not drop security if people can guess the next one, an IV can cause this problem. [source]  The source explains the difference between CCM, OCB, and GCM.&#xA;&#xA;Openssl wiki: https://wiki.openssl.org/index.php/Enc&#xA;&#xA;Don&#39;t use password as an encryption key; how to create encryption key in PHP and other encryption details; use authenticated encryption | Password storage cheat sheet; very good&#xA;&#xA;Recommended # of iterations when using PKBDF2-SHA256&#xA;\__  &#xA;&#xA;Painless password hash upgrades | Password storage cheat sheet&#xA;&#xA;git-remote-gcrypt | git-crypt | git-secret&#xA;&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p><a href="https://18941969.xyz/tb/tbedit.php/?q=216813" rel="nofollow">Sodium-Plus references, notes</a>
<a href="https://dev.to/paragonie/sodium-plus-a-positive-cryptography-experience-for-javascript-developers-2p08" rel="nofollow">Sodium-Plus: A Positive Cryptography Experience for JavaScript Developers</a></p>

<p><a href="https://dev.to/paragonie/message-encryption-in-javascript-and-php-cg9" rel="nofollow">Message Encryption in JavaScript and PHP</a>
<a href="https://paragonie.com/blog/2019/10/improving-cryptography-javascript-ecosystem" rel="nofollow">Improving the Cryptography of the JavaScript Ecosystem</a>
<a href="https://dev.to/paragonie/libsodium-quick-reference" rel="nofollow">Libsodium Quick Reference on Dev.to</a>
<a href="https://dev.to/paragoniescott" rel="nofollow">Scott Arciszewski articles on Dev.to</a>
<a href="https://dev.to/martinheinz/security-and-cryptography-mistakes-you-are-probably-doing-all-the-time-4ill" rel="nofollow">Security and Cryptography Mistakes You Are Probably Doing All The Time</a>
<a href="https://download.libsodium.org/doc/" rel="nofollow">https://download.libsodium.org/doc/</a></p>

<p><a href="https://dev.to/paragonie/you-wouldnt-base64-a-password-cryptography-terms-and-concepts-for-developers" rel="nofollow">Cryptography Terms and Concepts for Developers</a> | <a href="https://en.wikipedia.org/wiki/Comparison_of_cryptography_libraries" rel="nofollow">Comparison of Cryptography Libraries</a><br>
<a href="https://github.com/sodium-friends/learntocrypto/blob/master/problems/README.md" rel="nofollow">Cryptographic tutorial using libsodium and javascript</a><br>
<a href="https://paragonie.com/blog/2017/12/2018-guide-building-secure-php-software" rel="nofollow">2018 Guide to Building Secure PHP Software</a><br>
<a href="https://www.sitepoint.com/what-would-you-pay-to-make-27-of-the-web-more-secure/" rel="nofollow">Article on libsodium with Scott Arciszewski, on Twitter as CiPHPerCoder</a></p>

<p><a href="https://github.com/jedisct1/libsodium-php" rel="nofollow">Libsodium jedisct1</a> |
<a href="https://paragonie.com/book/pecl-libsodium" rel="nofollow">Using Libsodium in PHP Projects</a> |
<a href="https://paragonie.com/blog/2017/06/libsodium-quick-reference-quick-comparison-similar-functions-and-which-one-use" rel="nofollow">Libsodium quick reference</a> | <a href="https://download.libsodium.org/doc/" rel="nofollow">Official Libsodium docs</a> | <a href="https://paragonie.com/book/pecl-libsodium/read/01-quick-start.md#const-crypto-pwhash" rel="nofollow">Libsodium Functions and Constants</a> | <a href="https://paragonie.com/book/pecl-libsodium/read/00-intro.md" rel="nofollow">How to install Libsodium on Php 7 in Windows</a>
<a href="https://libsodium.gitbook.io/doc/" rel="nofollow">Libsodium documentation</a></p>

<p><a href="https://stackoverflow.com/questions/48287186/sodium-is-not-loading-on-xampp-php-7-2" rel="nofollow"><strong>How to get Libsodium to work on Xampp 7.2+</strong></a> | <a href="https://github.com/paragonie/pecl-libsodium-doc" rel="nofollow">Docs on github</a><br>
<a href="https://paragonie.com/blog/2015/07/how-safely-generate-random-strings-and-integers-in-php" rel="nofollow">Random strings and ints in PHP using sodium</a></p>

<p>Javascript sodium: <a href="https://www.npmjs.com/package/libsodium" rel="nofollow">1</a> | <a href="https://github.com/mafintosh/sodium-encryption" rel="nofollow">2</a> | <a href="https://github.com/paixaop/node-sodium/blob/master/docs/low-level-api.md" rel="nofollow">low-level API</a> |
___</p>

<p><a href="https://pynacl.readthedocs.io/en/stable/" rel="nofollow">PyNaCl: Python binding to the libsodium library — PyNaCl 1.3.0 documentation</a></p>

<p>How to use HMAC: <a href="https://paragonie.com/blog/2015/05/using-encryption-and-authentication-correctly" rel="nofollow">Using Encryption and Authentication Correctly (for PHP developers) </a> |  <a href="http://stackoverflow.com/a/30189841/1816580" rel="nofollow">PHP, Simplest Two Way Encryption</a> and <a href="http://stackoverflow.com/a/10945097/1816580" rel="nofollow">How to encrypt/decrypt data in php?</a> [<a href="https://crypto.stackexchange.com/questions/32110/how-to-correctly-encrypt-data-with-proper-authentication-using-aes-256-cbc-in-ph" rel="nofollow">source</a>]</p>

<p>Php hmac example:  <a href="https://secure.php.net/manual/en/function.openssl-encrypt.php#refsect1-function.openssl-encrypt-examples" rel="nofollow">https://secure.php.net/manual/en/function.openssl-encrypt.php#refsect1-function.openssl-encrypt-examples</a>
After encrypting a MAC (message authentication code) is computed over the ciphertext and stored. This MAC should be recomputed before decrypting the ciphertext, and if it does not match the stored MAC then the ciphertext has been modified and is invalid.</p>

<p>Php encryption: <a href="https://github.com/defuse/php-encryption" rel="nofollow">https://github.com/defuse/php-encryption</a></p>

<p>How to make Php openssl encryption compatible with command line openssl
<a href="https://secure.php.net/manual/en/function.openssl-encrypt.php#104438" rel="nofollow">https://secure.php.net/manual/en/function.openssl-encrypt.php#104438</a>
Commandline openssl enc by default does password-based encryption — the supplied &#39;password&#39; is not used as the key, but is instead run through a (rather poor) derivation function to produce the actual key (also IV for cipher modes that use one). The third argument of PHP <code>openssl_encrypt</code> is the key. You can give enc the actual key instead of a password by using -K (uppercase, not -k) with the key in hex. When using this option you also need to provide the IV explicitly with -iv and hex if the cipher mode requires it, but ECB doesn&#39;t. [<a href="https://crypto.stackexchange.com/questions/56268/symmetric-aes-encryption-with-php-produces-different-result-than-openssl-macox" rel="nofollow">source</a>]
PS: if you don&#39;t set <code>OPENSSL_RAW_DATA</code>, openssl_encrypt does base64 for you.</p>

<p>You should ALWAYS use unique IV&#39;s every time you encrypt, and they should be random. If you cannot guarantee they are random, use OCB as it only requires a nonce, not an IV, and there is a distinct difference. A nonce does not drop security if people can guess the next one, an IV can cause this problem. [<a href="https://stackoverflow.com/questions/1220751/how-to-choose-an-aes-encryption-mode-cbc-ecb-ctr-ocb-cfb" rel="nofollow">source</a>]  The source explains the difference between CCM, OCB, and GCM.</p>

<p>Openssl wiki: <a href="https://wiki.openssl.org/index.php/Enc" rel="nofollow">https://wiki.openssl.org/index.php/Enc</a></p>

<p><a href="https://www.zimuel.it/blog/strong-cryptography-in-php" rel="nofollow">Don&#39;t use password as an encryption key; how to create encryption key in PHP and other encryption details; use authenticated encryption</a> | <a href="https://www.owasp.org/index.php/Password_Storage_Cheat_Sheet" rel="nofollow">Password storage cheat sheet; very good</a></p>

<p><a href="https://security.stackexchange.com/questions/3959/recommended-of-iterations-when-using-pkbdf2-sha256" rel="nofollow">Recommended # of iterations when using PKBDF2-SHA256</a>
___</p>

<p><a href="https://veggiespam.com/painless-password-hash-upgrades/" rel="nofollow">Painless password hash upgrades</a> | <a href="https://www.owasp.org/index.php/Password_Storage_Cheat_Sheet" rel="nofollow">Password storage cheat sheet</a></p>

<p><a href="https://github.com/spwhitton/git-remote-gcrypt" rel="nofollow">git-remote-gcrypt</a> | <a href="https://www.agwa.name/projects/git-crypt/" rel="nofollow">git-crypt</a> | <a href="http://git-secret.io/" rel="nofollow">git-secret</a></p>
]]></content:encoded>
      <guid>https://qua.name/scitech/best-encryption-info</guid>
      <pubDate>Wed, 06 May 2020 22:33:00 +0200</pubDate>
    </item>
    <item>
      <title>Commands</title>
      <link>https://qua.name/scitech/commands</link>
      <description>&lt;![CDATA[curl cheat.sh/find | curl https://cheat.sh/find | bash alias: function ct { curl cheat.sh\/&#34;$1&#34;; } | on github |&#xA;Cheat sheets: muo Vim | vim | tldr simpler man pages | find | awk | awk quickref | htg awk | sed | sed, htg | 13 CLI cmds | dig | netstat cmds | html |&#xA;ls -Al | tr -s &#39; &#39; | cut -f9- -d&#39; &#39; (list just file and folder names; -R for dir recursion)&#xA;comm -12 &lt;(sort file1.txt) &lt;(sort file2.txt) find common lines in two files&#xA;cat paperstoread.htm | sort | cut -c 1-50 | uniq -d (find duplicate lines)&#xA;gpg --output outfile.gpg --symmetric --cipher-algo AES256 file.ext |  gpg -o originalfile.txt -d file.txt.gpg |&#xA;history -c&#xA;chmod --reference=referencefile file | chown --reference=referencefile file |&#xA;sudo systemctl -a | sudo systemctl --state active |&#xA;sudo cp -p pedit.html blogview.html cp -rp doc | sudo chmod/chown --reference=f f1 [f2 f3] |&#xA;grep -Eri &#39;(Redirect|RewriteRule)&#39; /etc/apache2/&#xA;host ipaddr|domain  (Cloud Shell: get ip addr for domain or domain for ip addr, etc)&#xA;find /tmp -type f -name &#34;.htaccess&#34; -exec grep -EHi &#39;(Redirect|RewriteRule)&#39; {} \; &#xA;find . -maxdepth 1 -type f -name &#34;.md&#34; -exec ls -al {} \; |&#xA;whatis | free | find . -type f -perm 777 -exec chmod 644 {} \; |&#xA;sudo apache2ctl -M   (show all loaded modules)&#xA;sudo apache2ctl -D DUMPRUNCFG | sudo apache2ctl -D DUMPVHOSTS&#xA;sudo apache2ctl -S  (show parsed VHost settings) | sudo apachectl -t  (apache config test)&#xA;journalctl -u ssh.service | journalctl -u network.service | journalctl article | &#xA;faillog&#xA;netstat -tulpn | netstat -npl&#xA;tar -cvzf archive-name.tar.gz directory-name |  tar -C /diff-folder -xvf yourfile.tar to extract to a different directory |&#xA;curl http://ipv4.icanhazip.com or curl http://icanhazip.com or curl http://ip.fossdaily.xyz | curl --ssl | curl --insecure | curl -I http://domain.com` (headers info) |&#xA;wget --no-check-certificate&#xA;zgrep -E &#34;^(Remove:|Purge)&#34; /var/log/apt/history.log&#xA;sudo iptables -L -nv --line-numbers | sudo iptables-restore &lt; /etc/iptables/rules.v4 |&#xA;lastlog | last&#xA;install pkgs &#34;kept back&#34;: sudo apt-get dist-upgrade | sudo apt-get --with-new-pkgs upgrade |&#xA; apt list --installed | grep &#34; installed&#34; /var/log/dpkg.log (also log.1) | apt show pkg |&#xA;sudo -u www-data php occ app:list&#xA;sudo systemctl list-unit-files | sudo systemctl list-unit-files | grep -i docker |&#xA;sudo systemctl | grep running (list running services)&#xA;sudo systemctl list-unit-files | grep enabled  (list enabled services)&#xA; apt-cache search php7.3&#xA;dpkg-query -L package name   (list files in package)&#xA;zip -d gallery.zip &#34;picture439.jpg&#34;  (delete file from zip, note zip goes first, followed by file)&#xA;&#xA;netstat -plane | grep :80 | awk &#39;{print $5}&#39; | grep -Eo &#39;([0-9]{1,3}\.){3}[0-9]{1,3}&#39;| sort | uniq -c | sort -n  conn port 80&#xA;perl -pi -e &#39;s,RoseHosting,BestManagedVPS&#39; file.php Replace all string instances w/o opening file w text editor&#xA;find /home -type d -perm -o+w -exec ls -ld {} \;  find world-writable directories in /home&#xA;sed -e &#34;s/\r//g&#34; file   newfile remove newline chars from file  &#xA;sed -i &#39;s/search/repace/g&#39; .php  replace string in all specified files  &#xA;sudo sshd -T | sudo systemctl reload ssh.service | /etc/ssh/sshd_config | ssh security hardening |&#xA;sudo lshw&#xA;df -h | df -T &#xA;systemctl list-unit-files --type=service&#xA;systemctl list-dependencies graphical.target&#xA;apt list --installed&#xA;apt purge unneeded package&#xA;sudo apt autoremove | sudo apt autoclean&#xA;id username&#xA;timedatectl | Bash date to/from unix epoch time: date +%s | date -d @unix epoch time |&#xA;hostnamectl status&#xA;lsb&amp;lowbar;release -a | cat /proc/version |&#xA;gcloud info | gcloud version |&#xA;Windows: netstat | findstr ESTABLISHED&#xA;&#xA;Replace string recursively with find and sed&#xA;Remove all dpkg rc residual packages&#xA;&#xA;delete every line until PATTERN, that line included: cat index.html | sed &#39;1,/body onload/d&#39;&#xA;print (p) from the first line matching PATTERN to the end ($): cat index.html | sed -n &#39;/body onload/,$p&#39;&#xA;&#xA;Which Linux distro is running: cat /etc/-release&#xA;&#xA;text processing in the shell&#xA;&#xA;dpkg queries:&#xA;&#xA;-l, --list package-name-pattern...&#xA;    List packages matching given pattern.&#xA;-s, --status package-name...&#xA;    Report status of specified package.&#xA;-L, --listfiles package-name...&#xA;    List files installed to your system from package-name.&#xA;-S, --search filename-search-pattern...&#xA;    Search for a filename from installed packages.&#xA;-p, --print-avail package-name...&#xA;    On debian/ubuntu, use instead: apt-cache show package-name&#xA;    Display details about package-name, as found in /var/lib/dpkg/available. &#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p><code>curl cheat.sh/find</code> | <code>curl https://cheat.sh/find</code> | bash alias: <code>function ct { curl cheat.sh\/&#34;$1&#34;; }</code> | <a href="https://github.com/chubin/cheat.sh" rel="nofollow">on github</a> |
Cheat sheets: <a href="https://www.makeuseof.com/tag/vim-shortcuts-cheat-sheet/" rel="nofollow">muo Vim</a> | <a href="https://vim.rtorr.com/" rel="nofollow">vim</a> | <a href="https://tldr.fossdaily.xyz/" rel="nofollow">tldr simpler man pages</a> | <a href="http://www.grymoire.com/Unix/Find.html" rel="nofollow">find</a> | <a href="http://www.grymoire.com/Unix/Awk.html" rel="nofollow">awk</a> | <a href="http://www.grymoire.com/Unix/AwkRef.html" rel="nofollow">awk quickref</a> | <a href="https://www.howtogeek.com/562941/how-to-use-the-awk-command-on-linux/" rel="nofollow">htg awk</a> | <a href="http://www.grymoire.com/Unix/Sed.html" rel="nofollow">sed</a> | <a href="https://www.howtogeek.com/666395/how-to-use-the-sed-command-on-linux" rel="nofollow">sed, htg</a> | <a href="https://www.maketecheasier.com/working-with-text-on-linux-command-line/" rel="nofollow">13 CLI cmds</a> | <a href="https://www.howtogeek.com/663056/how-to-use-the-dig-command-on-linux/" rel="nofollow">dig</a> | <a href="https://geekflare.com/netstat-command-usage-on-windows/" rel="nofollow">netstat cmds</a> | <a href="https://www.makeuseof.com/tag/html-cheat-sheet/" rel="nofollow">html</a> |
<code>ls -Al | tr -s &#39; &#39; | cut -f9- -d&#39; &#39;</code> (list just file and folder names; -R for dir recursion)
<code>comm -12 &lt;(sort file1.txt) &lt;(sort file2.txt)</code> find common lines in two files
<code>cat papers_to_read.htm | sort | cut -c 1-50 | uniq -d</code> (find duplicate lines)
<code>gpg --output outfile.gpg --symmetric --cipher-algo AES256 file.ext</code> |  <code>gpg -o original_file.txt -d file.txt.gpg</code> |
<code>history -c</code>
<code>chmod --reference=reference_file file</code> | <code>chown --reference=reference_file file</code> |
<code>sudo systemctl -a</code> | <code>sudo systemctl --state active</code> |
<code>sudo cp -p pedit.html blogview.html</code> <a href="https://fabianlee.org/2018/10/15/linux-copy-a-directory-preserving-ownership-permissions-and-modification-date/" rel="nofollow">cp -rp doc</a> | <code>sudo chmod/chown --reference=f f1 [f2 f3]</code> |
<code>grep -Eri &#39;(Redirect|RewriteRule)&#39; /etc/apache2/</code>
<code>host ipaddr|domain</code>  (Cloud Shell: get ip addr for domain or domain for ip addr, etc)
<code>find /tmp -type f -name &#34;.htaccess&#34; -exec grep -EHi &#39;(Redirect|RewriteRule)&#39; {} \;</code>
<code>find . -maxdepth 1 -type f -name &#34;*.md&#34; -exec ls -al {} \;</code> |
<code>whatis</code> | <code>free</code> | <code>find . -type f -perm 777 -exec chmod 644 {} \;</code> |
<code>sudo apache2ctl -M</code>   (show all loaded modules)
<code>sudo apache2ctl -D DUMP_RUN_CFG</code> | <code>sudo apache2ctl -D DUMP_VHOSTS</code>
<code>sudo apache2ctl -S</code>  (show parsed VHost settings) | <code>sudo apachectl -t</code>  (apache config test)
<code>journalctl -u ssh.service | journalctl -u network.service</code> | <a href="https://www.howtogeek.com/499623/how-to-use-journalctl-to-read-linux-system-logs/" rel="nofollow">journalctl article</a> |
<code>faillog</code>
<code>netstat -tulpn | netstat -npl</code>
<code>tar -cvzf archive-name.tar.gz directory-name</code> |  <code>tar -C /diff-folder -xvf yourfile.tar</code> to extract to a different directory |
<code>curl http://ipv4.icanhazip.com</code> or curl http://icanhazip.com` or <code>curl http://ip.fossdaily.xyz</code> | <code>curl --ssl</code> | <code>curl --insecure</code> | <code>curl -I http://domain.com</code> (headers info) |
<code>wget --no-check-certificate</code>
<code>zgrep -E &#34;^(Remove:|Purge)&#34; /var/log/apt/history.log*</code>
<code>sudo iptables -L -nv --line-numbers</code> | <code>sudo iptables-restore &lt; /etc/iptables/rules.v4</code> |
<code>lastlog</code> | <code>last</code>
install pkgs “kept back”: <code>sudo apt-get dist-upgrade</code> | <code>sudo apt-get --with-new-pkgs upgrade</code> |
<code>apt list --installed</code> | <code>grep &#34; installed&#34; /var/log/dpkg.log</code> (also log.1) | <code>apt show &lt;pkg&gt;</code> |
<code>sudo -u www-data php occ app:list</code>
<code>sudo systemctl list-unit-files</code> | <code>sudo systemctl list-unit-files | grep -i docker</code> |
<code>sudo systemctl | grep running</code> (list <em>running</em> services)
<code>sudo systemctl list-unit-files | grep enabled</code>  (list <em>enabled</em> services)
<code>apt-cache search php7.3</code>
<code>dpkg-query -L &lt;package name&gt;</code>   (list files in package)
<code>zip -d gallery.zip &#34;picture_43_9.jpg&#34;</code>  (delete file from zip, note zip goes first, followed by file)</p>

<p><code>netstat -plane | grep :80 | awk &#39;{print $5}&#39; | grep -Eo &#39;([0-9]{1,3}\.){3}[0-9]{1,3}&#39;| sort | uniq -c | sort -n</code>  conn port 80
<code>perl -pi -e &#39;s,RoseHosting,BestManagedVPS&#39; file.php</code> Replace all string instances w/o opening file w text editor
<code>find /home -type d -perm -o+w -exec ls -ld {} \;</code>  find world-writable directories in /home
<code>sed -e &#34;s/\r//g&#34; file &gt; newfile</code> remove newline chars from file<br>
<code>sed -i &#39;s/search/repace/g&#39; *.php</code>  replace string in all specified files<br>
<code>sudo sshd -T</code> | <code>sudo systemctl reload ssh.service</code> | /etc/ssh/sshd_config | <a href="https://linux-audit.com/audit-and-harden-your-ssh-configuration/" rel="nofollow">ssh security hardening</a> |
<code>sudo lshw</code>
<code>df -h</code> | <code>df -T</code>
<code>systemctl list-unit-files --type=service</code>
<code>systemctl list-dependencies graphical.target</code>
<code>apt list --installed</code>
<code>apt purge &lt;unneeded package&gt;</code>
<code>sudo apt autoremove</code> | <code>sudo apt autoclean</code>
<code>id &lt;username&gt;</code>
<code>timedatectl</code> | Bash date to/from unix epoch time: <code>date +%s</code> | <code>date -d @&lt;unix epoch time&gt;</code> |
<code>hostnamectl status</code>
lsb_release -a | <code>cat /proc/version</code> |
<code>gcloud info</code> | <code>gcloud version</code> |
Windows: <code>netstat | findstr ESTABLISHED</code></p>

<p><a href="https://victoria.dev/blog/how-to-replace-a-string-in-a-dozen-old-blog-posts-with-one-sed-terminal-command/" rel="nofollow">Replace string recursively with find and sed</a>
<a href="https://askubuntu.com/questions/365965/how-to-remove-all-rc-residual-packages-using-command-line-at-once" rel="nofollow">Remove all dpkg rc residual packages</a></p>

<p>delete every line until PATTERN, that line included: <code>cat index.html | sed &#39;1,/body onload/d&#39;</code>
print (p) from the first line matching PATTERN to the end ($): <code>cat index.html | sed -n &#39;/body onload/,$p&#39;</code></p>

<p>Which Linux distro is running: <code>cat /etc/*-release</code></p>

<p><a href="https://blog.balthazar-rouberol.com/text-processing-in-the-shell" rel="nofollow">text processing in the shell</a></p>

<pre><code>dpkg queries:

-l, --list package-name-pattern...
    List packages matching given pattern.
-s, --status package-name...
    Report status of specified package.
-L, --listfiles package-name...
    List files installed to your system from package-name.
-S, --search filename-search-pattern...
    Search for a filename from installed packages.
-p, --print-avail package-name...
    On debian/ubuntu, use instead: apt-cache show package-name
    Display details about package-name, as found in /var/lib/dpkg/available. 
</code></pre>
]]></content:encoded>
      <guid>https://qua.name/scitech/commands</guid>
      <pubDate>Mon, 02 Mar 2020 15:55:20 +0100</pubDate>
    </item>
    <item>
      <title>Cloud Shell</title>
      <link>https://qua.name/scitech/cloud-shell</link>
      <description>&lt;![CDATA[Source Repositories search article&#xA;https://cloud.google.com/community/tutorials/&#xA;https://cloud.google.com/gcp/getting-started/&#xA;https://cloud.google.com/shell/docs/examples&#xA;a href=&#34;https://cloud.google.com/blog/products/gcp/introducing-google-cloud-shels-new-code-editor&#34;Introducing Google Cloud Shell’s new code editor, Google Cloud Blog/a&#xA;&#xA;Using Google Cloud Shell as Development Environment&#xA;By default, Cloud Shell runs on a g1-small VM, which can be under-powered for some tasks. You can easily &#xA;upgrade to a n1-standard-1 by enabling “boost mode.”  This allows upgrade of the shell to n1-standard-1 VM &#xA;instance which offers 1vCPU and 3.75GB memory for 24 hours. Cloud shell by default runs on g1-small machine &#xA;type which provides 1 vCPU short periods of bursting and 1.70 GB memory.&#xA;Cloud Shell ships with a customized version of the Orion editor.&#xA;&#xA;Getting the best of Google Cloud Shell&#xA;How to run Visual Studio Code in Google Cloud Shell | github cdr/code-server |&#xA;&#xA;Get recently installed packages: &#xA;gcloud app versions list | gcloud app services list | gcloud app describe |&#xA;&#xA;Cloud Shell offers 5 GB of free storage that persists in new sessions. This is helpful if you if you have customized configuration and settings files that you prefer to work with (.bashrc, .vimrc, etc.). To take advantage of this persistent storage, simply save files to your $HOME directory. Any applications you wish to install can persist as long as the application is installed in the $HOME directory**. If you don’t need an app to persist, install it to the system outside of your home directory. Other apps and files that you create remain as long as the current session is active. The session times out after an hour of inactivity and any data outside of your $HOME directory will be lost. [source]!--more--&#xA;&#xA;apt-get message: You are running apt-get inside of Cloud Shell. Note that your Cloud Shell machine is ephemeral and no system-wide change will persist beyond session end. You can customize your environment to permanently include this package by updating your environment at  https://cloud.google.com/console/cloudshell/environment/view.  &#xA;Visit https://cloud.google.com/shell/help for more information.   &#xA;Message from running the above:  Your Cloud Shell environment is a Docker container. By default, the container is started from a Google-maintained Docker image, but you can also specify a custom Docker image for your Cloud Shell. There are two steps to customizing your Cloud Shell Environment:&#xA;  Locate a suitable Docker image to use. Our Create Custom Image tool can create a boilerplate custom image that you can use as a starting point for your image.&#xA;  Edit your environment to reference the desired image (Use default Cloud Shell image or Select image from project)&#xA;It seems the thing to do is to install any new programs to Home directory.&#xA;&#xA;Cloud Shell documentation | Examples of how you can use Cloud Shell | Run and deploy an appengine application |&#xA;&#xA;Always Free cloud shell usage limit of 5gb [source]&#xA;&#xA;If you do not access Cloud Shell for 120 days, we will delete your home disk. You will receive an email notification before we do so and simply starting a session will prevent its removal. Please consider a different solution on Google Cloud Storage for sensitive data you wish to store long term. [source]&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p><strong>Source Repositories search <a href="https://cloud.google.com/blog/products/application-development/introducing-new-cloud-source-repositories" rel="nofollow">article</a></strong>
<a href="https://cloud.google.com/community/tutorials/" rel="nofollow">https://cloud.google.com/community/tutorials/</a>
<a href="https://cloud.google.com/gcp/getting-started/" rel="nofollow">https://cloud.google.com/gcp/getting-started/</a>
<a href="https://cloud.google.com/shell/docs/examples" rel="nofollow">https://cloud.google.com/shell/docs/examples</a>
<a href="https://cloud.google.com/blog/products/gcp/introducing-google-cloud-shels-new-code-editor" rel="nofollow">Introducing Google Cloud Shell’s new code editor, Google Cloud Blog</a></p>

<p><a href="https://medium.com/google-cloud/no-localhost-no-problem-using-google-cloud-shell-as-my-full-time-development-environment-22d5a1942439" rel="nofollow">Using Google Cloud Shell as Development Environment</a>
+ By default, Cloud Shell runs on a g1-small VM, which can be under-powered for some tasks. You can easily
upgrade to a n1-standard-1 by enabling “boost mode.”  This allows upgrade of the shell to n1-standard-1 VM
instance which offers 1vCPU and 3.75GB memory for 24 hours. Cloud shell by default runs on g1-small machine
type which provides 1 vCPU short periods of bursting and 1.70 GB memory.
+ Cloud Shell ships with a customized version of the Orion editor.</p>

<p><a href="https://medium.com/google-cloud/getting-the-best-out-of-google-cloud-shell-3d6ca64bc741" rel="nofollow">Getting the best of Google Cloud Shell</a>
<a href="https://medium.com/google-cloud/how-to-run-visual-studio-code-in-google-cloud-shell-354d125d5748" rel="nofollow">How to run Visual Studio Code in Google Cloud Shell</a> | <a href="https://github.com/cdr/code-server/" rel="nofollow">github cdr/code-server</a> |</p>

<p>Get recently installed packages: <strong><code>grep &#34; install&#34; /var/log/dpkg.log</code></strong></p>

<p>gcloud app versions list | gcloud app services list | gcloud app describe |</p>

<p>Cloud Shell offers 5 GB of free storage that persists in new sessions. This is helpful if you if you have customized configuration and settings files that you prefer to work with (.bashrc, .vimrc, etc.). To take advantage of this persistent storage, simply save files to your $HOME directory. <strong>Any applications you wish to install can persist as long as the application is installed in the $HOME directory</strong>. If you don’t need an app to persist, install it to the system outside of your home directory. Other apps and files that you create remain as long as the current session is active. The session times out after an hour of inactivity and any data outside of your $HOME directory will be lost. <a href="https://www.jungledisk.com/blog/2019/05/02/exploring-the-google-cloud-platform-utilizing-cloud-shell/" rel="nofollow">[source]</a></p>

<p>apt-get message: You are running apt-get inside of Cloud Shell. Note that your Cloud Shell machine is ephemeral and no system-wide change will persist beyond session end. You can customize your environment to permanently include this package by updating your environment at  <a href="https://cloud.google.com/console/cloudshell/environment/view" rel="nofollow">https://cloud.google.com/console/cloudshell/environment/view</a>.<br>
Visit <a href="https://cloud.google.com/shell/help" rel="nofollow">https://cloud.google.com/shell/help</a> for more information.<br>
Message from running the above:  Your Cloud Shell environment is a Docker container. By default, the container is started from a Google-maintained Docker image, but you can also specify a custom Docker image for your Cloud Shell. There are two steps to customizing your Cloud Shell Environment:
  + Locate a suitable Docker image to use. Our Create Custom Image tool can create a boilerplate custom image that you can use as a starting point for your image.
  + Edit your environment to reference the desired image (Use default Cloud Shell image or Select image from project)
It seems the thing to do is to install any new programs to Home directory.</p>

<p><a href="https://cloud.google.com/shell/docs/features" rel="nofollow">Cloud Shell documentation</a> | <a href="https://cloud.google.com/shell/docs/examples" rel="nofollow">Examples of how you can use Cloud Shell</a> | <a href="https://cloud.google.com/shell/docs/examples#running_and_deploying_a_python_app_engine_application" rel="nofollow">Run and deploy an appengine application</a> |</p>

<p>Always Free cloud shell usage limit of 5gb <a href="https://cloud.google.com/free/docs/gcp-free-tier" rel="nofollow">[source]</a></p>

<p>If you do not access Cloud Shell for 120 days, we will delete your home disk. You will receive an email notification before we do so and simply starting a session will prevent its removal. Please consider a different solution on Google Cloud Storage for sensitive data you wish to store long term. <a href="https://cloud.google.com/shell/docs/limitations#usage_limits" rel="nofollow">[source]</a></p>
]]></content:encoded>
      <guid>https://qua.name/scitech/cloud-shell</guid>
      <pubDate>Fri, 14 Feb 2020 01:28:58 +0100</pubDate>
    </item>
    <item>
      <title>Upgrade GCE from Debian 9 Stretch to Debian 10 Buster</title>
      <link>https://qua.name/scitech/upgrade-gce-from-debian-9-stretch-to-debian-10-buster</link>
      <description>&lt;![CDATA[a href=&#34;https://cloud.google.com/compute/docs/disks/detach-reattach-boot-disk&#34;Detaching and Reattaching GCE Boot Disks/a Previously, boot disks were permanently attached to their VM instances. Now you can detach boot disks from your instance. This feature simplifies the process for repairing boot disks by allowing you to mount them to another instance without deleting your original instance. Additionally, you can replace boot disks for an instance rather than recreate the entire VM instance.&#xA;&#xA;debian.org doc: upgrading from debian 9&#xA;https://serverfault.com/questions/993081/policy-to-upgrade-os-images-in-google-gce?r=SearchResults&#xA;https://cloud.google.com/compute/docs/images/install-guest-environment#update-guest&#xA;https://groups.google.com/forum/#!searchin/gce-discussion/upgrade$20to$20debian$2010%7Csort:date&#xA;Differences from standard debian images&#xA;How to upgrade Debian linux distro, 8 jessie to 9 stretch&#xA;ArsTechnica article on Debian 10&#xA;a href=&#34;https://stackoverflow.com/questions/22128269/how-i-can-migrate-a-persistence-disk-from-one-project-to-another-in-compute-eng&#34;Migrate Persistence Disk from one project to another/a&#xA;Image Family &#x9;      End mainstream support, deprecation date&#xA;Debian 9 (Stretch)    July 2020&#xA;Create a snapshot before upgrading, restore snapshot to new instance and try to upgrade it to Debian 10; if all looks good, update f1-micro&#xA; &#xA;Restoring and deleting persistent disk snapshots | Create a VM instance from a snapshot |&#xA;$ sudo systemctl list-unit-files | grep google | grep enabled&#xA;google-accounts-daemon.service         enabled  &#xA;google-clock-skew-daemon.service       enabled  &#xA;google-instance-setup.service          enabled  &#xA;google-network-daemon.service          enabled  &#xA;google-shutdown-scripts.service        enabled  &#xA;google-startup-scripts.service         enabled  &#xA;&#xA;thedevx@f1-micro:/var/www/html/tips$ apt list --installed | grep google-compute&#xA;WARNING: apt does not have a stable CLI interface. Use with caution in scripts.&#xA;&#xA;google-compute-engine/google-compute-engine-stretch-stable,now 1:20190916.00-g2 all [installed]&#xA;google-compute-engine-oslogin/google-compute-engine-stretch-stable,now 1:20191014.00-g1+deb9 amd64 [installed,automatic]&#xA;python-google-compute-engine/google-compute-engine-stretch-stable,now 1:20191120.00-g1 all [installed]&#xA;python3-google-compute-engine/google-compute-engine-stretch-stable,now 1:20191120.00-g1 all [installed]&#xA;nftables Replaces iptables for Packet Filtering&#xA;In Debian Buster the iptables subsystem is replaced by nftables, a newer packet filtering system with improved syntax, streamlined ipv4/ipv6 support, and built-in support for data sets such as dictionaries and maps. You can read a more detailed list of differences on the nftables wiki.&#xA;Compatibility with existing iptables scripts is provided by the iptables-nft command. The nftables wiki also has advice on transitioning from iptables to nftables. [source]&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p><a href="https://cloud.google.com/compute/docs/disks/detach-reattach-boot-disk" rel="nofollow">Detaching and Reattaching GCE Boot Disks</a> Previously, boot disks were permanently attached to their VM instances. Now you can detach boot disks from your instance. This feature simplifies the process for repairing boot disks by allowing you to mount them to another instance without deleting your original instance. Additionally, you can replace boot disks for an instance rather than recreate the entire VM instance.</p>

<p><a href="https://www.debian.org/releases/stable/amd64/release-notes/ch-upgrading.html" rel="nofollow">debian.org doc: upgrading from debian 9</a>
<a href="https://serverfault.com/questions/993081/policy-to-upgrade-os-images-in-google-gce?r=SearchResults" rel="nofollow">https://serverfault.com/questions/993081/policy-to-upgrade-os-images-in-google-gce?r=SearchResults</a>
<a href="https://cloud.google.com/compute/docs/images/install-guest-environment#update-guest" rel="nofollow">https://cloud.google.com/compute/docs/images/install-guest-environment#update-guest</a>
<a href="https://groups.google.com/forum/#!searchin/gce-discussion/upgrade$20to$20debian$2010%7Csort:date" rel="nofollow">https://groups.google.com/forum/#!searchin/gce-discussion/upgrade$20to$20debian$2010%7Csort:date</a>
<a href="https://cloud.google.com/compute/docs/images#os-details" rel="nofollow">Differences from standard debian images</a>
<a href="https://groups.google.com/forum/#!msg/gce-discussion/fsXop65skiU/wTbLR7RiCQAJ" rel="nofollow">How to upgrade Debian linux distro, 8 jessie to 9 stretch</a>
<a href="https://arstechnica.com/information-technology/2019/09/debian-10-playing-catch-up-with-the-rest-of-the-linux-world-thats-a-good-thing/" rel="nofollow">ArsTechnica article on Debian 10</a>
<a href="https://stackoverflow.com/questions/22128269/how-i-can-migrate-a-persistence-disk-from-one-project-to-another-in-compute-eng" rel="nofollow">Migrate Persistence Disk from one project to another</a></p>

<pre><code>Image Family 	      End mainstream support, deprecation date
Debian 9 (Stretch)    July 2020
</code></pre>

<p>Create a snapshot before upgrading, restore snapshot to new instance and try to upgrade it to Debian 10; if all looks good, update f1-micro</p>

<p><a href="https://cloud.google.com/compute/docs/disks/restore-and-delete-snapshots" rel="nofollow">Restoring and deleting persistent disk snapshots</a> | <a href="https://cloud.google.com/compute/docs/instances/create-start-instance#createsnapshot" rel="nofollow">Create a VM instance from a snapshot</a> |</p>

<pre><code>$ sudo systemctl list-unit-files | grep google | grep enabled
google-accounts-daemon.service         enabled  
google-clock-skew-daemon.service       enabled  
google-instance-setup.service          enabled  
google-network-daemon.service          enabled  
google-shutdown-scripts.service        enabled  
google-startup-scripts.service         enabled  

thedevx@f1-micro:/var/www/html/tips$ apt list --installed | grep google-compute
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

google-compute-engine/google-compute-engine-stretch-stable,now 1:20190916.00-g2 all [installed]
google-compute-engine-oslogin/google-compute-engine-stretch-stable,now 1:20191014.00-g1+deb9 amd64 [installed,automatic]
python-google-compute-engine/google-compute-engine-stretch-stable,now 1:20191120.00-g1 all [installed]
python3-google-compute-engine/google-compute-engine-stretch-stable,now 1:20191120.00-g1 all [installed]
</code></pre>

<p><strong>nftables Replaces iptables for Packet Filtering</strong>
In Debian Buster the iptables subsystem is replaced by nftables, a newer packet filtering system with improved syntax, streamlined ipv4/ipv6 support, and built-in support for data sets such as dictionaries and maps. You can read a more detailed list of differences on the nftables wiki.
Compatibility with existing iptables scripts is provided by the iptables-nft command. The nftables wiki also has advice on transitioning from iptables to nftables. <a href="https://www.digitalocean.com/community/tutorials/what-s-new-in-debian-10-buster" rel="nofollow">[source]</a></p>
]]></content:encoded>
      <guid>https://qua.name/scitech/upgrade-gce-from-debian-9-stretch-to-debian-10-buster</guid>
      <pubDate>Tue, 03 Dec 2019 04:48:13 +0100</pubDate>
    </item>
    <item>
      <title>Fail2ban</title>
      <link>https://qua.name/scitech/fail2ban</link>
      <description>&lt;![CDATA[a href=&#34;https://www.linode.com/docs/security/using-fail2ban-to-secure-your-server-a-tutorial/&#34;Using Fail2ban to Secure Your Server - A Tutorial | Linode/abr&#xA;a href=&#34;https://blog.rapid7.com/2017/02/13/how-to-protect-ssh-and-apache-using-fail2ban-on-ubuntu-linux/&#34;How to Protect SSH with Fail2Ban on Ubuntu [Guide]; Rapid7 /a&#xA;a href=&#34;https://www.techrepublic.com/article/how-to-install-fail2ban-on-ubuntu-server-18-04/&#34;How to install fail2ban on Ubuntu Server 18.04 - TechRepublic/a&#xA;a href=&#34;https://www.osradar.com/secure-a-web-server-with-fail2ban-on-ubuntu-18-04/&#34;Secure a web server with Fail2ban on Ubuntu 18.04 - OSRadar/a&#xA;a href=&#34;https://laymanclass.com/how-to-use-fail2ban-on-ubuntu-18-04/&#34;How to use Fail2ban on Ubuntu 18.04 - LaymanClass/a&#xA;a href=&#34;https://confluence.jaytaala.com/display/TKB/Implement+fail2ban+with+custom+apache+filter%2C+ipset%2C+and+a+sample+based+verification+approach&#34;Implement fail2ban with custom apache filter, ipset, and a sample based verification approach - jaytaala.com/a&#xA;a href=&#34;https://www.linode.com/docs/security/using-fail2ban-to-secure-your-server-a-tutorial/&#34;Using Fail2ban to Secure Your Server - A Tutorial | Linode/abr&#xA;a href=&#34;https://www.digitalocean.com/community/tutorials/how-to-protect-an-apache-server-with-fail2ban-on-ubuntu-14-04&#34;Protect Apache Server w Fail2Ban, Ubuntu 14; DigitalOcean/a&#xA;a href=&#34;https://askubuntu.com/questions/1116001/block-badbot-with-fail2ban-via-user-agents-in-access-log/1116974&#34;Block badbot with fail2ban via user agents in access.log - Ask Ubuntu/a&#xA;Monitoring the fail2ban log&#xA;a href=&#34;https://www.fail2ban.org/wiki/index.php/MANUAL08&#34;Fail2ban Manual 0.8/a&#xA;Fail2ban section of Dennis&#39; note on nextcloud, nginx, docker&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<ul><li><a href="https://www.linode.com/docs/security/using-fail2ban-to-secure-your-server-a-tutorial/" rel="nofollow">Using Fail2ban to Secure Your Server – A Tutorial | Linode</a><br></li>
<li><a href="https://blog.rapid7.com/2017/02/13/how-to-protect-ssh-and-apache-using-fail2ban-on-ubuntu-linux/" rel="nofollow">How to Protect SSH with Fail2Ban on Ubuntu [Guide]; Rapid7 </a></li>
<li><a href="https://www.techrepublic.com/article/how-to-install-fail2ban-on-ubuntu-server-18-04/" rel="nofollow">How to install fail2ban on Ubuntu Server 18.04 – TechRepublic</a></li>
<li><a href="https://www.osradar.com/secure-a-web-server-with-fail2ban-on-ubuntu-18-04/" rel="nofollow">Secure a web server with Fail2ban on Ubuntu 18.04 – OSRadar</a></li>
<li><a href="https://laymanclass.com/how-to-use-fail2ban-on-ubuntu-18-04/" rel="nofollow">How to use Fail2ban on Ubuntu 18.04 – LaymanClass</a></li>
<li><a href="https://confluence.jaytaala.com/display/TKB/Implement+fail2ban+with+custom+apache+filter%2C+ipset%2C+and+a+sample+based+verification+approach" rel="nofollow">Implement fail2ban with custom apache filter, ipset, and a sample based verification approach – jaytaala.com</a></li>
<li><a href="https://www.linode.com/docs/security/using-fail2ban-to-secure-your-server-a-tutorial/" rel="nofollow">Using Fail2ban to Secure Your Server – A Tutorial | Linode</a><br></li>
<li><a href="https://www.digitalocean.com/community/tutorials/how-to-protect-an-apache-server-with-fail2ban-on-ubuntu-14-04" rel="nofollow">Protect Apache Server w Fail2Ban, Ubuntu 14; DigitalOcean</a></li>
<li><a href="https://askubuntu.com/questions/1116001/block-badbot-with-fail2ban-via-user-agents-in-access-log/1116974" rel="nofollow">Block badbot with fail2ban via user agents in access.log – Ask Ubuntu</a></li>
<li><a href="https://www.the-art-of-web.com/system/fail2ban-log/" rel="nofollow">Monitoring the fail2ban log</a></li>
<li><a href="https://www.fail2ban.org/wiki/index.php/MANUAL_0_8" rel="nofollow">Fail2ban Manual 0.8</a></li>
<li><a href="https://dennisnotes.com/note/20180831-nextcloud-docker-nginx-reverse-proxy/" rel="nofollow">Fail2ban section of Dennis&#39; note on nextcloud, nginx, docker</a></li></ul>
]]></content:encoded>
      <guid>https://qua.name/scitech/fail2ban</guid>
      <pubDate>Fri, 29 Nov 2019 05:53:20 +0100</pubDate>
    </item>
    <item>
      <title>Dev Projects</title>
      <link>https://qua.name/scitech/dev-projects</link>
      <description>&lt;![CDATA[ScraPy |  Use ScraPy to Build a Basic Web Crawler to Pull Information From a Website |&#xA;&#xA;What to do with 2nd Oracle free tier Compute Instance?  nginx?&#xA;&#xA;Apache Guacamole Apache Guacamole is a clientless remote desktop gateway. It supports standard protocols like VNC, RDP, and SSH. We call it clientless because no plugins or client software are required. Thanks to HTML5, once Guacamole is installed on a server, all you need to access your desktops is a web browser.&#xA;&#xA;https://www.mapbox.com/&#xA;&#xA;Add ubuntu to www-data group&#xA;&#xA;markdown editor | stack editor | use pdlist with parsedown? |&#xA;&#xA;Setup gce apache2 as reverse proxy to serve content from oci as backend server, or vice versa&#xA;Examples: JCoyle | DOsup1/sup | netnea |&#xA;Apache proxy server in addition to web server&#xA;&#xA;Install python3-pip on oci: apt search python3-pip&#xA;&#xA;sup1/supIf Apache serves both HTTP/HTTPS, your reverse proxy configuration must be placed in both the HTTP and HTTPS virtual hosts. Examples cover reverse proxying both single and multiple backend servers. Also see the python flask possibilities in that article.&#xA;&#xA;Try Hugo Learn theme on new blog&#xA;SourceHut&#xA;Setup Google Cloud Source Git Repositories&#xA;&#xA;Look at all the reverse proxy ideas&#xA;Reverse proxy for localhost security&#xA;&#xA;Tried But Decided Against&#xA;Learn Hugo and create test blog with K8spin&#xA;Look into KubeSail free tier: a href=&#34;https://kubesail.com/&#34;KubeSail | Cloud hosting as easy as Heroku, as powerful as AWS/a&#xA;Free, Automatic HTTPS for Every Application. A basic Ingress object which creates a web-accessible site using your free *.kubesail.io domain. You can now check your Certificates with kubectl get certificates! This cert will automatically be used and HTTPS should &#34;just work&#34;!&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p><a href="https://scrapy.org/" rel="nofollow">ScraPy</a> |  <a href="https://www.makeuseof.com/tag/build-basic-web-crawler-pull-information-website-2/" rel="nofollow">Use ScraPy to Build a Basic Web Crawler to Pull Information From a Website</a> |</p>

<p>What to do with 2nd Oracle free tier Compute Instance?  nginx?</p>

<p><a href="https://guacamole.apache.org/" rel="nofollow">Apache Guacamole</a> Apache Guacamole is a clientless remote desktop gateway. It supports standard protocols like VNC, RDP, and SSH. We call it clientless because no plugins or client software are required. Thanks to HTML5, once Guacamole is installed on a server, all you need to access your desktops is a web browser.</p>

<p><a href="https://www.mapbox.com/" rel="nofollow">https://www.mapbox.com/</a></p>

<p>Add ubuntu to www-data group</p>

<p><a href="https://jbt.github.io/markdown-editor/#nY+xCsIwFEX39xUPHdQg7V5qV0c/wAqNyWsTTPpKEon9e7UOOrsdLgcOd41+1qwATrc9OkqbiJEIhZBXvidMxkYhAOSo0XDG7wqg5IgWvX2gHTGyJzTJO6glmkD9YWVSmmJVljnnYmAeHBWK/ao5LlyXsgE4B9Lapsv2V/5sb3n3qlTtFHgI0mNvHcXWzwsAdEtTsSZDgbp/LjwB" rel="nofollow">markdown editor</a> | <a href="https://stackedit.io/" rel="nofollow">stack editor</a> | use pdlist with parsedown? |</p>

<p>Setup gce apache2 as reverse proxy to serve content from oci as backend server, or vice versa
Examples: <a href="https://www.jamescoyle.net/how-to/116-simple-apache-reverse-proxy-example" rel="nofollow">JCoyle</a> | <a href="https://www.digitalocean.com/community/tutorials/how-to-use-apache-as-a-reverse-proxy-with-mod_proxy-on-ubuntu-16-04" rel="nofollow">DO</a><sup><strong>1</strong></sup> | <a href="https://www.netnea.com/cms/apache-tutorial-9_setting-up-a-reverse-proxy/" rel="nofollow">netnea</a> |
<a href="https://www.google.com/search?q=apache+proxy+server+in+addition+to+web+server" rel="nofollow">Apache proxy server in addition to web server</a></p>

<p>Install python3-pip on oci: <code>apt search python3-pip</code></p>

<p><sup><strong>1</strong></sup>If Apache serves both HTTP/HTTPS, your reverse proxy configuration must be placed in both the HTTP and HTTPS virtual hosts. Examples cover reverse proxying both single and multiple backend servers. Also see the python flask possibilities in that article.</p>

<p>Try <a href="https://learn.netlify.com/en/" rel="nofollow">Hugo Learn theme</a> on new blog
<a href="https://sourcehut.org/" rel="nofollow">SourceHut</a>
Setup <a href="https://cloud.google.com/source-repositories/docs/creating-an-empty-repository" rel="nofollow">Google Cloud Source Git Repositories</a></p>

<p>Look at all the reverse proxy ideas
<a href="https://dev.to/patarapolw/security-on-localhost-3dbc" rel="nofollow">Reverse proxy for localhost security</a></p>

<p><strong>Tried But Decided Against</strong>
<a href="https://medium.com/k8spin/what-does-fit-in-a-low-resources-namespace-2nd-part-hugo-blog-d242be14495" rel="nofollow">Learn Hugo and create test blog with K8spin</a>
Look into KubeSail free tier: <a href="https://kubesail.com/" rel="nofollow">KubeSail | Cloud hosting as easy as Heroku, as powerful as AWS</a>
<a href="https://kubesail.com/blog/automatic-tls" rel="nofollow">Free, Automatic HTTPS for Every Application</a>. A basic Ingress object which creates a web-accessible site using your free *.kubesail.io domain. You can now check your Certificates with kubectl get certificates! This cert will automatically be used and HTTPS should “just work”!</p>
]]></content:encoded>
      <guid>https://qua.name/scitech/dev-projects</guid>
      <pubDate>Thu, 24 Oct 2019 22:03:09 +0200</pubDate>
    </item>
    <item>
      <title>WSL</title>
      <link>https://qua.name/scitech/wsl</link>
      <description>&lt;![CDATA[Install WSL, dq | Install WSL, dated May 2019 | Install WSL, dbp |&#xA;&#xA;Docker with WSL]]&gt;</description>
      <content:encoded><![CDATA[<p><a href="https://www.dataquest.io/blog/tutorial-install-linux-on-windows-wsl/" rel="nofollow">Install WSL, dq</a> | <a href="https://www.computerhope.com/issues/ch001879.htm" rel="nofollow">Install WSL, dated May 2019</a> | <a href="https://www.debugpoint.com/2019/07/install-ubuntu-linux-windows-10-wsl/" rel="nofollow">Install WSL, dbp</a> |</p>

<p><a href="https://nickjanetakis.com/blog/setting-up-docker-for-windows-and-wsl-to-work-flawlessly" rel="nofollow">Docker with WSL</a></p>
]]></content:encoded>
      <guid>https://qua.name/scitech/wsl</guid>
      <pubDate>Thu, 24 Oct 2019 21:28:08 +0200</pubDate>
    </item>
  </channel>
</rss>