<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.3.2">Jekyll</generator><link href="http://0.0.0.0:4000/feed.xml" rel="self" type="application/atom+xml" /><link href="http://0.0.0.0:4000/" rel="alternate" type="text/html" /><updated>2026-09-07T13:04:20+00:00</updated><id>http://0.0.0.0:4000/feed.xml</id><title type="html">uly.me</title><subtitle></subtitle><author><name>ulysses</name></author><entry><title type="html">making machine reservations</title><link href="http://0.0.0.0:4000/2026/09/07/making-machine-reservations.html" rel="alternate" type="text/html" title="making machine reservations" /><published>2026-09-07T00:00:00+00:00</published><updated>2026-09-07T00:00:00+00:00</updated><id>http://0.0.0.0:4000/2026/09/07/making-machine-reservations</id><content type="html" xml:base="http://0.0.0.0:4000/2026/09/07/making-machine-reservations.html"><![CDATA[<p>An Ansible script that makes multiple machines reservations in a GCP project based on machine type, zone and number of running instances.</p>

<p>The script …</p>

<ul>
  <li>Creates new reservations if it’s non-existent with count.</li>
  <li>Update an existing reservation by increasing or decreasing count.</li>
  <li>Delete a reservation if no instances are present or none are running.</li>
  <li>Print a summary at end of the script.</li>
</ul>]]></content><author><name>ulysses</name></author><summary type="html"><![CDATA[An Ansible script that makes multiple machines reservations in a GCP project based on machine type, zone and number of running instances.]]></summary></entry><entry><title type="html">column t</title><link href="http://0.0.0.0:4000/2026/05/15/column-t.html" rel="alternate" type="text/html" title="column t" /><published>2026-05-15T00:00:00+00:00</published><updated>2026-05-15T00:00:00+00:00</updated><id>http://0.0.0.0:4000/2026/05/15/column-t</id><content type="html" xml:base="http://0.0.0.0:4000/2026/05/15/column-t.html"><![CDATA[<p>If you have a text file with multiple columns, you can use column to align the output vertically.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>cat output.txt | column -t 
</code></pre></div></div>]]></content><author><name>ulysses</name></author><summary type="html"><![CDATA[If you have a text file with multiple columns, you can use column to align the output vertically.]]></summary></entry><entry><title type="html">run command recursively directory</title><link href="http://0.0.0.0:4000/2026/05/05/run-command-recursively-directory.html" rel="alternate" type="text/html" title="run command recursively directory" /><published>2026-05-05T00:00:00+00:00</published><updated>2026-05-05T00:00:00+00:00</updated><id>http://0.0.0.0:4000/2026/05/05/run-command-recursively-directory</id><content type="html" xml:base="http://0.0.0.0:4000/2026/05/05/run-command-recursively-directory.html"><![CDATA[<p>Here’s the script that will the dos2unix command recursively in the current directory.</p>

<p>It doesn’t have to be dos2unix but can be any command.</p>

<p>Run it on all files.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>find . -type f -exec dos2unix {} +
</code></pre></div></div>

<p>Run it on all shell files only.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>find . -type f -name "*.sh" -exec dos2unix {} +
</code></pre></div></div>]]></content><author><name>ulysses</name></author><summary type="html"><![CDATA[Here’s the script that will the dos2unix command recursively in the current directory.]]></summary></entry><entry><title type="html">13 cent cloud bill</title><link href="http://0.0.0.0:4000/2026/05/03/13-cent-cloud-bill.html" rel="alternate" type="text/html" title="13 cent cloud bill" /><published>2026-05-03T00:00:00+00:00</published><updated>2026-05-03T00:00:00+00:00</updated><id>http://0.0.0.0:4000/2026/05/03/13-cent-cloud-bill</id><content type="html" xml:base="http://0.0.0.0:4000/2026/05/03/13-cent-cloud-bill.html"><![CDATA[<p>Here’s my $0.13 cent cloud bill.</p>

<p>Back in the day, my cloud bill was anywhere between $10-20 per month because I was hosting a VM.</p>

<p>I converted from WordPress site to Jekyll, a static site generator hosted for free at GitHub.</p>

<p>My photo gallery is hosted in AWS S3. I use node.js programs to generate the galleries.</p>

<p>My total bill this month is $0.13. It will climb a few cents as I upload more photos.</p>]]></content><author><name>ulysses</name></author><summary type="html"><![CDATA[Here’s my $0.13 cent cloud bill.]]></summary></entry><entry><title type="html">linux gb memory</title><link href="http://0.0.0.0:4000/2026/04/22/linux-gb-memory.html" rel="alternate" type="text/html" title="linux gb memory" /><published>2026-04-22T00:00:00+00:00</published><updated>2026-04-22T00:00:00+00:00</updated><id>http://0.0.0.0:4000/2026/04/22/linux-gb-memory</id><content type="html" xml:base="http://0.0.0.0:4000/2026/04/22/linux-gb-memory.html"><![CDATA[<p>This is the command to display system memory in GB in Linux.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>grep -E 'MemTotal|MemAvailable' /proc/meminfo | awk '{printf "%s %.2f GB\n", $1, $2/1024^2}'
</code></pre></div></div>]]></content><author><name>ulysses</name></author><summary type="html"><![CDATA[This is the command to display system memory in GB in Linux.]]></summary></entry><entry><title type="html">confirm random string</title><link href="http://0.0.0.0:4000/2026/04/21/confirm-random-string.html" rel="alternate" type="text/html" title="confirm random string" /><published>2026-04-21T00:00:00+00:00</published><updated>2026-04-21T00:00:00+00:00</updated><id>http://0.0.0.0:4000/2026/04/21/confirm-random-string</id><content type="html" xml:base="http://0.0.0.0:4000/2026/04/21/confirm-random-string.html"><![CDATA[<p>Here’s a nice little script that generates a random string.</p>

<p>User is asked to match the string. If there’s a match, it continues.</p>

<p>If there’s no match, it will exit.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>confirm() {
  CHARNUM=6
  CHARSET='A-Za-z0-9'
  # Generate random string
  RANDOM_STRING=$(LC_ALL=C tr -dc $CHARSET &lt;/dev/urandom | head -c $CHARNUM)
  printf "%s\n" "Please confirm Code to continue: $RANDOM_STRING"
  read -r -p "Code: " USER_INPUT
  if [[ "$USER_INPUT" != "$RANDOM_STRING" ]]; then
    echo "❌ Code does not match! Exiting!"
    exit 1
  fi
  echo "✅ Code matched!"
  echo "Shutting down server!"
}
</code></pre></div></div>]]></content><author><name>ulysses</name></author><summary type="html"><![CDATA[Here’s a nice little script that generates a random string.]]></summary></entry><entry><title type="html">git push script</title><link href="http://0.0.0.0:4000/2026/04/21/git-push-script.html" rel="alternate" type="text/html" title="git push script" /><published>2026-04-21T00:00:00+00:00</published><updated>2026-04-21T00:00:00+00:00</updated><id>http://0.0.0.0:4000/2026/04/21/git-push-script</id><content type="html" xml:base="http://0.0.0.0:4000/2026/04/21/git-push-script.html"><![CDATA[<p>Here’s my new git push script.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>#!/bin/bash

comment=$1
if [[ -z $comment ]]; then
  echo "Usage: $0 'put your comment here'"
  exit
fi

git add .
git commit -am "$comment"
git push
</code></pre></div></div>

<p>To use the script, simply execute ./gitPush.sh ‘put your git comment here’</p>

<p>The script will add, commit and push it to your remote repository.</p>]]></content><author><name>ulysses</name></author><summary type="html"><![CDATA[Here’s my new git push script.]]></summary></entry><entry><title type="html">git remote set url</title><link href="http://0.0.0.0:4000/2026/04/21/git-remote-set-url.html" rel="alternate" type="text/html" title="git remote set url" /><published>2026-04-21T00:00:00+00:00</published><updated>2026-04-21T00:00:00+00:00</updated><id>http://0.0.0.0:4000/2026/04/21/git-remote-set-url</id><content type="html" xml:base="http://0.0.0.0:4000/2026/04/21/git-remote-set-url.html"><![CDATA[<p>I run Gitea on my desktop. Recently my desktop IP address changed.</p>

<p>I should really set it to a static IP address, but that’s another story.</p>

<p>Doing a git pull and a git push no longer works since the remote URL changed.</p>

<p>To update to a new remote location, simply run the command below.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>git remote set-url origin http://192.168.68.105:3000/ulysses/scripts.git
</code></pre></div></div>

<p>If you use SSH, use the SSH remote link instead of HTTP.</p>]]></content><author><name>ulysses</name></author><summary type="html"><![CDATA[I run Gitea on my desktop. Recently my desktop IP address changed.]]></summary></entry><entry><title type="html">editing crontab without duplicates</title><link href="http://0.0.0.0:4000/2026/04/06/editing-crontab-without-duplicates.html" rel="alternate" type="text/html" title="editing crontab without duplicates" /><published>2026-04-06T00:00:00+00:00</published><updated>2026-04-06T00:00:00+00:00</updated><id>http://0.0.0.0:4000/2026/04/06/editing-crontab-without-duplicates</id><content type="html" xml:base="http://0.0.0.0:4000/2026/04/06/editing-crontab-without-duplicates.html"><![CDATA[<p>Here’s a neat script that will edit crontab without creating duplicates.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>#!/usr/bin/env bash

CRON_ENTRY="0 2 * * * /path/to/script.sh"

EXISTING=$(crontab -l 2&gt;/dev/null || true)

if ! echo "$EXISTING" | grep -Fxq "$CRON_ENTRY"; then
  printf "%s\n%s\n" "$EXISTING" "$CRON_ENTRY" | crontab -
fi
</code></pre></div></div>]]></content><author><name>ulysses</name></author><summary type="html"><![CDATA[Here’s a neat script that will edit crontab without creating duplicates.]]></summary></entry><entry><title type="html">baggage limits</title><link href="http://0.0.0.0:4000/2026/02/21/baggage-limits.html" rel="alternate" type="text/html" title="baggage limits" /><published>2026-02-21T00:00:00+00:00</published><updated>2026-02-21T00:00:00+00:00</updated><id>http://0.0.0.0:4000/2026/02/21/baggage-limits</id><content type="html" xml:base="http://0.0.0.0:4000/2026/02/21/baggage-limits.html"><![CDATA[<p>Here are the baggage limits for international travel for the following airlines.</p>

<table>
  <thead>
    <tr>
      <th>Baggage Limits</th>
      <th> </th>
      <th> </th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Delta Airlines</td>
      <td> </td>
      <td> </td>
    </tr>
    <tr>
      <td>Baggage</td>
      <td>–</td>
      <td>50 lbs</td>
    </tr>
    <tr>
      <td>Carry On</td>
      <td>–</td>
      <td>–</td>
    </tr>
    <tr>
      <td>Korean Airlines</td>
      <td> </td>
      <td> </td>
    </tr>
    <tr>
      <td>Baggage</td>
      <td>20kg</td>
      <td>44 lbs</td>
    </tr>
    <tr>
      <td>Carry On</td>
      <td>10kg</td>
      <td>22 lbs</td>
    </tr>
    <tr>
      <td>Philippine Airlines (domestic)</td>
      <td> </td>
      <td> </td>
    </tr>
    <tr>
      <td>Baggage</td>
      <td>20kg</td>
      <td>44 lbs</td>
    </tr>
    <tr>
      <td>Carry On</td>
      <td>7kg</td>
      <td>15 lbs</td>
    </tr>
  </tbody>
</table>]]></content><author><name>ulysses</name></author><summary type="html"><![CDATA[Here are the baggage limits for international travel for the following airlines.]]></summary></entry></feed>