<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet href="/feed_style.xsl" type="text/xsl"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <tabi:metadata xmlns:tabi="https://github.com/welpo/tabi">
        <tabi:base_url>&#x2F;</tabi:base_url>
        <tabi:separator>
            •
        </tabi:separator>
        <tabi:about_feeds>This is a web feed, also known as an Atom feed. Subscribe by copying the URL from the address bar into your newsreader. Visit About Feeds to learn more and get started. It&#x27;s free.</tabi:about_feeds>
        <tabi:visit_the_site>Visit website</tabi:visit_the_site>
        <tabi:recent_posts>Recent posts</tabi:recent_posts>
        <tabi:last_updated_on>Updated on $DATE</tabi:last_updated_on>
        <tabi:default_theme></tabi:default_theme>
        <tabi:post_listing_date>date</tabi:post_listing_date>
        <tabi:current_section>Scripts</tabi:current_section>
    </tabi:metadata><link rel="extra-stylesheet" href="/skins/indigo_ingot.css?h=d429472afbb246441b1a" /><title>Andrew Wippler's Sketchpad - Scripts</title>
        <subtitle>Ideas, blog, etc. </subtitle>
    <link href="/tags/scripts/atom.xml" rel="self" type="application/atom+xml"/>
    <link href="/tags/scripts/" rel="alternate" type="text/html"/>
    <generator uri="https://www.getzola.org/">Zola</generator><updated>2025-09-12T15:55:56.778969+00:00</updated><id>/tags/scripts/atom.xml</id><entry xml:lang="en">
        <title>feeling super productive</title>
        <published>2025-09-12T15:55:56.778969+00:00</published>
        <updated>2025-09-12T15:55:56.778969+00:00</updated>
        <author>
            <name>Andrew Wippler</name>
        </author>
        <link rel="alternate" href="/2025-09-12-feeling-super-productive/" type="text/html"/>
        <id>/2025-09-12-feeling-super-productive/</id>
        
            <content type="html">&lt;p&gt;Since August, I have been updating my digital life, which began with organizing my digital collection of books. I had never truly looked too indepth at Calibre before August 2025, but I am clearly blown away at its capabilities. I feel a bit awkward keeping the library on my desktop computer, but I have a script to periodically backup my home folder to my NAS. Today I finished organizing them in Calibre. I have discovered that I have 458 digital books - I have read 131, and have 135 on my reading list. The remainder are my wife&#x27;s digital collection and reference material.&lt;&#x2F;p&gt;
&lt;p&gt;I read books for information. Sometimes the information is good, so I highlight it for later consumption. I have build &lt;a class=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;andrewwippler&#x2F;SpeakerWindows&quot;&gt;SpeakerWindows&lt;&#x2F;a&gt; as a means to organize those highlights and other thoughts for later use. This past month, I created two importers - readwise and play books. Readwise gathered my highlights from the Amazon&#x27;s kindle, while Google Play Books sync their highlights in Google Drive. The end result was over 5,000 highlights that needed to be sorted.&lt;&#x2F;p&gt;
&lt;p&gt;At first, I updated 5 a day through a prompts to ChatGPT, but that process was slow. So, I built a script that asked a local LLM to categorize the content of my notes and thoughts. It took about 2 hours to churn through those notes and create relavant tags for all of them. In the end, I am very happy with the results.&lt;&#x2F;p&gt;
&lt;p&gt;I am now motivated to read books as fast as I can in Google Play Books, export them to Google Drive, and import them to SpeakerWindows.&lt;&#x2F;p&gt;
</content>
        </entry><entry xml:lang="en">
        <title>DHCP IP updater</title>
        <published>2018-04-04T16:17:19+00:00</published>
        <updated>2018-04-04T16:17:19+00:00</updated>
        <author>
            <name>Andrew Wippler</name>
        </author>
        <link rel="alternate" href="/2018-04-04-dhcp-ip-updater/" type="text/html"/>
        <id>/2018-04-04-dhcp-ip-updater/</id>
        
            <content type="html">&lt;p&gt;This is the script I use to change the DNS record of my home IP when it changes. I have it running once a week and have not noticed a lapse in coverage. If your ISP has DHCP configured correctly, you will receive the same IP address when you are due for a renew. Otherwise you need a script like the one below.&lt;&#x2F;p&gt;
&lt;pre class=&quot;z-code&quot;&gt;&lt;code&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;#!&#x2F;usr&#x2F;bin&#x2F;ruby
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;require &amp;#39;aws-sdk&amp;#39;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;require &amp;#39;socket&amp;#39;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;def my_first_public_ipv4
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;  Socket.ip_address_list.detect{|intf| intf.ipv4? and !intf.ipv4_loopback? and !intf.ipv4_multicast? and !intf.ipv4_private?}
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;end
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;ip = my_first_public_ipv4.ip_address
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;unless ip.nil?
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;change = {
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;  :action =&amp;gt; &amp;#39;UPSERT&amp;#39;,
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;  :resource_record_set =&amp;gt; {
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;    :name =&amp;gt; &amp;quot;home.andrewwippler.com&amp;quot;,
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;    :type =&amp;gt; &amp;quot;A&amp;quot;,
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;    :ttl =&amp;gt; 600,
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;    :resource_records =&amp;gt; [{:value =&amp;gt; ip}]
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;}}
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;route53 = Aws::Route53::Client.new(
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;    region: &amp;#39;us-east-1&amp;#39;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;)
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;route53.change_resource_record_sets({
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;  hosted_zone_id: &amp;#39;&#x2F;hostedzone&#x2F;XXXXXXXXXXXXXXX&amp;#39;, # required
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;  change_batch: { # required
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;    changes: [change],
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;  },
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;})
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;end
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
</content>
        </entry><entry xml:lang="en">
        <title>OpenStack PS1 snippet</title>
        <published>2016-12-16T14:00:27+00:00</published>
        <updated>2016-12-16T14:00:27+00:00</updated>
        <author>
            <name>Andrew Wippler</name>
        </author>
        <link rel="alternate" href="/2016-12-16-openstack-ps1-snippet/" type="text/html"/>
        <id>/2016-12-16-openstack-ps1-snippet/</id>
        
            <content type="html">&lt;p&gt;I have been studying for my OpenStack certification test (the COA) which is scheduled next week. One thing that was painful to keep track of was the user I was using to interface with OpenStack as the rc file you download from OpenStack does not update your PS1 prompt. I came up with the following solution and placed it in my &lt;code&gt;~&#x2F;.bashrc&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre class=&quot;z-code&quot;&gt;&lt;code&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;function parse_os_user() {
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;    if [ ! &amp;quot;${OS_USERNAME}&amp;quot; == &amp;quot;&amp;quot; ]
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;    then
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;        echo &amp;quot;(${OS_USERNAME})&amp;quot;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;    else
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;        echo &amp;quot;&amp;quot;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;    fi
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;}
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;PS1=&amp;#39;\u@\h \w `parse_os_user` \$ &amp;#39;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
</content>
        </entry>
</feed>
