<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
	<title>voja's rss feed</title>
	<link>https://lazic.xyz/</link>
	<description>RSS feed for voja's blog</description>
	<generator>Hugo -- gohugo.io</generator>
	<language>en-us</language>
    
        <atom:link href="https://lazic.xyz/rss.xml" rel="self" type="application/rss+xml" />
	
	
	<item>
		<title>Using Bluetooth speakers on Linux</title>
		<link>https://lazic.xyz/blog/using-bluetooth-speakers-on-linux/</link>
		<pubDate>Mon, 18 Jul 2022 00:00:00 +0000</pubDate>
		
		<guid>https://lazic.xyz/blog/using-bluetooth-speakers-on-linux/</guid>
		<description>&lt;p&gt;Using bluetooth speakers or anything bluetooth related is an infamously difficult task, so I wrote this short guide, primarily for myself.&lt;/p&gt;
&lt;p&gt;I say &#34;speakers&#34; but really it should go for other bluetooth devices as well (like headphones, etc.)&lt;/p&gt;

&lt;h2&gt;1. Enable Bluetooth device (if not already)&lt;/h2&gt;

&lt;pre&gt;sudo rfkill unblock bluetooth&lt;/pre&gt;

&lt;h2&gt;2. Install &lt;a target=&#34;_blank&#34; href=&#34;http://bluez.org&#34;&gt;Bluez&lt;/a&gt;&lt;/h2&gt;

&lt;pre&gt;sudo apt install pulseaudio-module-bluetooth bluez bluez-firmware bluez-tools pavucontrol&lt;/pre&gt;

&lt;h2&gt;3. Find and edit the &lt;code&gt;bluetooth.service&lt;/code&gt; file&lt;/h2&gt;

&lt;p&gt;You can find this by running&lt;/p&gt;

&lt;pre&gt;sudo systemctl status bluetooth&lt;/pre&gt;

&lt;p&gt;and look at the first two lines for a service file&lt;/p&gt;

&lt;pre&gt;
bluetooth.service - Bluetooth service
  Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
&lt;/pre&gt;

&lt;p&gt;open it, find the &lt;code&gt;ExecStart&lt;/code&gt; line and add &lt;code&gt;--noplugin=sap&lt;/code&gt; to the end.&lt;/p&gt;

&lt;pre&gt;
ExecStart=/usr/lib/bluetooth/bluetoothd --noplugin=sap
&lt;/pre&gt;

&lt;p&gt;After that reload the daemon and restart the service.&lt;/p&gt;

&lt;pre&gt;
sudo systemctl daemon-reload
sudo systemctl restart bluetooth
&lt;/pre&gt;

&lt;h2&gt;4. Connect to the speaker with &lt;code&gt;bluetoothctl&lt;/code&gt;&lt;/h2&gt;
&lt;pre&gt;
power on
scan on (find the MAC address of the speaker)
pair &amp;lt;MAC_ADDRESS&amp;gt;
trust &amp;lt;MAC_ADDRESS&amp;gt;
connect &amp;lt;MAC_ADDRESS&amp;gt;
&lt;/pre&gt;

&lt;p&gt;(if &#34;connect&#34; doesn&#39;t work, try resetting pulseaudio)&lt;/p&gt;
&lt;pre&gt;
pulseaudio -k
pulseaudio --start
&lt;/pre&gt;

&lt;p&gt;You should now see the speaker as an output device in &lt;code&gt;pavucontrol&lt;/code&gt;.&lt;/p&gt;
</description>
	</item>
	
	<item>
		<title>Using the Lastfm API</title>
		<link>https://lazic.xyz/blog/using-the-lastfm-api/</link>
		<pubDate>Thu, 07 Apr 2022 00:00:00 +0000</pubDate>
		
		<guid>https://lazic.xyz/blog/using-the-lastfm-api/</guid>
		<description>&lt;h3&gt;
Requirements:
&lt;/h3&gt;
&lt;p&gt;
 - &lt;a href=&#34;https://stedolan.github.io/jq/&#34; target=&#34;_blank&#34;&gt;jq&lt;/a&gt; for parsing JSON data
&lt;/p&gt;

&lt;h2&gt; 1. Get an API key from &lt;a href=&#34;https://www.last.fm/api/account/create&#34;&gt;Last.fm&lt;/a&gt; &lt;/h2&gt;

&lt;h2&gt; 2. Get request token - &lt;a href=&#34;https://www.last.fm/api/show/auth.getToken&#34;&gt;auth.getToken&lt;/a&gt; &lt;/h2&gt;

&lt;h3 id=&#34;construct-api&#34;&gt;2.1. Constructing API signatures&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;sort all parameters and their values alphabetically by name and concatenate them in the form &lt;em&gt;&amp;ltname&amp;gt&amp;ltvalue&amp;gt&lt;/em&gt;, for &lt;strong&gt;auth.getToken&lt;/strong&gt;:

&lt;pre&gt;
&lt;strong&gt;api_key&lt;/strong&gt;&lt;em&gt;YOUR_API_KEY&lt;/em&gt;&lt;strong&gt;method&lt;/strong&gt;&lt;em&gt;auth.getToken&lt;/em&gt;
&lt;/pre&gt;

&lt;p&gt;For easier sorting, I use a python prompt&lt;/p&gt;
&lt;pre&gt;
&gt;&gt;&gt; sorted([&#39;method&#39;, &#39;track&#39;, &#39;artist&#39;, &#39;api_key&#39;, &#39;api_sig&#39;, &#39;sk&#39;])
[&#39;api_key&#39;, &#39;api_sig&#39;, &#39;artist&#39;, &#39;method&#39;, &#39;sk&#39;, &#39;track&#39;]
&lt;/pre&gt;
	&lt;/li&gt;

	&lt;li&gt;append your shared secret to the end:
&lt;pre&gt;
&lt;strong&gt;api_key&lt;/strong&gt;&lt;em&gt;YOUR_API_KEY&lt;/em&gt;&lt;strong&gt;method&lt;/strong&gt;&lt;em&gt;auth.getToken&lt;/em&gt;&lt;strong&gt;SHARED_SECRET&lt;/strong&gt;
&lt;/pre&gt;
	&lt;/li&gt;

&lt;li&gt;generate MD5 hash
&lt;pre&gt;
TOKEN_SIG=$(echo -n &#34;api_keyYOUR_API_KEYmethodauth.getTokenSHARED_SECRET&#34; | md5sum | cut -f1 -d &#39; &#39;)**
&lt;/pre&gt;
	&lt;/li&gt;
&lt;/ol&gt;


&lt;h3&gt; 2.2. Getting token &lt;/h3&gt;

&lt;pre&gt;
TOKEN=$(wget -q \
&#34;https://ws.audioscrobbler.com/2.0/?method=auth.getToken&amp;api_key=${LASTFM_API_KEY}&amp;api_sig=${TOKEN_SIG}&amp;format=json&#34; -O - \
| jq -r &#39;.token&#39;)
&lt;/pre&gt;

&lt;h2&gt; 3. Getting session key - &lt;a href=&#34;https://www.last.fm/api/show/auth.getSession&#34;&gt;auth.getSession&lt;/a&gt; &lt;/h2&gt;

&lt;h3&gt; 3.1. Getting &lt;em&gt;api_sig&lt;/em&gt; &lt;/h3&gt;

&lt;pre&gt;
SESSION_API_SIG=$(echo -n &#34;api_key${LASTFM_API_KEY}methodauth.getSessiontoken${TOKEN}${SHARED_SECRET}&#34; | md5sum | cut -f1 -d&#39; &#39;)
&lt;/pre&gt;

&lt;h3&gt;3.2. Authorizing token&lt;/h3&gt;

&lt;pre&gt;
firefox &#34;http://www.last.fm/api/auth/?api_key=${LASTFM_API_KEY}&amp;token=${TOKEN}&#34;
&lt;/pre&gt;

&lt;p&gt;This will open a browser and wait for authentication from user&lt;/p&gt;

&lt;h3&gt; 3.3. Getting session key with authorized token &lt;/h3&gt;

&lt;pre&gt;
SESSION_KEY=$(wget -q &#34;https://ws.audioscrobbler.com/2.0/?method=auth.getSession&amp;api_key=${LASTFM_API_KEY}&amp;api_sig=${SESSION_API_SIG}&amp;token=${TOKEN}&amp;format=json&#34; -O - | jq -r &#39;.session.key&#39;)
&lt;/pre&gt;

&lt;p&gt;
Save this session key somewhere and use it for future API calls. If you lose this key, you’ll have to make another token, authorize it and get a new session key.
&lt;/p&gt;

&lt;h2&gt; 4. Making an authorized API call &lt;/h2&gt;

&lt;p&gt;If a call requires a API sigature, make one as described in &lt;a href=&#34;#construct-api&#34;&gt;2.1.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this example I’ll be using &lt;a target=&#34;_blank&#34; href=&#34;https://www.last.fm/api/show/track.love&#34;&gt;track.love&lt;/a&gt; (the same goes for &lt;a target=&#34;_blank&#34; href=&#34;https://www.last.fm/api/show/track.unlove&#34;&gt;track.unlove&lt;/a&gt;)&lt;/p&gt;

&lt;pre&gt;
$ LOVE_API_SIG=&#34;$(echo -n &#34;api_key${LASTFM_API_KEY}artist${ARTIST}methodtrack.lovesk${SESSION_KEY}track${TRACK}${SHARED_SECRET}&#34; | md5sum | cut -f 1 -d &#39; &#39;)&#34;

$ curl -s -i -d \
&#39;method=track.love&amp;track=${TRACK}&amp;artist=${ARTIST}&amp;api_key=${LASTFM_API_KEY}&amp;sk=${SESSION_KEY}&amp;api_sig=${LOVE_API_SIG}&#39; \
-X POST http://ws.audioscrobbler.com/2.0/ \
	| grep -q &#39;&amp;lt;lfm status=\&#39;ok\&#39;&#39; &amp;&amp; echo &#39;Added $(mpc current) to loved tracks.&#39;

&lt;/pre&gt;
</description>
	</item>
	
	<item>
		<title>My Music Server</title>
		<link>https://lazic.xyz/blog/my-music-server/</link>
		<pubDate>Sun, 08 Aug 2021 00:00:00 +0000</pubDate>
		
		<guid>https://lazic.xyz/blog/my-music-server/</guid>
		<description>
&lt;p&gt;I made a personal music server. Check it out at &lt;a href=&#34;https://music.lazic.xyz&#34;&gt;music.lazic.xyz&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;
It&#39;s a &lt;a href=&#34;https://subsonic.org/&#34;&gt;Subsonic&lt;/a&gt; server running from a Raspberry Pi I have at always running at home. It&#39;s synced with my music library that I maintain on my main computer and that I also share on &lt;a href=&#34;https://slsknet.org/&#34;&gt;Soulseek&lt;/a&gt;                (my username is &lt;em&gt;vojoslav&lt;/em&gt;, if you&#39;re interested in adding me).
&lt;/p&gt;
&lt;p&gt;
I wanted to cancel my Spotify subscription for some time now, but I couldn&#39;t think of a way to have my music library (aroung 30 gigs at time of writing) outside of my house. I&#39;ve been using it for about a week now and there weren&#39;t any major problems
(there was a couple of times where I couldn&#39;t connect from my phone, but only for a period of time, after that it resumed normally). Hopefully it continues working fine and I can switch over completely and stop giving my money to Spotify!
&lt;/p&gt;
&lt;p&gt;Feel free to check it out using the guest user. Enjoy!&lt;/p&gt;
</description>
	</item>
	
	<item>
		<title>Kinoteka Kalendar</title>
		<link>https://lazic.xyz/blog/kinoteka-kalendar/</link>
		<pubDate>Mon, 26 Jul 2021 00:00:00 +0000</pubDate>
		
		<guid>https://lazic.xyz/blog/kinoteka-kalendar/</guid>
		<description>
&lt;p&gt;I&#39;ve made a site that neatly lists the &lt;a href=&#34;http://www.kinoteka.org.rs/&#34;&gt;Yugoslav film archive&lt;/a&gt; monthly program. Hope you enjoy it!&lt;/p&gt;

&lt;p&gt;&lt;a href=&#34;https://kinoteka.lazic.xyz&#34;&gt;Kinoteka Kalendar&lt;/a&gt;&lt;/p&gt;
</description>
	</item>
	
	<item>
		<title>Crno/Beograd</title>
		<link>https://lazic.xyz/blog/crnobeograd/</link>
		<pubDate>Mon, 01 Mar 2021 00:00:00 +0000</pubDate>
		
		<guid>https://lazic.xyz/blog/crnobeograd/</guid>
		<description>&lt;style&gt;
	img {
		max-width: 100%;
		width: 80%;
		height: auto;
		margin-left: auto;
		margin-right: auto;
		display: block;
		padding: 10px 0px 10px 0px;
	}

	@media only screen and (max-width: 500px) {
		img {
			width: 100%;
			margin: 1em auto;
		}
	}

&lt;/style&gt;

&lt;p&gt;A collection of photographs I took during the initial lockdown in March of
2020. &lt;/p&gt;
&lt;p&gt;Some of these were taken to commemorate the 21st anniversary of the 1999 NATO
bombings of Yugoslavia, some to show life in Belgrade during the quarantine and
others were just nice scenes I saw while roaming the empty streets.&lt;/p&gt;

&lt;img src=&#34;https://lazic.xyz/img/crno-belo/01.jpg&#34; alt=&#34;The damaged RTS (Radio Television of Serbia) headquarters&#34; title=&#34;The damaged RTS (Radio Television of Serbia) headquarters&#34;&gt;
&lt;img src=&#34;https://lazic.xyz/img/crno-belo/02.jpg&#34; alt=&#34;Memorial to the victims of the NATO bombing of the RTS (Radio Television of Serbia) headquarters on 23 April 1999&#34; title=&#34;Memorial to the victims of the NATO bombing of the RTS (Radio Television of Serbia) headquarters on 23 April 1999&#34;&gt;
&lt;img src=&#34;https://lazic.xyz/img/crno-belo/03.jpg&#34; alt=&#34;The damaged Yugoslav Ministry of Defense building B as seen today&#34; title=&#34;The damaged Yugoslav Ministry of Defense building B as seen today&#34;&gt;
&lt;img src=&#34;https://lazic.xyz/img/crno-belo/04.jpg&#34; alt=&#34;The damaged Yugoslav Ministry of Defense building A as seen today&#34; title=&#34;The damaged Yugoslav Ministry of Defense building A as seen today&#34;&gt;
&lt;img src=&#34;https://lazic.xyz/img/crno-belo/05.jpg&#34; alt=&#34;A cute dog, somewhere in New Belgrade&#34; title=&#34;A cute dog, somewhere in New Belgrade&#34;&gt;
&lt;img src=&#34;https://lazic.xyz/img/crno-belo/06.jpg&#34; alt=&#34;A butterfly besides a bush, somewhere in New Belgrade&#34; title=&#34;A butterfly besides a bush, somewhere in New Belgrade&#34;&gt;
&lt;img src=&#34;https://lazic.xyz/img/crno-belo/07.jpg&#34; alt=&#34;A tree infront of a house, Zvezdara&#34; title=&#34;A tree infront of a house, Zvezdara&#34;&gt;
&lt;img src=&#34;https://lazic.xyz/img/crno-belo/08.jpg&#34; alt=&#34;Empty Vojislava Ilića street&#34; title=&#34;Empty Vojislava Ilića street&#34;&gt;
&lt;img src=&#34;https://lazic.xyz/img/crno-belo/09.jpg&#34; alt=&#34;Line of people outside a pharmacy, Zvezdara&#34; title=&#34;Line of people outside a pharmacy, Zvezdara&#34;&gt;
&lt;img src=&#34;https://lazic.xyz/img/crno-belo/10.jpg&#34; alt=&#34;Empty playground in &#39;Slavujev potok&#39; park&#34; title=&#34;Empty playground in &#39;Slavujev potok&#39; park&#34;&gt;
</description>
	</item>
	
	<item>
		<title>Recreating old photographs of Belgrade</title>
		<link>https://lazic.xyz/blog/recreating-old-photographs-of-belgrade/</link>
		<pubDate>Thu, 16 Jul 2020 00:00:00 +0000</pubDate>
		
		<guid>https://lazic.xyz/blog/recreating-old-photographs-of-belgrade/</guid>
		<description>&lt;head&gt;

&lt;script src=&#34;https://lazic.xyz/js/imagecomp.js&#34;&gt;&lt;/script&gt;

&lt;style&gt;
	* {box-sizing: border-box;}

	.img-comp-container-hor, .hor{
		position: relative;
		width: 614px;
		height: 379px;
	}

	.img-comp-container-vert, .vert{
		position: relative;
		width: 614px;
		height: 768px;
	}

	.square, .img-comp-container-block {
		position: relative;
		width: 614px;
		height: 614px;
	}

	.img-comp-container-hor, .imt-comp-container-vert, .img-comp-container-block {
	  margin: 20px 0px 40px 0px;
	  position: relative;
	}

	.img-comp-img {
		position: absolute;
		width: auto;
		height: auto;
		overflow: hidden;
	}

	.img-comp-img img {
		display: block;
	}

	.img-comp-slider {
		position: absolute;
		z-index: 9;
		cursor: ew-resize;
		width: 30px;
		height: 30px;
		background-color: #6ddab9;
		opacity: 0.7;
		border-radius: 50%;
	}

  .container {
    width: max-content;
  }

&lt;/style&gt;

&lt;/head&gt;

&lt;h3&gt;Studentski park&lt;/h3&gt;
&lt;div class=&#34;img-comp-container-hor&#34;&gt;
  &lt;div class=&#34;img-comp-img&#34;&gt;
	&lt;img src=&#34;https://lazic.xyz/img/beograd/002_2.jpg&#34; class=&#34;hor&#34;&gt;
  &lt;/div&gt;
  &lt;div class=&#34;img-comp-img img-comp-overlay&#34;&gt;
	&lt;img src=&#34;https://lazic.xyz/img/beograd/002_1.jpg&#34; class=&#34;hor&#34;&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;h3&gt;Kalemegdan&lt;/h3&gt;
&lt;div class=&#34;img-comp-container-hor&#34;&gt;
  &lt;div class=&#34;img-comp-img&#34;&gt;
    &lt;img src=&#34;https://lazic.xyz/img/beograd/006_2.jpg&#34; class=&#34;hor&#34;&gt;
  &lt;/div&gt;
  &lt;div class=&#34;img-comp-img img-comp-overlay&#34;&gt;
    &lt;img src=&#34;https://lazic.xyz/img/beograd/006_1.jpg&#34; class=&#34;hor&#34;&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;h3&gt;Tadeuša Košćuškog&lt;/h3&gt;
&lt;div class=&#34;img-comp-container-hor&#34;&gt;
  &lt;div class=&#34;img-comp-img&#34;&gt;
    &lt;img src=&#34;https://lazic.xyz/img/beograd/008_2.jpg&#34; class=&#34;hor&#34;&gt;
  &lt;/div&gt;
  &lt;div class=&#34;img-comp-img img-comp-overlay&#34;&gt;
    &lt;img src=&#34;https://lazic.xyz/img/beograd/008_1.jpg&#34; class=&#34;hor&#34;&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;h3&gt;Stara Kruna/Gradska biblioteka&lt;/h3&gt;
&lt;div class=&#34;img-comp-container-hor&#34;&gt;
  &lt;div class=&#34;img-comp-img&#34;&gt;
    &lt;img src=&#34;https://lazic.xyz/img/beograd/009_2.jpg&#34; class=&#34;hor&#34;&gt;
  &lt;/div&gt;
  &lt;div class=&#34;img-comp-img img-comp-overlay&#34;&gt;
    &lt;img src=&#34;https://lazic.xyz/img/beograd/009_1.jpg&#34; class=&#34;hor&#34;&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;h3&gt;Spomenik Knezu Mihailu&lt;/h3&gt;
&lt;div class=&#34;img-comp-container-vert&#34;&gt;
  &lt;div class=&#34;img-comp-img&#34;&gt;
    &lt;img src=&#34;https://lazic.xyz/img/beograd/010_2.jpg&#34; class=&#34;vert&#34;&gt;
  &lt;/div&gt;
  &lt;div class=&#34;img-comp-img img-comp-overlay&#34;&gt;
    &lt;img src=&#34;https://lazic.xyz/img/beograd/010_1.jpg&#34; class=&#34;vert&#34;&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;h3&gt;Jugoexport&lt;/h3&gt;
&lt;div class=&#34;img-comp-container-hor&#34;&gt;
  &lt;div class=&#34;img-comp-img&#34;&gt;
    &lt;img src=&#34;https://lazic.xyz/img/beograd/011_2.jpg&#34; class=&#34;hor&#34;&gt;
  &lt;/div&gt;
  &lt;div class=&#34;img-comp-img img-comp-overlay&#34;&gt;
    &lt;img src=&#34;https://lazic.xyz/img/beograd/011_1.jpg&#34; class=&#34;hor&#34;&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;h3&gt;Palata Albanija&lt;/h3&gt;
&lt;div class=&#34;img-comp-container-vert&#34;&gt;
  &lt;div class=&#34;img-comp-img&#34;&gt;
    &lt;img src=&#34;https://lazic.xyz/img/beograd/013_2.jpg&#34; class=&#34;vert&#34;&gt;
  &lt;/div&gt;
  &lt;div class=&#34;img-comp-img img-comp-overlay&#34;&gt;
    &lt;img src=&#34;https://lazic.xyz/img/beograd/013_1.jpg&#34; class=&#34;vert&#34;&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;h3&gt;Terazijska česma&lt;/h3&gt;
&lt;div class=&#34;img-comp-container-hor&#34;&gt;
  &lt;div class=&#34;img-comp-img&#34;&gt;
    &lt;img src=&#34;https://lazic.xyz/img/beograd/015_2.jpg&#34; class=&#34;hor&#34;&gt;
  &lt;/div&gt;
  &lt;div class=&#34;img-comp-img img-comp-overlay&#34;&gt;
    &lt;img src=&#34;https://lazic.xyz/img/beograd/015_1.jpg&#34; class=&#34;hor&#34;&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;h3&gt;Generalštab&lt;/h3&gt;
&lt;div class=&#34;img-comp-container-block&#34;&gt;
  &lt;div class=&#34;img-comp-img&#34;&gt;
    &lt;img src=&#34;https://lazic.xyz/img/beograd/018_2.jpg&#34; class=&#34;square&#34;&gt;
  &lt;/div&gt;
  &lt;div class=&#34;img-comp-img img-comp-overlay&#34;&gt;
    &lt;img src=&#34;https://lazic.xyz/img/beograd/018_1.jpg&#34; class=&#34;square&#34;&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;h3&gt;Dom kralja Aleksandra I&lt;/h3&gt;
&lt;div class=&#34;img-comp-container-hor&#34;&gt;
  &lt;div class=&#34;img-comp-img&#34;&gt;
    &lt;img src=&#34;https://lazic.xyz/img/beograd/019_2.jpg&#34; class=&#34;hor&#34;&gt;
  &lt;/div&gt;
  &lt;div class=&#34;img-comp-img img-comp-overlay&#34;&gt;
    &lt;img src=&#34;https://lazic.xyz/img/beograd/019_1.jpg&#34; class=&#34;hor&#34;&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;h3&gt;Most kralja Aleksandra&lt;/h3&gt;
&lt;div class=&#34;img-comp-container-hor&#34;&gt;
  &lt;div class=&#34;img-comp-img&#34;&gt;
    &lt;img src=&#34;https://lazic.xyz/img/beograd/022_2.jpg&#34; class=&#34;hor&#34;&gt;
  &lt;/div&gt;
  &lt;div class=&#34;img-comp-img img-comp-overlay&#34;&gt;
    &lt;img src=&#34;https://lazic.xyz/img/beograd/022_1.jpg&#34; class=&#34;hor&#34;&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;h3&gt;Kneza Miloša&lt;/h3&gt;
&lt;div class=&#34;img-comp-container-vert&#34;&gt;
  &lt;div class=&#34;img-comp-img&#34;&gt;
    &lt;img src=&#34;https://lazic.xyz/img/beograd/025_2.jpg&#34; class=&#34;vert&#34;&gt;
  &lt;/div&gt;
  &lt;div class=&#34;img-comp-img img-comp-overlay&#34;&gt;
    &lt;img src=&#34;https://lazic.xyz/img/beograd/025_1.jpg&#34; class=&#34;vert&#34;&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;script&gt;
	initComparisons();
&lt;/script&gt;
</description>
	</item>
	
	<item>
		<title>The site is back up and running</title>
		<link>https://lazic.xyz/blog/the-site-is-back-up-and-running/</link>
		<pubDate>Sat, 06 Jun 2020 00:00:00 +0000</pubDate>
		
		<guid>https://lazic.xyz/blog/the-site-is-back-up-and-running/</guid>
		<description>&lt;p&gt;With well over a year after the last update, I think another one is long overdue.&lt;/p&gt;

&lt;p&gt;In the meanwhile I&#39;ve started college and am currently studying for my first year finals. More precisely, I&#39;m currently putting off studying and going to bed to update a website I don&#39;t use.&lt;/p&gt;

&lt;p&gt;Besides school, I haven&#39;t really been working on any project for myself. One big one is a program to help students with Uvod u organizaciu i arhitekturu racunara I, which is a class from my first semester. It&#39;s full of really dull, by-hand
calculations of how computers process data and different arithmetic operations mixed in with some history of how computers came to be. I really liked it, but one thing that always bugged me about writing every step of how computers add
two numbers up, was that if I messed up somewhere along the way, it was nearly impossible to find out where. The aim of this program is to give students a walk through of the process so that they check their work.&lt;br&gt; My goal was to have
it be done by the fall semester, so that the freshmen can use it, which may be a bit unrealistic (big ups to covid), but I still have the summer ahead of me. (I hope, exams may not go as expected.)&lt;br&gt; Other than that I tried Linux from
Scratch and failed miserably.&lt;/p&gt;

&lt;p&gt;I hope this website will become more active from now on, I&#39;ll try and keep posted about what I&#39;m doing and project ideas and such. All things for me to look back and cringe years later.&lt;/p&gt;
</description>
	</item>
	
	<item>
		<title>The site is now live!</title>
		<link>https://lazic.xyz/blog/the-site-is-now-live/</link>
		<pubDate>Sun, 03 Feb 2019 00:00:00 +0000</pubDate>
		
		<guid>https://lazic.xyz/blog/the-site-is-now-live/</guid>
		<description>
&lt;p&gt;The site now has it&#39;s own domain and is hosted on a shared hosting server on Namecheap&lt;/p&gt;
&lt;p&gt;It took a while to set up SSL and FTP, but now it should all work.&lt;/p&gt;
&lt;p&gt;Next post will hopefully be more interesting.&lt;/p&gt;
</description>
	</item>
	
	<item>
		<title>Big update to website, now with an RSS feed!</title>
		<link>https://lazic.xyz/blog/big-update-to-website-now-with-an-rss-feed/</link>
		<pubDate>Mon, 28 Jan 2019 00:00:00 +0000</pubDate>
		
		<guid>https://lazic.xyz/blog/big-update-to-website-now-with-an-rss-feed/</guid>
		<description>
&lt;p&gt;Made some big changes to how the website and the script that automate the process work.
&lt;/p&gt;
&lt;p&gt;And also, as the title suggests, an rss feed, for all those boomers.&lt;/p&gt;
&lt;p&gt;It won&#39;t be flawless, I have to push the changes to see if the rss feed actually works, but it&#39;s functional.&lt;/p&gt;
&lt;p&gt;Enjoy!&lt;/p&gt;
</description>
	</item>
	
	<item>
		<title>Arch Install Guide</title>
		<link>https://lazic.xyz/blog/arch-install-guide/</link>
		<pubDate>Wed, 02 Jan 2019 00:00:00 +0000</pubDate>
		
		<guid>https://lazic.xyz/blog/arch-install-guide/</guid>
		<description>&lt;article class=&#34;markdown-body&#34;&gt;

&lt;h2&gt;Making a bootable Arch flash drive&lt;/h2&gt;

&lt;p&gt;Depending on your OS, it&#39;s a different process.&lt;/p&gt;
&lt;p&gt;Regardless of your OS, first download the ISO image from &lt;a target=&#34;_blank&#34; href=&#34;https://www.archlinux.org/download/&#34;&gt;archlinux.org&lt;/a&gt;. I recommend using the magnet link.&lt;/p&gt;
&lt;p&gt;If you&#39;re on Windows, I recommend &lt;a target=&#34;_blank&#34; href=&#34;https://rufus.ie/en_IE.html&#34;&gt;Rufus&lt;/a&gt;. Just set it to your flash drive and under &lt;em&gt;Format Options &gt; Create bootable disk using&lt;/em&gt; select &lt;em&gt;ISO image&lt;/em&gt; and select the Arch ISO file.&lt;/p&gt;
&lt;p&gt;If you&#39;re on Linux, just use &lt;code&gt;dd&lt;/code&gt; in this format&lt;/p&gt;
&lt;pre&gt;
dd if=/path/to/file.iso of=/dev/sdx status=&#34;progess&#34;
&lt;/pre&gt;
&lt;small&gt;
Replace sdx with your drive letter. Find this using &lt;em&gt;lsblk&lt;/em&gt;.
&lt;/small&gt;
&lt;p&gt;If you&#39;re on Mac, figure it out. (&lt;a target=&#34;_blank&#34; href=&#34;https://unetbootin.github.io/&#34;&gt;unetbootin&lt;/a&gt;, &lt;a target=&#34;_blank&#34; href=&#34;https://unetbootin.github.io/#install&#34;&gt;how-to&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;The last part is booting from the flash drive. Look up how to do it on your computer (it&#39;s usually just holding F2, F12 or Del during boot)&lt;/p&gt;
&lt;p&gt;Once you do that, you&#39;ll be greeted with a black terminal. Now it&#39;s time to prepare you computer for the installation.&lt;/p&gt;

&lt;h2&gt;Preparations&lt;/h2&gt;

&lt;p&gt;Before you begin:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Make sure you have an Internet connection, preferably Ethernet.&lt;/li&gt;
&lt;li&gt;Check if you have BIOS or UEFI:&lt;br&gt;
If &lt;code&gt;ls /sys/firmware/efi/efivars&lt;/code&gt; doesn&#39;t return anything, then you have BIOS and you can follow the rest of this guide.&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;timedatectl set-ntp true&lt;/code&gt; to set the system clock.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;Making the partitions&lt;/h3&gt;
&lt;p&gt;Partitioning, simply put, is making sections on your hard drive. Those sections are where certain parts of the OS are going to be installed.&lt;/p&gt;
&lt;p&gt;Most commonly, you need 4 partitions for almost any OS:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;a &lt;code&gt;boot&lt;/code&gt; partition - this holds all the necessary files for system boot.&lt;/li&gt;
&lt;li&gt;a &lt;code&gt;swap&lt;/code&gt; partition - this holds temporary memory for programs and makes reading that memory a lot faster.&lt;/li&gt;
&lt;li&gt;a &lt;code&gt;root&lt;/code&gt; partition - this holds all the programs and system files for Arch.&lt;/li&gt;
&lt;li&gt;and a &lt;code&gt;home&lt;/code&gt; partition (optionally) - this holds you personal files and data.&lt;/li&gt;
&lt;/ul&gt;

&lt;small&gt;
I say optionally, because you could just have your root partition also hold all your personal files, but I think having a separate home partition is better practice.
&lt;/small&gt;
&lt;p&gt;Now you need to make those partitions, and you do that with &lt;code&gt;fdisk&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;fdisk&lt;/code&gt; needs to be run with on a specific hard drive.&lt;/p&gt;
&lt;p&gt;To find your hard drive, run &lt;code&gt;lsblk&lt;/code&gt; to see all the hard drives and their partitions. You should be able to able to find the hard drive based on the size of it.&lt;/p&gt;
&lt;p&gt;Once you do, memorize the drive letter (should look like sdX, where X is a, b, c...)&lt;/p&gt;
&lt;p&gt;Then run&lt;/p&gt;
&lt;pre&gt;
fdisk /dev/sdX
&lt;/pre&gt;

&lt;p&gt;&lt;code&gt;fdisk&lt;/code&gt; has a couple of options that you need.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;p - prints existing partitions&lt;/li&gt;
&lt;li&gt;d - deletes the selected partition&lt;/li&gt;
&lt;li&gt;n - makes a new partition&lt;/li&gt;
&lt;li&gt;w - writes the new partitions to disk &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you already have partitions of a previous system on the drive, remove them with the &lt;code&gt;d&lt;/code&gt; option. You have to go through every partition on the drive one-by-one. &lt;b&gt;This will delete everything on those partitions.&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Once you have a clean partition table, you can start making the new partitions.&lt;/p&gt;
&lt;p&gt;The process of making a new partition is simple. The only part of the you have to pay attention to much space you give to the new partition.&lt;/p&gt;
&lt;p&gt;The process is made up of choosing the partition type, partition number, its first sector and last sector (this is where you choose the size, essentially you choose the begging and the end of the partition).&lt;/p&gt;
&lt;p&gt;You only need to adjust the Last Sector. Leave everything else to its default value.&lt;/p&gt;
&lt;p&gt;As for the size, that&#39;s really up to personal preference. I&#39;ll give you some pointers and you shouldn&#39;t have any problems using the same sizes I use.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;boot&lt;/code&gt; - 200M&lt;/li&gt;
&lt;li&gt;&lt;code&gt;swap&lt;/code&gt; - debated topic, you&#39;ll be fine with half of your RAM size.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;root&lt;/code&gt; - really depends on how much programs you&#39;re going to have and drive size, somewhere between 20-50G is good&lt;/li&gt;
&lt;li&gt;&lt;code&gt;home&lt;/code&gt; - the rest, leave last sector empty&lt;/li&gt;
&lt;/ul&gt;
&lt;small&gt;
Make sure that you set the type to Primary for each partition.
&lt;/small&gt;
&lt;p&gt;Now that every partition is made, use &lt;code&gt;lsblk&lt;/code&gt; to find their drive number.&lt;/p&gt;
&lt;p&gt;For the rest of this tutorial, I&#39;m going to assume you made the partitions in the order I did and that they have the same drive numbers (boot is 1, swap is 2...)&lt;/p&gt;

&lt;h3&gt;Making filesystems&lt;/h3&gt;
&lt;p&gt;Now that you have partitions, you need to put filesystems on them.&lt;/p&gt;
&lt;p&gt;I&#39;m going to put the &lt;code&gt;ext4&lt;/code&gt; filesystem on every partition except the swap partition.&lt;/p&gt;
&lt;p&gt;This is done with&lt;/p&gt;
&lt;pre&gt;
mkfs.ext4 /dev/sdX(1, 3, 4) (boot, root, home)
&lt;/pre&gt;
&lt;p&gt;Do this for each partition and with the appropriate drive letter and number.&lt;/p&gt;

&lt;p&gt;As for the &lt;code&gt;swap&lt;/code&gt; partition, it&#39;s a bit different.&lt;/p&gt;
&lt;pre&gt;
mkswap /dev/sdX2
swapon /dev/sdX2
&lt;/pre&gt;
&lt;p&gt;Now the &lt;code&gt;swap&lt;/code&gt; partition is made and mounted. Next we mount the rest of the partitions.&lt;/p&gt;

&lt;h3&gt;Mounting the filesystems&lt;/h3&gt;
&lt;p&gt;
These partitions exist, but they aren&#39;t usable untill we mount them. Simply put, we&#39;re giving them a specific location on our computer to access them and install our system there.
&lt;/p&gt;
&lt;p&gt;We do this with &lt;code&gt;mount&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;/mnt&lt;/code&gt; is commonly the designated place to mount drives, so that&#39;s what we&#39;ll be using.&lt;/p&gt;
&lt;p&gt;Imagine that &lt;code&gt;/mnt&lt;/code&gt; is the root folder of our system.&lt;/p&gt;
&lt;p&gt;It only makes sense that we mount the &lt;code&gt;root&lt;/code&gt; partition here.&lt;/p&gt;
&lt;p&gt;We do this with&lt;/p&gt;
&lt;pre&gt;
mount /dev/sdX3 /mnt
&lt;/pre&gt;
&lt;p&gt;Now the &lt;code&gt;root&lt;/code&gt; partition of our drive can be accessed through &lt;code&gt;/mnt&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;As for the other partitions, we&#39;ll mount them where they will be on our system, so the &lt;code&gt;boot&lt;/code&gt; partition at &lt;code&gt;/boot&lt;/code&gt; and &lt;code&gt;home&lt;/code&gt; at &lt;code&gt;/home&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;First we make those folder and then we mount the partitions there.&lt;/p&gt;
&lt;pre&gt;
mkdir /mnt/boot
mount /mnt/boot

mkdir /mnt/home
mount /mnt/home
&lt;/pre&gt;
&lt;p&gt;Run &lt;code&gt;lsblk&lt;/code&gt; to check if you mounted everything correctly.&lt;/p&gt;

&lt;h3&gt;Installing Arch&lt;/h3&gt;
&lt;p&gt;Now that everything is mounted, you can install Arch on your new system with&lt;/p&gt;
&lt;pre&gt;
pacstrap /mnt base
&lt;/pre&gt;
&lt;p&gt;This will install only the base system on &lt;code&gt;/mnt&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;Configuration&lt;/h2&gt;
&lt;h3&gt;Generating &lt;em&gt;fstab&lt;/em&gt; file&lt;/h3&gt;
&lt;p&gt;As you already saw, for you to access a drive or a partition on a drive, you first need to mount it. But, what mounts the system partitions, they need to be mounted automatically during boot to make your computer usable?&lt;/p&gt;
&lt;p&gt;That&#39;s what the &lt;em&gt;fstab&lt;/em&gt; file is for. It just a list of partitions that you want mounted automatically during startup.&lt;/p&gt;
&lt;p&gt;For this, we&#39;re going to use &lt;code&gt;genfstab&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;If you run&lt;/p&gt;
&lt;pre&gt;
genfstab /mnt
&lt;/pre&gt;
&lt;p&gt;it&#39;ll output all the the mounted partitions and their information.&lt;/p&gt;
&lt;p&gt;This is just a preview. To output this to a file run&lt;/p&gt;
&lt;pre&gt;
genfstab -U /mnt &gt;&gt; /mnt/etc/fstab
&lt;/pre&gt;
&lt;small&gt;
The &lt;code&gt;-U&lt;/code&gt; part is to make sure it uses UUIDs instead of drive locations as identifiers, which is a way better system.
&lt;/small&gt;
&lt;p&gt;Output the &lt;code&gt;fstab&lt;/code&gt; file to make sure it worked with &lt;/p&gt;
&lt;pre&gt;
cat /mnt/etc/fstab
&lt;/pre&gt;
&lt;h3&gt;Chroot into the new system&lt;/h3&gt;
&lt;p&gt;Now it&#39;s time to chroot (change root) into the new Arch system.&lt;/p&gt;
&lt;pre&gt;
arch-chroot /mnt
&lt;/pre&gt;

&lt;h3&gt;Installing the boot loader (GRUB)&lt;/h3&gt;
&lt;p&gt;GRUB is the thing that loads the OS and all its components when you turn on your computer.&lt;/p&gt;
&lt;p&gt;To install it, we&#39;re going to use &lt;code&gt;pacman&lt;/code&gt;, Arch&#39;s package manager.&lt;/p&gt;
&lt;pre&gt;
pacman -S grub
&lt;/pre&gt;
&lt;small&gt;
Enter &#39;Y&#39; when it propts you to.
&lt;/small&gt;
&lt;p&gt;When it finishes installing the package, you now need to actually install the GRUB boot loader onto your drive.&lt;/p&gt;
&lt;pre&gt;
grub-install --target=i386-pc /dev/sdX
&lt;/pre&gt;
&lt;small&gt;
Replace X with your drive letter, not to the boot partition, the whole drive.
&lt;/small&gt;
&lt;p&gt;When that&#39;s done, all that&#39;s left is to make the default config file for GRUB.&lt;/p&gt;
&lt;pre&gt;
grub-mkconfig -o /boot/grub/grub.cfg
&lt;/pre&gt;

&lt;h3&gt;Setting the locale&lt;/h3&gt;
&lt;p&gt;You need to set the &lt;a target=&#34;_blank&#34; href=&#34;https://wiki.archlinux.org/index.php/Locale&#34;&gt;locale&lt;/a&gt;. In this example in going to use the US English locale.&lt;/p&gt;
&lt;p&gt;Go to &lt;code&gt;/etc/locale.gen&lt;/code&gt; and remove &#34;#&#34; from the locales you want to enable.&lt;/p&gt;
&lt;p&gt;Then go to &lt;code&gt;/etc/locale.conf&lt;/code&gt; and add the line&lt;/p&gt;
&lt;pre&gt;
LANG=en_US.UTF-8
&lt;/pre&gt;
&lt;p&gt;or whatever your language is and run&lt;/p&gt;
&lt;pre&gt;
locale-gen
&lt;/pre&gt;

&lt;h3&gt;Configuring Network Manager and finishing up&lt;/h3&gt;
&lt;p&gt;Network Manager is there to configure and make connections, but also connect to the Internet on startup.&lt;/p&gt;
&lt;pre&gt;
pacman -S networkmanager
systemctl enable NetworkManager #enables it to run on startup
&lt;/pre&gt;
&lt;p&gt;Set the hostname with&lt;/p&gt;
&lt;pre&gt;
echo hostname &gt; /etc/hostname
&lt;/pre&gt;
&lt;p&gt;And set the root password with&lt;/p&gt;
&lt;pre&gt;
passwd
&lt;/pre&gt;

&lt;p&gt;And you&#39;re done! All that&#39;s left to do is &lt;code&gt;exit&lt;/code&gt; the Arch environment and unmount all the &lt;code&gt;/mnt&lt;/code&gt; partitions with&lt;/p&gt;
&lt;pre&gt;
umount -R /mnt
&lt;/pre&gt;
&lt;p&gt;Now just &lt;code&gt;reboot&lt;/code&gt; and unplug your flash drive.&lt;/p&gt;
&lt;p&gt;If all went well, you should boot into your fresh Arch install.&lt;/p&gt;
&lt;small&gt;original upload date: Wed, 02 Jan 2019 23:09&lt;/small&gt;&lt;br&gt;
&lt;small id=&#39;date-2&#39;&gt;[last edited: Wed, 02 Jan 2019 23:09]&lt;/small&gt;
&lt;/article&gt;
</description>
	</item>
	
	</channel>
</rss>
