<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>tools</title>
    <link>http://tools.thorley.us/</link>
    <description>Recent content on tools</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <atom:link href="http://tools.thorley.us/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title></title>
      <link>http://tools.thorley.us/docs/awk/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>http://tools.thorley.us/docs/awk/</guid>
      <description>&lt;h1 id=&#34;awk&#34;&gt;&lt;strong&gt;awk&lt;/strong&gt;&lt;a class=&#34;anchor&#34; href=&#34;#awk&#34;&gt;#&lt;/a&gt;&lt;/h1&gt;&#xA;&lt;h3 id=&#34;do-an-awk-thing&#34;&gt;do an awk thing&lt;a class=&#34;anchor&#34; href=&#34;#do-an-awk-thing&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;an awk thing&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;resources&#34;&gt;Resources&lt;a class=&#34;anchor&#34; href=&#34;#resources&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://google.com&#34;&gt;some site&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
    </item>
    <item>
      <title></title>
      <link>http://tools.thorley.us/docs/awscli/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>http://tools.thorley.us/docs/awscli/</guid>
      <description>&lt;h1 id=&#34;awscli&#34;&gt;&lt;strong&gt;awscli&lt;/strong&gt;&lt;a class=&#34;anchor&#34; href=&#34;#awscli&#34;&gt;#&lt;/a&gt;&lt;/h1&gt;&#xA;&lt;h3 id=&#34;get-details-about-the-credentials-used-to-make-this-call&#34;&gt;get details about the credentials used to make this call&lt;a class=&#34;anchor&#34; href=&#34;#get-details-about-the-credentials-used-to-make-this-call&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;aws sts get-caller-identity&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;resources&#34;&gt;Resources&lt;a class=&#34;anchor&#34; href=&#34;#resources&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-welcome.html&#34;&gt;User Guide&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-welcome.html&#34;&gt;Command Reference&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
    </item>
    <item>
      <title></title>
      <link>http://tools.thorley.us/docs/bash/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>http://tools.thorley.us/docs/bash/</guid>
      <description>&lt;h1 id=&#34;bash&#34;&gt;&lt;strong&gt;bash&lt;/strong&gt;&lt;a class=&#34;anchor&#34; href=&#34;#bash&#34;&gt;#&lt;/a&gt;&lt;/h1&gt;&#xA;&lt;h3 id=&#34;require-variables&#34;&gt;require variables&lt;a class=&#34;anchor&#34; href=&#34;#require-variables&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;REQUIRED_VARS=(&#xA;  FOO_VAR&#xA;  BAR_VAR&#xA;  BAZ_VAR&#xA;)&#xA;&#xA;for v in ${REQUIRED_VARS[@]}; do&#xA;  if [[ -z &amp;#34;${!v}&amp;#34; ]]; then&#xA;    echo &amp;#34;${v} environment variable is not populated&amp;#34;&#xA;  fi&#xA;done&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;resources&#34;&gt;Resources&lt;a class=&#34;anchor&#34; href=&#34;#resources&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://www.gnu.org/software/bash/manual/bash.html&#34;&gt;GNU Bash Reference Manual&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://google.github.io/styleguide/shellguide.html&#34;&gt;Google Shell Style Guide&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
    </item>
    <item>
      <title></title>
      <link>http://tools.thorley.us/docs/brew/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>http://tools.thorley.us/docs/brew/</guid>
      <description>&lt;h1 id=&#34;brew&#34;&gt;&lt;strong&gt;brew&lt;/strong&gt;&lt;a class=&#34;anchor&#34; href=&#34;#brew&#34;&gt;#&lt;/a&gt;&lt;/h1&gt;&#xA;&lt;h3 id=&#34;install-a-package&#34;&gt;install a package&lt;a class=&#34;anchor&#34; href=&#34;#install-a-package&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;brew install foo&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;upgrade-a-package&#34;&gt;upgrade a package&lt;a class=&#34;anchor&#34; href=&#34;#upgrade-a-package&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;brew install foo&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;remove-a-package&#34;&gt;remove a package&lt;a class=&#34;anchor&#34; href=&#34;#remove-a-package&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;brew uninstall foo&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;resources&#34;&gt;Resources&lt;a class=&#34;anchor&#34; href=&#34;#resources&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://docs.brew.sh/&#34;&gt;Homebrew Documentation&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
    </item>
    <item>
      <title></title>
      <link>http://tools.thorley.us/docs/curl/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>http://tools.thorley.us/docs/curl/</guid>
      <description>&lt;h1 id=&#34;curl&#34;&gt;&lt;strong&gt;curl&lt;/strong&gt;&lt;a class=&#34;anchor&#34; href=&#34;#curl&#34;&gt;#&lt;/a&gt;&lt;/h1&gt;&#xA;&lt;h3 id=&#34;return-headers-only&#34;&gt;return headers only&lt;a class=&#34;anchor&#34; href=&#34;#return-headers-only&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;curl -I http://foo.com&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;download-a-file-using-its-remote-name&#34;&gt;download a file using its remote name&lt;a class=&#34;anchor&#34; href=&#34;#download-a-file-using-its-remote-name&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;curl -O http://foo.com/bar.txt&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;download-a-file-and-change-its-name&#34;&gt;download a file and change its name&lt;a class=&#34;anchor&#34; href=&#34;#download-a-file-and-change-its-name&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;curl http://foo.com/bar.txt -o baz.txt&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;resources&#34;&gt;Resources&lt;a class=&#34;anchor&#34; href=&#34;#resources&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://curl.se/docs/manpage.html&#34;&gt;man page&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://curl.se/docs/httpscripting.html&#34;&gt;The Art Of Scripting HTTP Requests Using Curl&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://everything.curl.dev/&#34;&gt;Everything curl&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
    </item>
    <item>
      <title></title>
      <link>http://tools.thorley.us/docs/git/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>http://tools.thorley.us/docs/git/</guid>
      <description>&lt;h1 id=&#34;git&#34;&gt;&lt;strong&gt;git&lt;/strong&gt;&lt;a class=&#34;anchor&#34; href=&#34;#git&#34;&gt;#&lt;/a&gt;&lt;/h1&gt;&#xA;&lt;h3 id=&#34;add-foo&#34;&gt;add foo&lt;a class=&#34;anchor&#34; href=&#34;#add-foo&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;git add -A  # --all&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;add-bar&#34;&gt;add bar&lt;a class=&#34;anchor&#34; href=&#34;#add-bar&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;git add -u  # --update&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;delete-merged-branch&#34;&gt;delete merged branch&lt;a class=&#34;anchor&#34; href=&#34;#delete-merged-branch&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;git branch -d &amp;lt;branch-name&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;force-delete-unmerged-branch&#34;&gt;force-delete unmerged branch&lt;a class=&#34;anchor&#34; href=&#34;#force-delete-unmerged-branch&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;git branch -D &amp;lt;branch-name&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;rename-current-branch&#34;&gt;rename current branch&lt;a class=&#34;anchor&#34; href=&#34;#rename-current-branch&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;git branch -m &amp;lt;new-branch-name&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;create-new-branch-and-check-it-out&#34;&gt;create new branch and check it out&lt;a class=&#34;anchor&#34; href=&#34;#create-new-branch-and-check-it-out&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;git checkout -b &amp;lt;new-branch&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;do-cherrypick-stuff&#34;&gt;do cherrypick stuff&lt;a class=&#34;anchor&#34; href=&#34;#do-cherrypick-stuff&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;git cherry-pick &amp;lt;commit&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;commit-with-a-message&#34;&gt;commit with a message&lt;a class=&#34;anchor&#34; href=&#34;#commit-with-a-message&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;git commit -m &amp;#34;&amp;lt;message&amp;gt;&amp;#34;&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;commit-foo&#34;&gt;commit foo&lt;a class=&#34;anchor&#34; href=&#34;#commit-foo&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;git commit --amend&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;commit-bar&#34;&gt;commit bar&lt;a class=&#34;anchor&#34; href=&#34;#commit-bar&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;git commit --fixup&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;show-all-unstaged-changes&#34;&gt;show all unstaged changes&lt;a class=&#34;anchor&#34; href=&#34;#show-all-unstaged-changes&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;git diff&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;heading&#34;&gt;?&lt;a class=&#34;anchor&#34; href=&#34;#heading&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;git diff &amp;lt;file&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;list-the-files-that-differ-between-main-and-the-current-branch&#34;&gt;list the files that differ between &lt;code&gt;main&lt;/code&gt; and the current branch&lt;a class=&#34;anchor&#34; href=&#34;#list-the-files-that-differ-between-main-and-the-current-branch&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;git diff main..HEAD --name-only&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;show-some-logs&#34;&gt;show some logs&lt;a class=&#34;anchor&#34; href=&#34;#show-some-logs&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;git log --graph --oneline --decorate&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;show-all-the-logs&#34;&gt;show all the logs&lt;a class=&#34;anchor&#34; href=&#34;#show-all-the-logs&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;git log --graph --oneline --decorate --all&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;&#34;&gt;&lt;a class=&#34;anchor&#34; href=&#34;#&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;h3 id=&#34;force-the-working-tree-into-the-state-of-a-given-reference&#34;&gt;force the working tree into the state of a given reference&lt;a class=&#34;anchor&#34; href=&#34;#force-the-working-tree-into-the-state-of-a-given-reference&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;git reset --hard &amp;lt;ref&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;revert-the-last-remote-commit&#34;&gt;revert the last remote commit&lt;a class=&#34;anchor&#34; href=&#34;#revert-the-last-remote-commit&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;git reset --hard HEAD^&#xA;git push -f&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;resources&#34;&gt;Resources&lt;a class=&#34;anchor&#34; href=&#34;#resources&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://git-scm.com/book/en/v2&#34;&gt;Pro Git&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://jwiegley.github.io/git-from-the-bottom-up/&#34;&gt;Git from the Bottom Up&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://hamwaves.com/collaboration/doc/rypress.com/index.html&#34;&gt;Ry&amp;rsquo;s Git Tutorial (hamwaves.com)&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://johnmathews.is/blog/rys-git-tutorial&#34;&gt;Ry&amp;rsquo;s Git Tutorial (johnmathews.is)&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
    </item>
    <item>
      <title></title>
      <link>http://tools.thorley.us/docs/jq/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>http://tools.thorley.us/docs/jq/</guid>
      <description>&lt;h1 id=&#34;jq&#34;&gt;&lt;strong&gt;jq&lt;/strong&gt;&lt;a class=&#34;anchor&#34; href=&#34;#jq&#34;&gt;#&lt;/a&gt;&lt;/h1&gt;&#xA;&lt;h3 id=&#34;validate-and-pretty-print-a-file&#34;&gt;validate and pretty-print a file&lt;a class=&#34;anchor&#34; href=&#34;#validate-and-pretty-print-a-file&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;jq . input.json&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;get-a-property-with-raw-output&#34;&gt;get a property with raw output&lt;a class=&#34;anchor&#34; href=&#34;#get-a-property-with-raw-output&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;jq -r .propertyName input.json&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;minify&#34;&gt;minify&lt;a class=&#34;anchor&#34; href=&#34;#minify&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;jq -c . &amp;lt; input.json&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;compare-file-contents-regardless-of-structure&#34;&gt;compare file contents, regardless of structure:&lt;a class=&#34;anchor&#34; href=&#34;#compare-file-contents-regardless-of-structure&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;diff &amp;lt;(jq --sort-keys . a.json) &amp;lt;(jq --sort-keys . b.json)&#xA;diff &amp;lt;(jq -S . a.json) &amp;lt;(jq -S . b.json)&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;resources&#34;&gt;Resources&lt;a class=&#34;anchor&#34; href=&#34;#resources&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://jqlang.github.io/jq/tutorial/&#34;&gt;Tutorial&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://jqlang.github.io/jq/manual/&#34;&gt;Manual&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
    </item>
    <item>
      <title></title>
      <link>http://tools.thorley.us/docs/mysql/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>http://tools.thorley.us/docs/mysql/</guid>
      <description>&lt;h1 id=&#34;mysql&#34;&gt;&lt;strong&gt;mysql&lt;/strong&gt;&lt;a class=&#34;anchor&#34; href=&#34;#mysql&#34;&gt;#&lt;/a&gt;&lt;/h1&gt;&#xA;&lt;h3 id=&#34;archive-a-database&#34;&gt;archive a database&lt;a class=&#34;anchor&#34; href=&#34;#archive-a-database&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;mysqldump --single-transaction &amp;lt;db_name&amp;gt; | gzip -c &amp;gt; YYYYMMDD.sql.tgz&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;create-a-local-user&#34;&gt;create a local user&lt;a class=&#34;anchor&#34; href=&#34;#create-a-local-user&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;CREATE USER &amp;#39;&amp;lt;user&amp;gt;&amp;#39;@&amp;#39;localhost&amp;#39; IDENTIFIED BY &amp;#39;&amp;lt;password&amp;gt;&amp;#39;; FLUSH PRIVILEGES;&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;create-a-network-user&#34;&gt;create a network user&lt;a class=&#34;anchor&#34; href=&#34;#create-a-network-user&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;CREATE USER &amp;#39;&amp;lt;user&amp;gt;&amp;#39;@&amp;#39;%&amp;#39; IDENTIFIED BY &amp;#39;&amp;lt;password&amp;gt;&amp;#39;; FLUSH PRIVILEGES;&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;update-a-users-password&#34;&gt;update a user&amp;rsquo;s password&lt;a class=&#34;anchor&#34; href=&#34;#update-a-users-password&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ALTER USER &amp;#39;&amp;lt;user&amp;gt;&amp;#39;@&amp;#39;%&amp;#39; IDENTIFIED BY &amp;#39;&amp;lt;password&amp;gt;&amp;#39;; FLUSH PRIVILEGES;&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;list-the-columns-in-a-table&#34;&gt;list the columns in a table&lt;a class=&#34;anchor&#34; href=&#34;#list-the-columns-in-a-table&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;SHOW COLUMNS FROM (&amp;lt;database&amp;gt;.)&amp;lt;table&amp;gt;;&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title></title>
      <link>http://tools.thorley.us/docs/openssl/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>http://tools.thorley.us/docs/openssl/</guid>
      <description>&lt;h1 id=&#34;openssl&#34;&gt;&lt;strong&gt;openssl&lt;/strong&gt;&lt;a class=&#34;anchor&#34; href=&#34;#openssl&#34;&gt;#&lt;/a&gt;&lt;/h1&gt;&#xA;&lt;h3 id=&#34;do-an-openssl-thing&#34;&gt;do an openssl thing&lt;a class=&#34;anchor&#34; href=&#34;#do-an-openssl-thing&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;an openssl thing&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;resources&#34;&gt;Resources&lt;a class=&#34;anchor&#34; href=&#34;#resources&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://google.com&#34;&gt;some site&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
    </item>
    <item>
      <title></title>
      <link>http://tools.thorley.us/docs/psql/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>http://tools.thorley.us/docs/psql/</guid>
      <description>&lt;h1 id=&#34;psql&#34;&gt;&lt;strong&gt;psql&lt;/strong&gt;&lt;a class=&#34;anchor&#34; href=&#34;#psql&#34;&gt;#&lt;/a&gt;&lt;/h1&gt;&#xA;&lt;h3 id=&#34;list-databases&#34;&gt;list databases&lt;a class=&#34;anchor&#34; href=&#34;#list-databases&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;\l&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;connect-to-a-database&#34;&gt;connect to a database&lt;a class=&#34;anchor&#34; href=&#34;#connect-to-a-database&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;\c &amp;lt;database_name&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;list-database-tables&#34;&gt;list database tables&lt;a class=&#34;anchor&#34; href=&#34;#list-database-tables&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;\dt&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;describe-a-table&#34;&gt;describe a table&lt;a class=&#34;anchor&#34; href=&#34;#describe-a-table&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;\d &amp;lt;table_name&amp;gt;&#xA;\d+ &amp;lt;table_name&amp;gt; # verbose output&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;list-database-schemas&#34;&gt;list database schemas&lt;a class=&#34;anchor&#34; href=&#34;#list-database-schemas&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;\dn&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;list-users&#34;&gt;list users&lt;a class=&#34;anchor&#34; href=&#34;#list-users&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;\du&#xA;\du &amp;lt;username&amp;gt; # specific user&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;list-functions&#34;&gt;list functions&lt;a class=&#34;anchor&#34; href=&#34;#list-functions&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;\df&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;show-a-function&#34;&gt;show a function&lt;a class=&#34;anchor&#34; href=&#34;#show-a-function&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;\sf &amp;lt;function_name&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;edit-a-function&#34;&gt;edit a function&lt;a class=&#34;anchor&#34; href=&#34;#edit-a-function&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;\ef &amp;lt;function_name&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;list-views&#34;&gt;list views&lt;a class=&#34;anchor&#34; href=&#34;#list-views&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;\dv&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;list-installed-extensions&#34;&gt;list installed extensions&lt;a class=&#34;anchor&#34; href=&#34;#list-installed-extensions&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;\dx&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;toggle-extended-display&#34;&gt;toggle extended display&lt;a class=&#34;anchor&#34; href=&#34;#toggle-extended-display&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;\x&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;quit-psql&#34;&gt;quit &lt;code&gt;psql&lt;/code&gt;&lt;a class=&#34;anchor&#34; href=&#34;#quit-psql&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;\q&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title></title>
      <link>http://tools.thorley.us/docs/python/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>http://tools.thorley.us/docs/python/</guid>
      <description>&lt;h1 id=&#34;python&#34;&gt;&lt;strong&gt;python&lt;/strong&gt;&lt;a class=&#34;anchor&#34; href=&#34;#python&#34;&gt;#&lt;/a&gt;&lt;/h1&gt;&#xA;&lt;h3 id=&#34;run-raw-python-code-directly-on-the-command-line&#34;&gt;run raw Python code directly on the command line&lt;a class=&#34;anchor&#34; href=&#34;#run-raw-python-code-directly-on-the-command-line&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;python -c &amp;#34;print(&amp;#39;This is a message from Python!&amp;#39;)&amp;#34;&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;print-resolved-python-executables-filepath&#34;&gt;print resolved Python executable&amp;rsquo;s filepath&lt;a class=&#34;anchor&#34; href=&#34;#print-resolved-python-executables-filepath&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;python -c &amp;#34;import sys; print(sys.executable)&amp;#34;&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;print-resolved-python-executables-version&#34;&gt;print resolved Python executable&amp;rsquo;s version&lt;a class=&#34;anchor&#34; href=&#34;#print-resolved-python-executables-version&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;python -c &amp;#34;import sys; print(sys.version)&amp;#34;&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;print-resolved-python-executables-import-path&#34;&gt;print resolved Python executable&amp;rsquo;s import path&lt;a class=&#34;anchor&#34; href=&#34;#print-resolved-python-executables-import-path&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;python -c &amp;#34;import sys; print(&amp;#39;\n&amp;#39;.join(sys.path))&amp;#34;&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;print-python-environment-configuration&#34;&gt;print Python environment configuration&lt;a class=&#34;anchor&#34; href=&#34;#print-python-environment-configuration&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;python -m site&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;pretty-print-json&#34;&gt;pretty-print JSON&lt;a class=&#34;anchor&#34; href=&#34;#pretty-print-json&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;python -m json.tool file.json&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;validate-json&#34;&gt;validate JSON&lt;a class=&#34;anchor&#34; href=&#34;#validate-json&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;cat file.json | python -m json.tool &amp;gt; /dev/null&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;base64-encode-a-string&#34;&gt;base64 encode a string&lt;a class=&#34;anchor&#34; href=&#34;#base64-encode-a-string&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;echo &amp;#34;secret&amp;#34; | python -m base64&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;base64-decode-a-string&#34;&gt;base64 decode a string&lt;a class=&#34;anchor&#34; href=&#34;#base64-decode-a-string&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;echo &amp;#34;c2VjcmV0Cg==&amp;#34; | python -m base64 -d&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;create-and-administer-a-sqlite3-database&#34;&gt;create and administer a &lt;code&gt;sqlite3&lt;/code&gt; database&lt;a class=&#34;anchor&#34; href=&#34;#create-and-administer-a-sqlite3-database&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;python -m sqlite3 my.db&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;test-dns-resolution&#34;&gt;test DNS resolution&lt;a class=&#34;anchor&#34; href=&#34;#test-dns-resolution&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;python -c &amp;#34;import socket; print(socket.gethostbyname(&amp;#39;example.com&amp;#39;))&amp;#34;&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;run-a-tcp-server-on-port-9999-that-serves-127001&#34;&gt;run a TCP server on port 9999 that serves &lt;code&gt;127.0.0.1&lt;/code&gt;&lt;a class=&#34;anchor&#34; href=&#34;#run-a-tcp-server-on-port-9999-that-serves-127001&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;python -c &amp;#34;import socket as s; sock=s.socket(); sock.bind((&amp;#39;127.0.0.1&amp;#39;,9999)); sock.listen(1); print(sock.accept())&amp;#34;&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;run-a-tcp-server-on-port-9999-that-serves-external-traffic&#34;&gt;run a TCP server on port 9999 that serves external traffic&lt;a class=&#34;anchor&#34; href=&#34;#run-a-tcp-server-on-port-9999-that-serves-external-traffic&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;python -c &amp;#34;import socket as s; sock=s.socket(); sock.bind((&amp;#39;0.0.0.0&amp;#39;,9999)); sock.listen(1); print(sock.accept())&amp;#34;&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;run-an-http-server-on-port-8000-that-serves-127001&#34;&gt;run an HTTP server on port 8000 that serves &lt;code&gt;127.0.0.1&lt;/code&gt;&lt;a class=&#34;anchor&#34; href=&#34;#run-an-http-server-on-port-8000-that-serves-127001&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;python -m http.server 8000&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;run-an-http-server-on-port-8000-that-serves-external-traffic&#34;&gt;run an HTTP server on port 8000 that serves external traffic&lt;a class=&#34;anchor&#34; href=&#34;#run-an-http-server-on-port-8000-that-serves-external-traffic&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;python -m http.server 8000 --bind 0.0.0.0&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;run-an-http-server-on-port-8000-that-serves-a-specific-directory&#34;&gt;run an HTTP server on port 8000 that serves a specific directory&lt;a class=&#34;anchor&#34; href=&#34;#run-an-http-server-on-port-8000-that-serves-a-specific-directory&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;python -m http.server 8000 --directory /tmp&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title></title>
      <link>http://tools.thorley.us/docs/ssh/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>http://tools.thorley.us/docs/ssh/</guid>
      <description>&lt;h1 id=&#34;ssh&#34;&gt;&lt;strong&gt;ssh&lt;/strong&gt;&lt;a class=&#34;anchor&#34; href=&#34;#ssh&#34;&gt;#&lt;/a&gt;&lt;/h1&gt;&#xA;&lt;h3 id=&#34;get-a-keys-sha256-fingerprint&#34;&gt;get a key&amp;rsquo;s SHA256 fingerprint&lt;a class=&#34;anchor&#34; href=&#34;#get-a-keys-sha256-fingerprint&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ssh-keygen -lf /path/to/key&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;get-a-keys-md5-fingerprint&#34;&gt;get a key&amp;rsquo;s MD5 fingerprint&lt;a class=&#34;anchor&#34; href=&#34;#get-a-keys-md5-fingerprint&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ssh-keygen -E md5 -lf /path/to/key&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title></title>
      <link>http://tools.thorley.us/docs/zip/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>http://tools.thorley.us/docs/zip/</guid>
      <description>&lt;h1 id=&#34;zip&#34;&gt;&lt;strong&gt;zip&lt;/strong&gt;&lt;a class=&#34;anchor&#34; href=&#34;#zip&#34;&gt;#&lt;/a&gt;&lt;/h1&gt;&#xA;&lt;h3 id=&#34;zip-all-contents-of-a-directory-preserving-directory-structure&#34;&gt;zip all contents of a directory, preserving directory structure&lt;a class=&#34;anchor&#34; href=&#34;#zip-all-contents-of-a-directory-preserving-directory-structure&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;zip -r foo.zip path/*&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;as-above-with-encryption-prompt-for-password&#34;&gt;as above, with encryption (prompt for password)&lt;a class=&#34;anchor&#34; href=&#34;#as-above-with-encryption-prompt-for-password&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;zip -er foo.zip path/*&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;as-above-providing-the-password-in-line-ie-in-a-script&#34;&gt;as above, providing the password in-line (i.e. in a script)&lt;a class=&#34;anchor&#34; href=&#34;#as-above-providing-the-password-in-line-ie-in-a-script&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;zip -er -P my_password foo.zip path/*&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
  </channel>
</rss>
