<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="http://pockettheories.com/dokuwiki/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="http://pockettheories.com/dokuwiki/feed.php">
        <title>Pocket Theories</title>
        <description></description>
        <link>http://pockettheories.com/dokuwiki/</link>
        <image rdf:resource="http://pockettheories.com/dokuwiki/lib/exe/fetch.php?media=wiki:dokuwiki.svg" />
       <dc:date>2026-04-15T18:53:17+00:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="http://pockettheories.com/dokuwiki/doku.php?id=interesting202604&amp;rev=1775898674&amp;do=diff"/>
                <rdf:li rdf:resource="http://pockettheories.com/dokuwiki/doku.php?id=start&amp;rev=1775898574&amp;do=diff"/>
                <rdf:li rdf:resource="http://pockettheories.com/dokuwiki/doku.php?id=eventmachine&amp;rev=1775291232&amp;do=diff"/>
                <rdf:li rdf:resource="http://pockettheories.com/dokuwiki/doku.php?id=ruby&amp;rev=1775291030&amp;do=diff"/>
                <rdf:li rdf:resource="http://pockettheories.com/dokuwiki/doku.php?id=keepalive&amp;rev=1773688858&amp;do=diff"/>
                <rdf:li rdf:resource="http://pockettheories.com/dokuwiki/doku.php?id=linux&amp;rev=1773688292&amp;do=diff"/>
                <rdf:li rdf:resource="http://pockettheories.com/dokuwiki/doku.php?id=mail&amp;rev=1773681152&amp;do=diff"/>
                <rdf:li rdf:resource="http://pockettheories.com/dokuwiki/doku.php?id=bind&amp;rev=1773679848&amp;do=diff"/>
                <rdf:li rdf:resource="http://pockettheories.com/dokuwiki/doku.php?id=railties&amp;rev=1773480176&amp;do=diff"/>
                <rdf:li rdf:resource="http://pockettheories.com/dokuwiki/doku.php?id=ransack&amp;rev=1773477356&amp;do=diff"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="http://pockettheories.com/dokuwiki/lib/exe/fetch.php?media=wiki:dokuwiki.svg">
        <title>Pocket Theories</title>
        <link>http://pockettheories.com/dokuwiki/</link>
        <url>http://pockettheories.com/dokuwiki/lib/exe/fetch.php?media=wiki:dokuwiki.svg</url>
    </image>
    <item rdf:about="http://pockettheories.com/dokuwiki/doku.php?id=interesting202604&amp;rev=1775898674&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-04-11T09:11:14+00:00</dc:date>
        <dc:creator>reddy (reddy@undisclosed.example.com)</dc:creator>
        <title>interesting202604 - created</title>
        <link>http://pockettheories.com/dokuwiki/doku.php?id=interesting202604&amp;rev=1775898674&amp;do=diff</link>
        <description>Interesting Stuff in April 2026

	*  Microsoft has an interesting Python tool, markitdown for converting documents to MarkDown.</description>
    </item>
    <item rdf:about="http://pockettheories.com/dokuwiki/doku.php?id=start&amp;rev=1775898574&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-04-11T09:09:34+00:00</dc:date>
        <dc:creator>reddy (reddy@undisclosed.example.com)</dc:creator>
        <title>start</title>
        <link>http://pockettheories.com/dokuwiki/doku.php?id=start&amp;rev=1775898574&amp;do=diff</link>
        <description>Pocket Theories

This page serves as a top-level page for this wiki.

* Interesting Stuff

Computer Hardware and Electronics

	*  Amazon Computer and Electronics Finds
	*  Restoring and Modding Old Computer Hardware

Software Administration

	*  Ansible
	*  DokuWiki
	*  Grafana
	*  httpd (Apache)
	*  Linux
	*  MongoDB
	*  nginx
	*  OpenSSL
	*  Powershell
	*  Windows

Software Development

	*  Artificial Intelligence / Machine Learning
	*  git
	*  Java
	*  JavaScript
	*</description>
    </item>
    <item rdf:about="http://pockettheories.com/dokuwiki/doku.php?id=eventmachine&amp;rev=1775291232&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-04-04T08:27:12+00:00</dc:date>
        <dc:creator>reddy (reddy@undisclosed.example.com)</dc:creator>
        <title>eventmachine - created</title>
        <link>http://pockettheories.com/dokuwiki/doku.php?id=eventmachine&amp;rev=1775291232&amp;do=diff</link>
        <description>Basic usage of the Event Machine for TCP servers


require &#039;eventmachine&#039;

module MyServer
  def post_init
  end
  
  def receive_data(data)
    # For long-running operations, run in a separate thread
    #EM.defer do
    #  EM.next_tick {}
    #end
    
    # To end the connection
    #close_connection_after_writing()
  end
  
  def unbind
  end
end

EM.run do
  EM.start_server hostname, port, MyServer
end</description>
    </item>
    <item rdf:about="http://pockettheories.com/dokuwiki/doku.php?id=ruby&amp;rev=1775291030&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-04-04T08:23:50+00:00</dc:date>
        <dc:creator>reddy (reddy@undisclosed.example.com)</dc:creator>
        <title>ruby</title>
        <link>http://pockettheories.com/dokuwiki/doku.php?id=ruby&amp;rev=1775291030&amp;do=diff</link>
        <description>Ruby

Rails

Popular Gems

	*  EventMachine
	*  Kaminari
	*  Ransack
	*  Railties

Seed Data


bundle add faker  # Add it to only the development and test groups, if you are a stickler for convention

# In db/seeds.rb
50.times do
  MyModel.create! name: Faker::Name.name
end

rails db:migrate &amp;&amp; rails db:seed</description>
    </item>
    <item rdf:about="http://pockettheories.com/dokuwiki/doku.php?id=keepalive&amp;rev=1773688858&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-03-16T19:20:58+00:00</dc:date>
        <dc:creator>reddy (reddy@undisclosed.example.com)</dc:creator>
        <title>keepalive</title>
        <link>http://pockettheories.com/dokuwiki/doku.php?id=keepalive&amp;rev=1773688858&amp;do=diff</link>
        <description>keepalive

Configure this service on 2 VMs. The backup will take over the floating IP if it does not receive the VRRP traffic.


global_defs {
   router_id LVS_DEVEL
   vrrp_skip_check_adv_addr
   vrrp_garp_interval 0
   vrrp_gna_interval 0
}

vrrp_instance VI_1 {
    state MASTER  # use &quot;BACKUP&quot; on the VM2
    interface eth0
    virtual_router_id 51
    priority 100  # Use a lower number on the backup
    advert_int 1
    authentication {
        auth_type PASS
        auth_pass 1111
    }
    …</description>
    </item>
    <item rdf:about="http://pockettheories.com/dokuwiki/doku.php?id=linux&amp;rev=1773688292&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-03-16T19:11:32+00:00</dc:date>
        <dc:creator>reddy (reddy@undisclosed.example.com)</dc:creator>
        <title>linux</title>
        <link>http://pockettheories.com/dokuwiki/doku.php?id=linux&amp;rev=1773688292&amp;do=diff</link>
        <description>Linux

Popular Topics

	*  bash
	*  bind
	*  Docker
	*  diff
	*  Git
	*  keepalive
	*  mail
	*  rsync
	*  Samba
	*  SystemD Unit Files
	*  tuned
	*  Vim
	*  VNC

Miscellaneous

Suppressing the Service Restart prompt for &quot;apt install&quot;


/etc/needrestart/needrestart.conf
$nrconf{verbosity} = 0;
$nrconf{restart} = &#039;a&#039;;

export DEBIAN_FRONTEND=noninteractive
export APT_LISTCHANGES_FRONTEND=none
export NEEDRESTART_MODE=a  # default is &quot;i&quot;nteractive; change to &quot;a&quot;utomatic ; see: /etc/needrestart/needr…</description>
    </item>
    <item rdf:about="http://pockettheories.com/dokuwiki/doku.php?id=mail&amp;rev=1773681152&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-03-16T17:12:32+00:00</dc:date>
        <dc:creator>reddy (reddy@undisclosed.example.com)</dc:creator>
        <title>mail</title>
        <link>http://pockettheories.com/dokuwiki/doku.php?id=mail&amp;rev=1773681152&amp;do=diff</link>
        <description>mail

Quick Start

To set up an email server, we typically use Postfix for SMTP, Dovecot for POP3/IMAP, and mail utilities (“s-nail” package on RedHat Linux).


dnf install -y postfix dovecot s-nail


Edit the /etc/postfix/main.cp file:


inet_interfaces = all
home_mailbox = Maildir/  # To match the path for dovecot</description>
    </item>
    <item rdf:about="http://pockettheories.com/dokuwiki/doku.php?id=bind&amp;rev=1773679848&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-03-16T16:50:48+00:00</dc:date>
        <dc:creator>reddy (reddy@undisclosed.example.com)</dc:creator>
        <title>bind</title>
        <link>http://pockettheories.com/dokuwiki/doku.php?id=bind&amp;rev=1773679848&amp;do=diff</link>
        <description>Minimal Config

/etc/named.conf


options {
  directory &quot;/var/cache/bind&quot;;
  dnssec-validation auto;
  listen-on-v6 { any; };

#  allow-query { any; };
#  allow-recursion { any; };
#  forwarders { 1.1.1.1; };
};

zone &quot;example.local&quot; {
  type master;
  file &quot;/etc/bind/db.example_local&quot;;
};</description>
    </item>
    <item rdf:about="http://pockettheories.com/dokuwiki/doku.php?id=railties&amp;rev=1773480176&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-03-14T09:22:56+00:00</dc:date>
        <dc:creator>reddy (reddy@undisclosed.example.com)</dc:creator>
        <title>railties - Modifying templates</title>
        <link>http://pockettheories.com/dokuwiki/doku.php?id=railties&amp;rev=1773480176&amp;do=diff</link>
        <description>Railties

To edit the scaffold templates, look up the location of the railties gem with “gem info railties”

Within the location above, edit the templates in the subdirectories:

	*  gems/railties-(version-here)/lib/rails/generators/erb/scaffold</description>
    </item>
    <item rdf:about="http://pockettheories.com/dokuwiki/doku.php?id=ransack&amp;rev=1773477356&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-03-14T08:35:56+00:00</dc:date>
        <dc:creator>reddy (reddy@undisclosed.example.com)</dc:creator>
        <title>ransack - Quick Start</title>
        <link>http://pockettheories.com/dokuwiki/doku.php?id=ransack&amp;rev=1773477356&amp;do=diff</link>
        <description>Ransack


bundle add ransack

# In the model, whitelist the fields to search
  def self.ransackable_attributes(auth_object = nil)
    [&quot;field1&quot;, &quot;field2&quot;]
  end

# In the controller
def index
  @q = MyModel.ransack(params[:q])
  @data = @q.result(distinct: true).page(params[:page])
end

# In the view
&lt;%= search_form_for @q do |f| %&gt;
  &lt;%= f.label :name_cont %&gt;
  &lt;%= f.search_field :name_cont %&gt;
  &lt;%= f.submit &quot;Search&quot; %&gt;
&lt;% end %&gt;
&lt;%# 
  Do a render &#039;mymodel/search_form.html.erb&#039;
  and put the a…</description>
    </item>
</rdf:RDF>
