<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xmlns:tt="http://teletype.in/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:media="http://search.yahoo.com/mrss/"><channel><title>Sviat</title><generator>teletype.in</generator><description><![CDATA[Sviat]]></description><image><url>https://teletype.in/files/d8/0d/d80dc831-48c1-44bf-94b7-d768b9551dab.png</url><title>Sviat</title><link>https://teletype.in/@sviat</link></image><link>https://teletype.in/@sviat?utm_source=teletype&amp;utm_medium=feed_rss&amp;utm_campaign=sviat</link><atom:link rel="self" type="application/rss+xml" href="https://teletype.in/rss/sviat?offset=0"></atom:link><atom:link rel="next" type="application/rss+xml" href="https://teletype.in/rss/sviat?offset=10"></atom:link><atom:link rel="search" type="application/opensearchdescription+xml" title="Teletype" href="https://teletype.in/opensearch.xml"></atom:link><pubDate>Sat, 11 Apr 2026 14:47:58 GMT</pubDate><lastBuildDate>Sat, 11 Apr 2026 14:47:58 GMT</lastBuildDate><item><guid isPermaLink="true">https://teletype.in/@sviat/install-docker-k8s</guid><link>https://teletype.in/@sviat/install-docker-k8s?utm_source=teletype&amp;utm_medium=feed_rss&amp;utm_campaign=sviat</link><comments>https://teletype.in/@sviat/install-docker-k8s?utm_source=teletype&amp;utm_medium=feed_rss&amp;utm_campaign=sviat#comments</comments><dc:creator>sviat</dc:creator><title>Install docker &amp; k8s</title><pubDate>Tue, 24 Nov 2020 08:55:28 GMT</pubDate><media:content medium="image" url="https://teletype.in/files/0b/95/0b9538e5-5891-40d9-89e1-bf443b5a0d5e.png"></media:content><description><![CDATA[<img src="https://teletype.in/files/21/30/2130dbd8-5549-4e65-ab82-bd030e9ed2b6.png"></img>]]></description><content:encoded><![CDATA[
  <figure class="m_column">
    <img src="https://teletype.in/files/21/30/2130dbd8-5549-4e65-ab82-bd030e9ed2b6.png" width="787" />
  </figure>
  <pre>sudo su
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
echo &quot;deb http://apt.kubernetes.io kubernetes-xenial main&quot; &gt;&gt; /etc/apt/sources.list.d/kubernetes.list
add-apt-repository &quot;deb https://download.docker.com/linux/$(. /etc/os-release; echo &quot;$ID&quot;) $(lsb_release -cs) stable&quot;
apt-get update
apt-get install -y docker-ce kubelet kubeadm kubectl
swapoff -a
sed -i &#x27;/ swap / s/^/#/&#x27; /etc/fstab</pre>

]]></content:encoded></item><item><guid isPermaLink="true">https://teletype.in/@sviat/lxzZ0ACjy</guid><link>https://teletype.in/@sviat/lxzZ0ACjy?utm_source=teletype&amp;utm_medium=feed_rss&amp;utm_campaign=sviat</link><comments>https://teletype.in/@sviat/lxzZ0ACjy?utm_source=teletype&amp;utm_medium=feed_rss&amp;utm_campaign=sviat#comments</comments><dc:creator>sviat</dc:creator><title>Bash tips</title><pubDate>Tue, 20 Oct 2020 13:04:11 GMT</pubDate><description><![CDATA[sudo kill $(sudo lsof -ti:port)]]></description><content:encoded><![CDATA[
  <h2>General</h2>
  <h3>kill procces by port</h3>
  <p><code>sudo kill $(sudo lsof -ti:port)</code></p>
  <h3>create symlink<br /><code>ln -sf /path/to/file /path/to/symlink</code></h3>
  <h3>open url from bash</h3>
  <p><code>xdg-open http://google.com</code></p>
  <h3>bash loop</h3>
  <p><code>for (;;); do command; command-2; done</code></p>
  <h3>output timestamps</h3>
  <pre>ts # timestamp
ts -i # each output duration
ts -s # time taken from start</pre>
  <h3>find &amp; replace in all files in folder &amp; subfolders</h3>
  <pre>sudo kill $(sudo lsof -ti:port)
ack -l &#x27;pattern&#x27; | xargs perl -pi -E &#x27;s/pattern/replacement/g&#x27;</pre>
  <h3>visualize git repo development</h3>
  <p><code>gource --stop-at-end --hide filenames,usernames,dirnames -1920x1080 -s 0.5 -o - | ffmpeg -y -r 30 -f image2pipe -vcodec ppm -i - -vcodec libx264 -preset ultrafast -pix_fmt yuv420p -threads 0 -bf 0 gource.mp4 -crf 0</code></p>
  <h3>list opened ports and its process names</h3>
  <p><code>netstat -nlpt</code></p>
  <h2>postgres</h2>
  <h3>install psql</h3>
  <p><code>sudo apt install postgresql postgresql-contrib</code></p>
  <h3>drop connections for dbname</h3>
  <pre>SELECT pg_terminate_backend(pg_stat_activity.pid) FROM pg_stat_activity
WHERE pg_stat_activity.datname = &#x27;dbname&#x27; AND pid &lt;&gt; pg_backend_pid();</pre>
  <h3>create full duplicate of dbname named dbname_copy with db_user owner</h3>
  <p><code>create database dbname_copy WITH TEMPLATE dbname OWNER owner;</code></p>
  <h3>check postgres certificates</h3>
  <pre>curl https://raw.githubusercontent.com/thusoy/postgres-mitm/master/postgres_get_server_cert.py | python3 - host:port | openssl x509 -noout -dates</pre>

]]></content:encoded></item><item><guid isPermaLink="true">https://teletype.in/@sviat/async-bash</guid><link>https://teletype.in/@sviat/async-bash?utm_source=teletype&amp;utm_medium=feed_rss&amp;utm_campaign=sviat</link><comments>https://teletype.in/@sviat/async-bash?utm_source=teletype&amp;utm_medium=feed_rss&amp;utm_campaign=sviat#comments</comments><dc:creator>sviat</dc:creator><title>Aync execution for bash</title><pubDate>Fri, 11 Sep 2020 08:12:07 GMT</pubDate><description><![CDATA[Easy way to manage scripts in the background]]></description><content:encoded><![CDATA[
  <p>Easy way to manage scripts in the background</p>
  <pre># in order to use in bash scripts add &quot;set -m&quot; to enable job control

echo &gt; job-status
command1 || echo false &gt; job-status &amp;
command2 || echo false &gt; job-status &amp;
# repeat as much as needed
while [[ $(jobs) ]]; do fg; done
[[ $(cat job-status) != &quot;false&quot; ]]</pre>

]]></content:encoded></item><item><guid isPermaLink="true">https://teletype.in/@sviat/resizing-partition</guid><link>https://teletype.in/@sviat/resizing-partition?utm_source=teletype&amp;utm_medium=feed_rss&amp;utm_campaign=sviat</link><comments>https://teletype.in/@sviat/resizing-partition?utm_source=teletype&amp;utm_medium=feed_rss&amp;utm_campaign=sviat#comments</comments><dc:creator>sviat</dc:creator><title>Resize partition on running Linux instance</title><pubDate>Tue, 18 Aug 2020 09:17:00 GMT</pubDate><media:content medium="image" url="https://teletype.in/files/14/17/1417d32c-c798-4cda-b2f8-e0f4d85f4b58.png"></media:content><description><![CDATA[<img src="https://teletype.in/files/40/51/4051521e-3b4f-45fd-b320-04131fe61e78.png"></img>As an example, we'll pick AWS and will add 5GB(60-&gt;65 GB).]]></description><content:encoded><![CDATA[
  <figure class="m_column">
    <img src="https://teletype.in/files/40/51/4051521e-3b4f-45fd-b320-04131fe61e78.png" width="616" />
  </figure>
  <h3>Step 1: Add storage</h3>
  <p>As an example, we&#x27;ll pick AWS and will add 5GB(60-&gt;65 GB).</p>
  <figure class="m_custom">
    <img src="https://teletype.in/files/e3/36/e336d4f7-9450-460d-8daa-2d87d7e235a0.png" width="1329" />
  </figure>
  <figure class="m_column">
    <img src="https://teletype.in/files/34/8b/348b8bec-582b-490c-806d-9056f20e6f83.png" width="494" />
    <figcaption>Used space</figcaption>
  </figure>
  <h3>Step 2: Resize physical partition</h3>
  <p>Use <code>lsblk | grep -v loop</code> to list all available disks and partitions</p>
  <figure class="m_original">
    <img src="https://teletype.in/files/b4/6c/b46c4fd1-e2ef-474e-85db-450a351eb33f.png" width="427" />
  </figure>
  <p><code>sudo growpart /dev/{device_label} {index}</code> to resize partition</p>
  <figure class="m_column">
    <img src="https://teletype.in/files/f4/4c/f44ca886-835d-4970-9716-354a4590e7bc.png" width="1000" />
  </figure>
  <h3>Step 3: Tell the system to use newly available space</h3>
  <p><code>sudo resize2fs /dev/{partition_label}</code></p>
  <figure class="m_column">
    <img src="https://teletype.in/files/03/78/03782fb7-2a10-4397-9e16-ea5c78eeb1b4.png" width="678" />
  </figure>
  <p><code>df -h /</code> to check results</p>
  <figure class="m_column">
    <img src="https://teletype.in/files/86/6f/866f452c-2692-4f67-83e8-4c295b8199aa.png" width="491" />
  </figure>

]]></content:encoded></item></channel></rss>