<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>My Tips</title><link>https://tips.1707.io/</link><description>Recent content on My Tips</description><generator>Hugo</generator><language>en</language><atom:link href="https://tips.1707.io/index.xml" rel="self" type="application/rss+xml"/><item><title/><link>https://tips.1707.io/docs/cli-tools/cURL/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://tips.1707.io/docs/cli-tools/cURL/</guid><description>&lt;h1 id="curl"&gt;cURL&lt;a class="anchor" href="#curl"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;h2 id="command-line-options"&gt;Command Line Options&lt;a class="anchor" href="#command-line-options"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id="specify-a-username-and-password-for-basic-auth"&gt;Specify a username and password for basic auth&lt;a class="anchor" href="#specify-a-username-and-password-for-basic-auth"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;curl --user 'username:somesecurepassword' https://mysite
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="specify-a-useragent-to-send"&gt;Specify a UserAgent to send&lt;a class="anchor" href="#specify-a-useragent-to-send"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;curl --user-agent &amp;quot;Mozilla/5.0 (X11; Linux x86_64; rv:152.0) Gecko/20100101 Firefox/152.0&amp;quot; https://mysite
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="include-json-with-shell-variables"&gt;Include JSON with shell variables&lt;a class="anchor" href="#include-json-with-shell-variables"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;generate_json_data()
{
cat &amp;lt;&amp;lt;EOF
{
&amp;quot;state&amp;quot;: &amp;quot;NORMAL&amp;quot;,
&amp;quot;content&amp;quot;: &amp;quot;${content} #${cat}&amp;quot;,
&amp;quot;visibility&amp;quot;: &amp;quot;PRIVATE&amp;quot;
}
EOF
}

curl -X POST -H &amp;quot;Authorization: Bearer ${APIToken}&amp;quot; -H &amp;quot;Content-Type: application/json&amp;quot; -d &amp;quot;$(generate_json_data)&amp;quot; http://example.com/api/input
&lt;/code&gt;&lt;/pre&gt;</description></item><item><title/><link>https://tips.1707.io/docs/cli-tools/date/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://tips.1707.io/docs/cli-tools/date/</guid><description>&lt;h1 id="date"&gt;date&lt;a class="anchor" href="#date"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;h2 id="command-line-options"&gt;Command Line Options&lt;a class="anchor" href="#command-line-options"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id="year-month-date"&gt;Year-Month-Date&lt;a class="anchor" href="#year-month-date"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;date +%Y-%m-%d
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="year-month-date-hour-minute-second"&gt;Year-Month-Date Hour-Minute-Second&lt;a class="anchor" href="#year-month-date-hour-minute-second"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;date '+%Y-%m-%d %H:%M:%S'
&lt;/code&gt;&lt;/pre&gt;</description></item><item><title/><link>https://tips.1707.io/docs/cli-tools/find/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://tips.1707.io/docs/cli-tools/find/</guid><description>&lt;h1 id="find"&gt;find&lt;a class="anchor" href="#find"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;h2 id="command-line-options"&gt;Command Line Options&lt;a class="anchor" href="#command-line-options"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;blockquote class='book-hint '&gt;
&lt;p&gt;. is the location you want to search, any folder or . for the current directory&lt;/p&gt;
&lt;/blockquote&gt;&lt;h3 id="find-specific-filename"&gt;Find specific filename&lt;a class="anchor" href="#find-specific-filename"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;find . -name filename
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="find-filedir-with-sometext-in-the-name"&gt;Find file/dir with sometext in the name:&lt;a class="anchor" href="#find-filedir-with-sometext-in-the-name"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;find . -iname &amp;quot;*sometext*&amp;quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="only-find-files"&gt;Only find files:&lt;a class="anchor" href="#only-find-files"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;find . -type f
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="only-find-directories"&gt;Only find directories:&lt;a class="anchor" href="#only-find-directories"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;find . -type d
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="find-files-modified-over-2-days-ago"&gt;Find files modified over 2 days ago:&lt;a class="anchor" href="#find-files-modified-over-2-days-ago"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;find . -mtime +2
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="find-files-modified-in-the-last-2-minutes"&gt;Find files modified in the last 2 minutes:&lt;a class="anchor" href="#find-files-modified-in-the-last-2-minutes"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;find . -mmin -2
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="find-files-accessed-in-the-last-2-minutes"&gt;Find files accessed in the last 2 minutes:&lt;a class="anchor" href="#find-files-accessed-in-the-last-2-minutes"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;find . -amin -2
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="delete-all-results-found-only-works-on-files-and-does-not-prompt-for-confirmation"&gt;Delete all results found (only works on files and does not prompt for confirmation):&lt;a class="anchor" href="#delete-all-results-found-only-works-on-files-and-does-not-prompt-for-confirmation"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;find . -type f -delete
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="execute-a-command-on-each-item-found-the--is-the-filename"&gt;Execute a command on each item found (The {} is the filename):&lt;a class="anchor" href="#execute-a-command-on-each-item-found-the--is-the-filename"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;find . -iname &amp;quot;Wedding*&amp;quot; -exec stat {} \;
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="limit-the-folder-depth-to-search-to-1"&gt;Limit the folder depth to search to 1:&lt;a class="anchor" href="#limit-the-folder-depth-to-search-to-1"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;find . -maxdepth -type f
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="find-files-with-specific-size-in-bytes"&gt;Find files with specific size in bytes:&lt;a class="anchor" href="#find-files-with-specific-size-in-bytes"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;find . -size 0
&lt;/code&gt;&lt;/pre&gt;</description></item><item><title/><link>https://tips.1707.io/docs/cli-tools/gzip/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://tips.1707.io/docs/cli-tools/gzip/</guid><description>&lt;h1 id="gzip"&gt;gzip&lt;a class="anchor" href="#gzip"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;h2 id="command-line-options"&gt;Command Line Options&lt;a class="anchor" href="#command-line-options"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id="compress-a-file"&gt;Compress a File&lt;a class="anchor" href="#compress-a-file"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;blockquote class='book-hint '&gt;
&lt;p&gt;Note: The file is removed during this process
gzip fileName&lt;/p&gt;
&lt;/blockquote&gt;&lt;h3 id="decompress-a-gz-file"&gt;Decompress a gz file&lt;a class="anchor" href="#decompress-a-gz-file"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;gzip --decompress fileName.gz
&lt;/code&gt;&lt;/pre&gt;</description></item><item><title/><link>https://tips.1707.io/docs/cli-tools/jq/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://tips.1707.io/docs/cli-tools/jq/</guid><description>&lt;h1 id="jq-json-query"&gt;jq (JSON Query)&lt;a class="anchor" href="#jq-json-query"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;h2 id="command-line-options"&gt;Command Line Options&lt;a class="anchor" href="#command-line-options"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id="select-multiple"&gt;Select multiple&lt;a class="anchor" href="#select-multiple"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;jq '.[] | .login, .id'
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="get-the-latest-field-value-but-only-where-lts--true-boolean-for-text-use-value"&gt;Get the latest field value, but only where lts == true (boolean, for text use &amp;ldquo;value&amp;rdquo;)&lt;a class="anchor" href="#get-the-latest-field-value-but-only-where-lts--true-boolean-for-text-use-value"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;curl -s https://endoflife.date/api/mediawiki.json | jq -r '.[] | select(.lts==true) | .latest'
&lt;/code&gt;&lt;/pre&gt;</description></item><item><title/><link>https://tips.1707.io/docs/cli-tools/nmcli/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://tips.1707.io/docs/cli-tools/nmcli/</guid><description>&lt;h1 id="nmcli---network-manager-command-line-interface"&gt;nmcli - Network Manager Command Line Interface&lt;a class="anchor" href="#nmcli---network-manager-command-line-interface"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;h2 id="command-line-options"&gt;Command Line Options&lt;a class="anchor" href="#command-line-options"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id="see-devices"&gt;See devices:&lt;a class="anchor" href="#see-devices"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;nmcli dev status
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="see-if-wifi-is-enabled"&gt;See if WiFi is enabled:&lt;a class="anchor" href="#see-if-wifi-is-enabled"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;nmcli radio wifi
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="list-networks"&gt;List networks&lt;a class="anchor" href="#list-networks"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;nmcli dev wifi list
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="connect-to-my-network-using-my-password"&gt;Connect to &amp;lsquo;My Network&amp;rsquo; using &amp;lsquo;My Password&amp;rsquo;&lt;a class="anchor" href="#connect-to-my-network-using-my-password"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;nmcli dev wifi connect 'My Network' password 'My Password'
&lt;/code&gt;&lt;/pre&gt;</description></item><item><title/><link>https://tips.1707.io/docs/cli-tools/tar/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://tips.1707.io/docs/cli-tools/tar/</guid><description>&lt;h1 id="tar"&gt;tar&lt;a class="anchor" href="#tar"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;blockquote class='book-hint '&gt;
&lt;p&gt;Tar files are just a collection of files and/or folders, compression is optional.&lt;/p&gt;
&lt;/blockquote&gt;&lt;h2 id="command-line-options"&gt;Command Line Options&lt;a class="anchor" href="#command-line-options"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id="create-a-tar-file-of-the-homeusername-folder"&gt;Create a tar file of the /home/username folder&lt;a class="anchor" href="#create-a-tar-file-of-the-homeusername-folder"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;tar -cvf user-backup-17-11-2023.tar /home/username
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;c - Creates a new archive&lt;/li&gt;
&lt;li&gt;v - Enables verbose output&lt;/li&gt;
&lt;li&gt;f - Allow the user to specify the output tar filename&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="extract-a-tar-file"&gt;Extract a tar file&lt;a class="anchor" href="#extract-a-tar-file"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;tar xvf user-backup.tar
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;x - Extracts the contents of the tar file&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="extract-a-tar-file-to-a-specific-folder"&gt;Extract a tar file to a specific folder&lt;a class="anchor" href="#extract-a-tar-file-to-a-specific-folder"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;tar xvf user-backup.tar --directory=myFolder
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="compressing-when-creating-a-tar"&gt;Compressing when creating a tar&lt;a class="anchor" href="#compressing-when-creating-a-tar"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;-j --bzip2&lt;/code&gt; - Use bzip compression&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-z --gzip&lt;/code&gt; - Use gzip compression&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-J --xz&lt;/code&gt; - Use xz compression&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-J --zstd&lt;/code&gt; - Use zstd compression&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="extract-a-specfic-file-or-files-from-an-archive"&gt;Extract a specfic file or files from an archive&lt;a class="anchor" href="#extract-a-specfic-file-or-files-from-an-archive"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;tar -xvf Phpfiles-org.tar.bz2 full/path/of/file/in/archive.txt
tar -xvf Phpfiles-org.tar.bz2 file1 file2
&lt;/code&gt;&lt;/pre&gt;</description></item><item><title/><link>https://tips.1707.io/docs/cli-tools/ufw/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://tips.1707.io/docs/cli-tools/ufw/</guid><description>&lt;h1 id="ufw---uncomplicated-firewall"&gt;ufw - Uncomplicated FireWall&lt;a class="anchor" href="#ufw---uncomplicated-firewall"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;h2 id="command-line-options"&gt;Command Line Options&lt;a class="anchor" href="#command-line-options"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id="enable-ufw"&gt;Enable UFW&lt;a class="anchor" href="#enable-ufw"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;ufw enable
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="disable-ufw"&gt;Disable UFW&lt;a class="anchor" href="#disable-ufw"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;blockquote class='book-hint '&gt;
&lt;p&gt;Caution: This is a dangerous action&lt;/p&gt;
&lt;/blockquote&gt;&lt;pre&gt;&lt;code&gt;ufw disable
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="firewall-status"&gt;Firewall Status&lt;a class="anchor" href="#firewall-status"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;ufw status
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="firewall-status-with-rule-numbers"&gt;Firewall Status With Rule Numbers&lt;a class="anchor" href="#firewall-status-with-rule-numbers"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;ufw status numbered
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="allow-port-80-tcp-inboud"&gt;Allow Port 80 TCP Inboud&lt;a class="anchor" href="#allow-port-80-tcp-inboud"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;ufw allow 80/tcp
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="delete-a-rule-by-number"&gt;Delete A Rule By Number&lt;a class="anchor" href="#delete-a-rule-by-number"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;ufw delete ruleNumber
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="delete-a-rule-by-action"&gt;Delete A Rule By Action&lt;a class="anchor" href="#delete-a-rule-by-action"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;ufw delete allow 80/tcp
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="deny-from-a-specific-ip"&gt;Deny From A Specific IP&lt;a class="anchor" href="#deny-from-a-specific-ip"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;ufw deny from IPAddress
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="deny-from-a-specific-subnet"&gt;Deny From A Specific Subnet&lt;a class="anchor" href="#deny-from-a-specific-subnet"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;ufw deny from IPAddress/Mask
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="insert-a-rule-at-position-number"&gt;Insert A Rule At Position Number&lt;a class="anchor" href="#insert-a-rule-at-position-number"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;ufw insert 1 deny from IPAddress
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="include-a-comment-about-the-rule"&gt;Include A Comment About The Rule&lt;a class="anchor" href="#include-a-comment-about-the-rule"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;ufw allow 80/tcp comment 'Allow HTTP Inbound'
&lt;/code&gt;&lt;/pre&gt;</description></item><item><title/><link>https://tips.1707.io/docs/cli-tools/xz/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://tips.1707.io/docs/cli-tools/xz/</guid><description>&lt;h1 id="xz"&gt;xz&lt;a class="anchor" href="#xz"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;h2 id="command-line-options"&gt;Command Line Options&lt;a class="anchor" href="#command-line-options"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id="decompress-an-xz-file"&gt;Decompress an xz File&lt;a class="anchor" href="#decompress-an-xz-file"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;xz --decompress fileName.xz
&lt;/code&gt;&lt;/pre&gt;</description></item><item><title/><link>https://tips.1707.io/docs/configs/apache/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://tips.1707.io/docs/configs/apache/</guid><description>&lt;h1 id="apache-web-server"&gt;Apache Web Server&lt;a class="anchor" href="#apache-web-server"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;h2 id="config-options"&gt;Config Options&lt;a class="anchor" href="#config-options"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id="simple-static-website-http"&gt;Simple Static Website (HTTP)&lt;a class="anchor" href="#simple-static-website-http"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;VirtualHost *:80&amp;gt;
 # Domain name and alias
 ServerName my.domain
 ServerAlias www.my.domain

 # How to contact the site admin
 ServerAdmin admin@my.domain

 # Where the website files are
 DocumentRoot /var/www/my.domain

 # Logging
 ErrorLog ${APACHE_LOG_DIR}/my.domain-error.log
 CustomLog ${APACHE_LOG_DIR}/my.domain-access.log combined
&amp;lt;/VirtualHost&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="client-side-caching"&gt;Client-side Caching&lt;a class="anchor" href="#client-side-caching"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt; # Client side caching
 &amp;lt;IfModule mod_expires.c&amp;gt;
 ExpiresActive On
 ExpiresDefault &amp;quot;access 30 days&amp;quot;
 ExpiresByType image/jpg &amp;quot;access 30 days&amp;quot;
 ExpiresByType image/jpeg &amp;quot;access 30 days&amp;quot;
 ExpiresByType image/gif &amp;quot;access 30 days&amp;quot;
 ExpiresByType image/png &amp;quot;access 30 days&amp;quot;
 ExpiresByType image/svg &amp;quot;access 30 days&amp;quot;
 ExpiresByType image/webp &amp;quot;access 30 days&amp;quot;
 ExpiresByType image/x-icon &amp;quot;access 30 days&amp;quot;
 ExpiresByType text/css &amp;quot;access 30 days&amp;quot;
 ExpiresByType text/javascript &amp;quot;access 30 days&amp;quot;
 ExpiresByType font/woff &amp;quot;access 30 days&amp;quot;
 ExpiresByType font/woff2 &amp;quot;access 30 days&amp;quot;
 &amp;lt;/IfModule&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="use-a-specific-php-version"&gt;Use a Specific PHP Version&lt;a class="anchor" href="#use-a-specific-php-version"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;# Force usage of PHP8.3
&amp;lt;FilesMatch \.php$&amp;gt;
 SetHandler &amp;quot;proxy:unix:/var/run/php/php8.3-fpm.sock|fcgi://localhost&amp;quot;
&amp;lt;/FilesMatch&amp;gt;
&lt;/code&gt;&lt;/pre&gt;</description></item><item><title/><link>https://tips.1707.io/docs/configs/caddy/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://tips.1707.io/docs/configs/caddy/</guid><description>&lt;h1 id="caddy-web-server"&gt;Caddy Web Server&lt;a class="anchor" href="#caddy-web-server"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;h2 id="config-options"&gt;Config Options&lt;a class="anchor" href="#config-options"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id="simple-fileserver"&gt;Simple fileserver&lt;a class="anchor" href="#simple-fileserver"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;my.domain {
 root * /var/www/html
 file_server
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="disable-http-to-https-redirect"&gt;Disable HTTP to HTTPS Redirect&lt;a class="anchor" href="#disable-http-to-https-redirect"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Note: Global Option&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{
 auto_https disable_redirects
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="block-ip-ip-range-or-useragent"&gt;Block IP, IP Range or UserAgent&lt;a class="anchor" href="#block-ip-ip-range-or-useragent"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;@blocked {
 remote_ip 178.104.0.0/15
 remote_ip 202.46.32.0/19
 remote_ip 43.0.0.0/9
 remote_ip 43.160.0.0/12
 remote_ip 43.152.0.0/13
 remote_ip 43.245.0.0/16
 remote_ip 43.239.0.0/16
 remote_ip 69.12.56.0/21
 header &amp;quot;User-Agent&amp;quot; *AhrefsBot*
 header &amp;quot;User-Agent&amp;quot; *Amazonbot*
 header &amp;quot;User-Agent&amp;quot; *Bytespider*
}

# Immediately close connection for blocked IPs
abort @blocked
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="basic-authentication-only-the-contents-of-testing"&gt;Basic Authentication (only the contents of /Testing)&lt;a class="anchor" href="#basic-authentication-only-the-contents-of-testing"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;To generate the argon2id passowrd use: &lt;code&gt;echo -n 'MySecretPassword' | argon2 (tr -dc 'A-Za-z0-9' &amp;lt; /dev/urandom | head -c 64 ; echo) -id -e&lt;/code&gt;&lt;/p&gt;</description></item><item><title/><link>https://tips.1707.io/docs/configs/flatpak-manifest/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://tips.1707.io/docs/configs/flatpak-manifest/</guid><description>&lt;h1 id="flatpak-manifests"&gt;Flatpak Manifests&lt;a class="anchor" href="#flatpak-manifests"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;h3 id="update-check-json"&gt;Update Check (JSON)&lt;a class="anchor" href="#update-check-json"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt; &amp;quot;x-checker-data&amp;quot;: {
 &amp;quot;type&amp;quot;: &amp;quot;anitya&amp;quot;,
 &amp;quot;project-id&amp;quot;: 242933,
 &amp;quot;stable-only&amp;quot;: true,
 &amp;quot;url-template&amp;quot;: &amp;quot;https://download.kde.org/stable/kirigami-addons/kirigami-addons-$version.tar.xz&amp;quot;
 }
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="update-check-json-with-version-control"&gt;Update Check (JSON) with Version control&lt;a class="anchor" href="#update-check-json-with-version-control"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt; &amp;quot;x-checker-data&amp;quot;: {
 &amp;quot;type&amp;quot;: &amp;quot;anitya&amp;quot;,
 &amp;quot;project-id&amp;quot;: 242933,
 &amp;quot;stable-only&amp;quot;: true,
 &amp;quot;versions&amp;quot;: {
 &amp;quot;&amp;lt;&amp;quot;: &amp;quot;1.12.0&amp;quot;
 },
 &amp;quot;url-template&amp;quot;: &amp;quot;https://download.kde.org/stable/kirigami-addons/kirigami-addons-$version.tar.xz&amp;quot;
 }
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="update-check-yaml"&gt;Update Check (YAML)&lt;a class="anchor" href="#update-check-yaml"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt; x-checker-data:
 type: anitya 
 project-id: 815 
 stable-only: true 
 versions: &amp;lt; 1.12.0
 url-template: https://github.com/fish-shell/fish-shell/releases/download/$version/fish-$version.tar.xz
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="update-check-pypi-json"&gt;Update Check PyPi (JSON)&lt;a class="anchor" href="#update-check-pypi-json"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt; &amp;quot;x-checker-data&amp;quot;: {
 &amp;quot;type&amp;quot;: &amp;quot;pypi&amp;quot;,
 &amp;quot;name&amp;quot;: &amp;quot;random2&amp;quot;
 }
&lt;/code&gt;&lt;/pre&gt;</description></item><item><title/><link>https://tips.1707.io/docs/configs/NGINX/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://tips.1707.io/docs/configs/NGINX/</guid><description>&lt;h1 id="nginx-web-server"&gt;NGINX Web Server&lt;a class="anchor" href="#nginx-web-server"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;h2 id="basic-http-site"&gt;Basic HTTP Site&lt;a class="anchor" href="#basic-http-site"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;server {
 listen 80;
 server_name my.domain;
 root /var/www/html;
 access_log /var/log/nginx/my.domain_access.log;
 error_log /var/log/nginx/my.domain_error.log;
}
&lt;/code&gt;&lt;/pre&gt;</description></item><item><title/><link>https://tips.1707.io/docs/init-systems/openrc/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://tips.1707.io/docs/init-systems/openrc/</guid><description>&lt;h1 id="openrc"&gt;OpenRC&lt;a class="anchor" href="#openrc"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;h2 id="manage-system-services"&gt;Manage System Services&lt;a class="anchor" href="#manage-system-services"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id="check-all-service-statuses"&gt;Check all service statuses&lt;a class="anchor" href="#check-all-service-statuses"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;rc-status
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="list-services"&gt;List services&lt;a class="anchor" href="#list-services"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;rc-status --list
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="enable-service-on-boot"&gt;Enable service on boot&lt;a class="anchor" href="#enable-service-on-boot"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;rc-update add serviceName default
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="disable-service-on-boot"&gt;Disable service on boot&lt;a class="anchor" href="#disable-service-on-boot"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;rc-update del serviceName default
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id="startstoprestart-service"&gt;Start/stop/restart service&lt;a class="anchor" href="#startstoprestart-service"&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;rc-service serviceName start/stop/restart
&lt;/code&gt;&lt;/pre&gt;</description></item><item><title/><link>https://tips.1707.io/docs/init-systems/systemd/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://tips.1707.io/docs/init-systems/systemd/</guid><description>&lt;h1 id="systemd"&gt;systemd&lt;a class="anchor" href="#systemd"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;h3 id="reset-failed-services"&gt;Reset Failed Services&lt;a class="anchor" href="#reset-failed-services"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;systemctl reset-failed
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="show-status"&gt;Show Status&lt;a class="anchor" href="#show-status"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;systemctl status
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="show-dependencies-of-a-service"&gt;Show Dependencies of a Service&lt;a class="anchor" href="#show-dependencies-of-a-service"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;systemctl list-dependencies sericeName
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="reload-systemd-service-files-from-disk"&gt;Reload Systemd Service Files From Disk&lt;a class="anchor" href="#reload-systemd-service-files-from-disk"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;systemctl daemon-reload
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="start-a-service-at-boot"&gt;Start a Service at Boot&lt;a class="anchor" href="#start-a-service-at-boot"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;systemctl enable sericeName
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="disable-service-start-on-boot-and-stop-it"&gt;Disable service start on boot and stop it&lt;a class="anchor" href="#disable-service-start-on-boot-and-stop-it"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;systemctl disable sericeName
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="check-service-status"&gt;Check Service Status&lt;a class="anchor" href="#check-service-status"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;systemctl status sericeName
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="start-service"&gt;Start Service&lt;a class="anchor" href="#start-service"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;systemctl start sericeName
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="stop-service"&gt;Stop Service&lt;a class="anchor" href="#stop-service"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;systemctl stop sericeName
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="restart-service"&gt;Restart Service&lt;a class="anchor" href="#restart-service"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;systemctl restart sericeName
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="reload-configuration-for-service"&gt;Reload Configuration for Service&lt;a class="anchor" href="#reload-configuration-for-service"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;systemctl reload sericeName
&lt;/code&gt;&lt;/pre&gt;</description></item><item><title/><link>https://tips.1707.io/docs/operating-systems/Alpine/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://tips.1707.io/docs/operating-systems/Alpine/</guid><description>&lt;h1 id="alpine-linux"&gt;Alpine Linux&lt;a class="anchor" href="#alpine-linux"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;h2 id="package-manager-apk"&gt;Package Manager (apk)&lt;a class="anchor" href="#package-manager-apk"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id="install-a-package"&gt;Install a package&lt;a class="anchor" href="#install-a-package"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;apk add packageName
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="install-a-package-with-yn-prompt"&gt;Install a package with y/n prompt&lt;a class="anchor" href="#install-a-package-with-yn-prompt"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;apk add --interactive packageName
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="remove-a-package"&gt;Remove a package&lt;a class="anchor" href="#remove-a-package"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;apk del packageName
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="search-package-repository"&gt;Search Package Repository&lt;a class="anchor" href="#search-package-repository"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;apk search searchTerm
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="update-repository-metadata"&gt;Update Repository Metadata&lt;a class="anchor" href="#update-repository-metadata"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;apk update
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="list-upgradeable-packages"&gt;List Upgradeable Packages&lt;a class="anchor" href="#list-upgradeable-packages"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;apk list --upgradeable
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="upgrade"&gt;Upgrade&lt;a class="anchor" href="#upgrade"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt; apk upgrade -a
&lt;/code&gt;&lt;/pre&gt;</description></item><item><title/><link>https://tips.1707.io/docs/web-servers/apache/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://tips.1707.io/docs/web-servers/apache/</guid><description>&lt;h1 id="apache-web-server"&gt;Apache Web Server&lt;a class="anchor" href="#apache-web-server"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;h2 id="test-configuration"&gt;Test configuration&lt;a class="anchor" href="#test-configuration"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;apache2ctl configtest
&lt;/code&gt;&lt;/pre&gt;</description></item><item><title/><link>https://tips.1707.io/docs/web-servers/caddy/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://tips.1707.io/docs/web-servers/caddy/</guid><description>&lt;h1 id="caddy-web-server"&gt;Caddy Web Server&lt;a class="anchor" href="#caddy-web-server"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;h2 id="test-configuration"&gt;Test configuration&lt;a class="anchor" href="#test-configuration"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;blockquote class='book-hint '&gt;
&lt;p&gt;Note: Must be run in the Caddy configuration directory (e.g. &lt;code&gt;/etc/caddy&lt;/code&gt;)&lt;/p&gt;
&lt;/blockquote&gt;&lt;pre&gt;&lt;code&gt;caddy validate
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id="reload-configuration"&gt;Reload Configuration&lt;a class="anchor" href="#reload-configuration"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;caddy reload
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id="list-enabled-modules"&gt;List Enabled Modules&lt;a class="anchor" href="#list-enabled-modules"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;caddy list-modules
&lt;/code&gt;&lt;/pre&gt;</description></item><item><title/><link>https://tips.1707.io/docs/web-servers/nginx/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://tips.1707.io/docs/web-servers/nginx/</guid><description>&lt;h1 id="nginx-web-server"&gt;NGINX Web Server&lt;a class="anchor" href="#nginx-web-server"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;h2 id="test-configuration"&gt;Test configuration&lt;a class="anchor" href="#test-configuration"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;nginx -t
&lt;/code&gt;&lt;/pre&gt;</description></item><item><title/><link>https://tips.1707.io/docs/web-services/forgejo/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://tips.1707.io/docs/web-services/forgejo/</guid><description>&lt;h1 id="forgejo"&gt;Forgejo&lt;a class="anchor" href="#forgejo"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;h2 id="health-check"&gt;Health Check&lt;a class="anchor" href="#health-check"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;blockquote class='book-hint '&gt;
&lt;p&gt;Append &lt;code&gt;--fix&lt;/code&gt; to attempt to automatically resolve issues&lt;/p&gt;
&lt;/blockquote&gt;&lt;pre&gt;&lt;code&gt;sudo -u git forgejo doctor check --all --config /etc/forgejo/app.ini
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id="regenerate-all-hooks"&gt;Regenerate All Hooks&lt;a class="anchor" href="#regenerate-all-hooks"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;sudo -u git forgejo admin regenerate hooks --config /etc/forgejo/app.ini
&lt;/code&gt;&lt;/pre&gt;</description></item></channel></rss>