<metaname="description"content="Learn about running a quick automation that turns rows in your Google Sheets and plugs it into a Google [Slide](2024-02-26_slide.md) template to easily share more attractive content.">
<metaname="description"content="Learn about running a quick automation that turns rows in your Google Sheets and plugs it into a Google Slide template to easily share more attractive content.">
</noscript><metaproperty="og:title"content="Google Sheets to Slides with Scripts: an Automation"/>
<metaproperty="og:description"content="Learn about running a quick automation that turns rows in your Google Sheets and plugs it into a Google [Slide](2024-02-26_slide.md) template to easily share more attractive content."/>
<metaproperty="og:description"content="Learn about running a quick automation that turns rows in your Google Sheets and plugs it into a Google Slide template to easily share more attractive content."/>
<metaname="twitter:title"content="Google Sheets to Slides with Scripts: an Automation"/>
<metaname="twitter:description"content="Learn about running a quick automation that turns rows in your Google Sheets and plugs it into a Google [Slide](2024-02-26_slide.md) template to easily share more attractive content."/>
<metaname="twitter:description"content="Learn about running a quick automation that turns rows in your Google Sheets and plugs it into a Google Slide template to easily share more attractive content."/>
<scripttype="application/ld+json">
@ -68,7 +68,7 @@
"@type":"BlogPosting",
"headline":"Google Sheets to Slides with Scripts: an Automation",
"name":"Google Sheets to Slides with Scripts: an Automation",
"description":"Learn about running a quick automation that turns rows in your Google Sheets and plugs it into a Google [Slide](2024-02-26_slide.md) template to easily share more attractive content.",
"description":"Learn about running a quick automation that turns rows in your Google Sheets and plugs it into a Google Slide template to easily share more attractive content.",
"keywords":[
"google","scripts","sheets"
],
@ -152,7 +152,7 @@
Google Sheets to Slides with Scripts: an Automation
</h1>
<divclass="post-description">
Learn about running a quick automation that turns rows in your Google Sheets and plugs it into a Google [Slide](2024-02-26_slide.md) template to easily share more attractive content.
Learn about running a quick automation that turns rows in your Google Sheets and plugs it into a Google Slide template to easily share more attractive content.
<title>How to Revisit your Terminal Session's History</title>
<link>/posts/save_terminal_to_file.html</link>
<pubDate>Tue, 19 Mar 2024 11:00:53 -0400</pubDate>
<guid>/posts/save_terminal_to_file.html</guid>
<description>Go beyond zsh/bash_history and save both your commands and the output to a file for later review! This command will help any homelabber that struggles with documentation for their network and services.</description>
</item>
<item>
<title>Google Sheets to Slides with Scripts: an Automation</title>
<description>Learn about running a quick automation that turns rows in your Google Sheets and plugs it into a Google [Slide](2024-02-26_slide.md) template to easily share more attractive content.</description>
<description>Learn about running a quick automation that turns rows in your Google Sheets and plugs it into a Google Slide template to easily share more attractive content.</description>
</item>
<item>
<title>QuickHits: OpenResty and Package Updates</title>
<metaname="description"content="If you have used Neovim and it's massive plugin ecosystem for any length of time, then you're aware that debugging just comes with the territory. Here's my tale. Warning: It hasn't been solved at the time of writing.">
<metaname="description"content="Regex101 has long been one of my favorite reference tools. As of today, I will be adding ExplainShell to the list of must-use tools!.">
<h2class="entry-hint-parent">Creating a BirdNetPi Dashboard in HomeAssistant - Part 1
</h2>
</header>
<divclass="entry-content">
<p>This is Part One of a Two Part Series. You can find Part Two, here.
Update: 10/11/2023. A huge thanks to Mastodon User e_mobile2014 who found a broken link in this guide and pointed out that I never explained how to get the mqtt sensors into HomeAssistant!
What you will need BirdNET-Pi HomeAssistant AppDaemon MQTT Broker (I use Mosquitto) Background In early 2023, at the height of the Raspberry Pi shortage I felt like a king with an extra Rpi laying around, not being used....</p>
<aclass="entry-link"aria-label="post link to Creating a BirdNetPi Dashboard in HomeAssistant - Part 1"href="../../posts/birdnet_homeassistant.html"></a>
</article>
<articleclass="post-entry">
<headerclass="entry-header">
<h2class="entry-hint-parent">Pushing a Single Local Git Repo to Multiple Remote Repos
<metaname="description"content="I often find myself with various files that need to be parsed and transferred to a CSV. This is how I use python to parse a long and convoluted file.">
<metaname="description"content="Go beyond zsh/bash_history and save both your commands and the output to a file for later review! This command will help any homelabber that struggles with documentation for their network and services.">
</noscript><metaproperty="og:title"content="How to Revisit your Terminal Session's History"/>
<metaproperty="og:description"content="Go beyond zsh/bash_history and save both your commands and the output to a file for later review! This command will help any homelabber that struggles with documentation for their network and services."/>
<metaname="twitter:title"content="How to Revisit your Terminal Session's History"/>
<metaname="twitter:description"content="Go beyond zsh/bash_history and save both your commands and the output to a file for later review! This command will help any homelabber that struggles with documentation for their network and services."/>
<scripttype="application/ld+json">
{
"@context":"https://schema.org",
"@type":"BreadcrumbList",
"itemListElement":[
{
"@type":"ListItem",
"position":1,
"name":"Posts",
"item":"/posts.html"
}
{
"@type":"ListItem",
"position":1,
"name":"How to Revisit your Terminal Session's History",
"item":"/posts/save_terminal_to_file.html"
}
]
}
</script>
<scripttype="application/ld+json">
{
"@context":"https://schema.org",
"@type":"BlogPosting",
"headline":"How to Revisit your Terminal Session's History",
"name":"How to Revisit your Terminal Session\u0027s History",
"description":"Go beyond zsh/bash_history and save both your commands and the output to a file for later review! This command will help any homelabber that struggles with documentation for their network and services.",
"keywords":[
"cli","terminal","documentation"
],
"articleBody":"I can’t believe I didn’t know about this command beforehand. When I first got into self-hosting and homelabbing, one of the app ideas I had that would help me with internal documentation is a terminal program that saves your input and output to a file for you to review later and extract the key commands you used. I also had the bonus idea that you could add comments as you were writing out commands.\nLittle did I know at the time that comments from the CLI were already possible! I’ve already begun using comments which has been helpful if I need to look back at my zsh_history file. Here’s an example of a command I would use with my docker services.\ndocker logs {container_name} --since 5m ;: The container is failing 5 minutes after startup. You can write comments in bash and powershell as well!\nPowershell: rem ZSH: ;: Bash: # Turns out, I don’t need a fancy app to log the input/output of a terminal session! It exists in most unix based systems already and the command is simply this: script. That’s it!\nUnlike .zsh_history or .bash_history which only saves the commands you input into the terminal, script will save both your commands and it’s output. Why didn’t I know about this before I started setting up my homelab?!\nThe next time I want to setup a new service or debug something on a server, I will now make sure I start my session with script {date}-{service_name}.txt and then start writing out commands. As long as I can remember to write my inline comments during the session, looking back and trying to figure out what I was thinking at the time should be a breeze! I can dump these files into my internal wiki as placeholders. Then, ideally, I’ll remove the commands that lead me down a dead end, clean up and expand comments, and easily keep my wiki growing. Ideally being the key word here… I’ll take a dump of history files for the time being.\nEither way, I will literally have the output of my brain when doing CLI work in a file. Incredible.\nHere’s a quick overview about script, taken from man script.\nSCRIPT(1) NAME script – make typescript of terminal session SYNOPSIS script [-aeFkqr] [-t time] [file [command ...]] script -p [-deq] [-T fmt] [file] DESCRIPTION The script utility makes a typescript of everything printed on your terminal. It is useful for students who need a hardcopy record of an interactive session as proof of an assignment, as the typescript file can be printed out later with lpr(1). If the argument file is given, script saves all dialogue in file. If no file name is given, the typescript is saved in the file typescript. If the argument command is given, script will run the specified command with an optional argument vector instead of an interactive shell. ",
How to Revisit your Terminal Session's History
</h1>
<divclass="post-description">
Go beyond zsh/bash_history and save both your commands and the output to a file for later review! This command will help any homelabber that struggles with documentation for their network and services.
<divclass="post-content"><p>I can’t believe I didn’t know about this command beforehand. When I first got into self-hosting and homelabbing, one of the app ideas I had that would help me with internal documentation is a terminal program that saves your input and output to a file for you to review later and extract the key commands you used. I also had the bonus idea that you could add comments as you were writing out commands.</p>
<p>Little did I know at the time that comments from the CLI were already possible! I’ve already begun using comments which has been helpful if I need to look back at my <code>zsh_history</code> file. Here’s an example of a command I would use with my docker services.</p>
<divclass="highlight"><pretabindex="0"style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><codeclass="language-bash"data-lang="bash"><spanstyle="display:flex;"><span>docker logs <spanstyle="color:#f92672">{</span>container_name<spanstyle="color:#f92672">}</span> --since 5m ;: The container is failing <spanstyle="color:#ae81ff">5</span> minutes after startup.
<p>You can write comments in <code>bash</code> and <code>powershell</code> as well!</p>
<ul>
<li>Powershell: <code>rem</code></li>
<li>ZSH: <code>;:</code></li>
<li>Bash: <code>#</code></li>
</ul>
</div>
<p>Turns out, I don’t need a fancy app to log the input/output of a terminal session! It exists in most unix based systems already and the command is simply this: <code>script</code>. That’s it!</p>
<p>Unlike <code>.zsh_history</code> or <code>.bash_history</code> which only saves the commands you input into the terminal, <code>script</code> will save both your commands <em>and</em> it’s output. Why didn’t I know about this before I started setting up my homelab?!</p>
<p>The next time I want to setup a new service or debug something on a server, I will now make sure I start my session with <code>script {date}-{service_name}.txt</code> and then start writing out commands. As long as I can remember to write my inline comments during the session, looking back and trying to figure out what I was thinking at the time should be a breeze! I can dump these files into my internal wiki as placeholders. Then, ideally, I’ll remove the commands that lead me down a dead end, clean up and expand comments, and easily keep my wiki growing. Ideally being the key word here… I’ll take a dump of history files for the time being.</p>
<p>Either way, I will literally have the output of my brain when doing CLI work in a file. Incredible.</p>
<p>Here’s a quick overview about script, taken from <code>man script</code>.</p>
</span></span><spanstyle="display:flex;"><span> The script utility makes a typescript of everything printed on your terminal. It is useful <spanstyle="color:#66d9ef">for</span> students who need a hardcopy record of an interactive session as proof of an assignment, as the typescript file can be
</span></span><spanstyle="display:flex;"><span> printed out later with lpr<spanstyle="color:#f92672">(</span>1<spanstyle="color:#f92672">)</span>.
</span></span><spanstyle="display:flex;"><span>
</span></span><spanstyle="display:flex;"><span> If the argument file is given, script saves all dialogue in file. If no file name is given, the typescript is saved in the file typescript.
</span></span><spanstyle="display:flex;"><span>
</span></span><spanstyle="display:flex;"><span> If the argument command is given, script will run the specified command with an optional argument vector instead of an interactive shell.
d="M512 62.554 L 512 449.446 C 512 483.97 483.97 512 449.446 512 L 62.554 512 C 28.03 512 0 483.97 0 449.446 L 0 62.554 C 0 28.03 28.029 0 62.554 0 L 449.446 0 C 483.971 0 512 28.03 512 62.554 Z M 269.951 190.75 L 182.567 75.216 L 56 75.216 L 207.216 272.95 L 63.9 436.783 L 125.266 436.783 L 235.9 310.383 L 332.567 436.783 L 456 436.783 L 298.367 228.367 L 432.367 75.216 L 371.033 75.216 Z M 127.633 110 L 164.101 110 L 383.481 400.065 L 349.5 400.065 Z"/>
</svg>
</a>
</li>
<li>
<atarget="_blank"rel="noopener noreferrer"aria-label="share How to Revisit your Terminal Session's History on linkedin"
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.