<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: anubhav_sharma</title>
    <description>The latest articles on DEV Community by anubhav_sharma (@maanuanubhav999).</description>
    <link>https://dev.to/maanuanubhav999</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F417631%2Fb05be580-bb1f-4205-9cc8-1ec0cb3cca07.jpeg</url>
      <title>DEV Community: anubhav_sharma</title>
      <link>https://dev.to/maanuanubhav999</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/maanuanubhav999"/>
    <language>en</language>
    <item>
      <title>Make your Android app releases airtight with Espresso for regression testing</title>
      <dc:creator>anubhav_sharma</dc:creator>
      <pubDate>Fri, 11 Feb 2022 18:59:57 +0000</pubDate>
      <link>https://dev.to/maanuanubhav999/writing-espresso-tests-15p</link>
      <guid>https://dev.to/maanuanubhav999/writing-espresso-tests-15p</guid>
      <description>&lt;p&gt;Often while working as a Developer we are struck with problems that need more than usual attention.&lt;br&gt;
During such situations, my seniors would help me, but we were using espresso for the first time and so I had to help myself.&lt;br&gt;
By the way, Anubhav here, with a little guide to make you sail the journey easily.&lt;/p&gt;
&lt;h2&gt;
  
  
  Goal.
&lt;/h2&gt;

&lt;p&gt;Setting shared preference before starting the activity during Espresso Testing.&lt;/p&gt;
&lt;h2&gt;
  
  
  Why?
&lt;/h2&gt;

&lt;p&gt;In our android application, during onboarding the users save a few selected items, and based on them we fetch the contents for them.&lt;/p&gt;

&lt;p&gt;While performing instrumentation test( just fancy name for saying UI tests) in android we need to set the preferences otherwise we would be shown a Dialog box saying no item selected and the test would fail.&lt;/p&gt;
&lt;h2&gt;
  
  
  Solution
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--XVEuWF65--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x5ivuwaa94reirhymys9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--XVEuWF65--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x5ivuwaa94reirhymys9.png" alt="solution in Image form" width="880" height="350"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  1. Using Activity Test Rule
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;Rules are used to add additional functionality which applies to all tests within a test class, but more generically.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;if we are using the Activity test rule we can very easily support setting shared preference.&lt;/p&gt;

&lt;p&gt;As we can initialize the activity but not start it. This is very &lt;b&gt; important &lt;/b&gt; for us as we want to set the shared preferences before the activity could start.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@Rule
public ActivityTestRule&amp;lt;MainActivity&amp;gt; mActivityRule = new ActivityTestRule&amp;lt;&amp;gt;(
            MainActivity.class,
            true,
            false); 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here the three parameter's passed to the function are &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Activity test class&lt;/li&gt;
&lt;li&gt;Initial touch mode&lt;/li&gt;
&lt;li&gt;Launch Activity&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Since we have set the &lt;b&gt;Launch Activity&lt;/b&gt; to false, the activity would be initialized but not launched and in the meantime, we could set up our shared preferences.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@Before
fun setUp(){
val prefs: SharedPreferences = PreferenceManager.getDefaultSharedPreferences(
          getInstrumentation().targetContext
        )
      val editor = prefs.edit()
      editor.clear().apply()
 }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And then we can start the activity at our will.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    @Test
    fun populateUsernameFromSharedPrefsTest() {

        // Launch activity
        mActivityRule.launchActivity(new Intent())

        onView(withId(R.id.textview_account_username))
                .check(matches(isDisplayed()))
                .check(matches(withText(testUsername)))
    }

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But this function is Deprecated and hence I was looking for better options.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Using Activity Scenario Rule
&lt;/h3&gt;

&lt;p&gt;Basic stuff: Activity Scenario unifies managing lifecycle in &lt;u&gt; Android Test support library&lt;/u&gt; and &lt;u&gt; Robolelectric &lt;/u&gt; and is a Part of Android X Test Library.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Use LazyActivityScenarioRule&lt;/li&gt;
&lt;li&gt;Use Chaining Rules&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Lazy Activity Scenario Rule
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://medium.com/stepstone-tech/better-tests-with-androidxs-activityscenario-in-kotlin-part-1-6a6376b713ea"&gt;Medium Article for reference&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I did not got chance to test this out but it looks quite promising to me. do checkout the blog.&lt;/p&gt;

&lt;h3&gt;
  
  
  Chaining Rules
&lt;/h3&gt;

&lt;p&gt;Using chaining rules is as simple as&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@Rule
fun chain(): TestRule = RuleChain.outerRule(EspressoSharedPreferenceSetupRule()).around(ActivityScenarioRule(MainActivity::class.java))  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here &lt;b&gt; EspressoSharedPreferenceSetupRule &lt;/b&gt; is a simple test Rule class.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class EspressoSharedPreferenceSetupRule : TestRule {
  override fun apply(base: Statement?, description: Description?): Statement? {
    val prefs: SharedPreferences = PreferenceManager.getDefaultSharedPreferences(
        InstrumentationRegistry.getInstrumentation().targetContext
      )
    val editor = prefs.edit()
    editor.clear().apply()

    // do something here

    )
    editor.apply()
    return base
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  What is happening here. (Magic)
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--HvGm95AH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zqjjewp5e6nv2oxqpnyn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--HvGm95AH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zqjjewp5e6nv2oxqpnyn.png" alt="Chaining" width="880" height="139"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There are two rules defined.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;b&gt; Activity Scenario Rule&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt; Espresso Shared Preference Rule &lt;/b&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The &lt;b&gt; outer rules &lt;/b&gt; are configured to be run first and then the &lt;b&gt; inside one &lt;/b&gt; works and this is how we have chained them. &lt;/p&gt;

&lt;p&gt;Hence it guarantees that our Espresso Shared Preference is run first and then our activity is launched.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Feel Free to connect with me or comment down below If you found this interesting.&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>android</category>
      <category>beginners</category>
      <category>tutorial</category>
      <category>espresso</category>
    </item>
    <item>
      <title>Write your first Cron Job with me.</title>
      <dc:creator>anubhav_sharma</dc:creator>
      <pubDate>Fri, 06 Aug 2021 13:28:04 +0000</pubDate>
      <link>https://dev.to/maanuanubhav999/write-your-first-cron-job-with-me-3fd7</link>
      <guid>https://dev.to/maanuanubhav999/write-your-first-cron-job-with-me-3fd7</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--k4So8bLN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://snipcademy.com/img/articles/linux-command-line-cron-jobs/cron-main.svg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--k4So8bLN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://snipcademy.com/img/articles/linux-command-line-cron-jobs/cron-main.svg" alt="Cron Image"&gt;&lt;/a&gt;&lt;br&gt;
For a long time, I was having an urge to write a cron job to automate some tasks. Here is a summary so you can do it too.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Little Background &lt;/li&gt;
&lt;li&gt;Setup&lt;/li&gt;
&lt;li&gt;Write your cron job &lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  1. Little Background
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. What is Cron?
&lt;/h3&gt;

&lt;p&gt;In simple words, it is a scheduler &lt;/p&gt;

&lt;h3&gt;
  
  
  2. What does a scheduler do?
&lt;/h3&gt;

&lt;p&gt;runs a specified task at a specified time&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Where can you use it?
&lt;/h3&gt;

&lt;p&gt;to automate any repeated task like syncing data or taking backups etc.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. How to write Syntax for cron.
&lt;/h3&gt;

&lt;p&gt;for writing a cron file you just need &lt;br&gt;
(&lt;strong&gt;specify the time&lt;/strong&gt;)+ (&lt;strong&gt;specify the task&lt;/strong&gt;)&lt;/p&gt;

&lt;h4&gt;
  
  
  Cron syntax sample
&lt;/h4&gt;

&lt;p&gt;In General to specify the time we have 5 parameters (* * * * *)&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;minute&lt;/li&gt;
&lt;li&gt;hour&lt;/li&gt;
&lt;li&gt;day (month)&lt;/li&gt;
&lt;li&gt;month&lt;/li&gt;
&lt;li&gt;day (Week)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Example&lt;br&gt;
&lt;code&gt;45 23 * * 6 /home/oracle/scripts/export_dump.sh&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;In addition to this we could use some arbitrary scheduler expression such as&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;@yearly&lt;/li&gt;
&lt;li&gt;@monthly&lt;/li&gt;
&lt;li&gt;@weekly&lt;/li&gt;
&lt;li&gt;@daily&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Example &lt;br&gt;
&lt;code&gt;@weekly /bin/script.sh&lt;/code&gt; &lt;br&gt;
This will run the script once in a week.&lt;/p&gt;

&lt;p&gt;Cron expression syntax is very important for it to work use websites like &lt;a href="https://crontab.guru/"&gt;https://crontab.guru/&lt;/a&gt; and ensure that it works properly.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--h_1trIX1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0cfg1t0uqjywuoj47nvp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--h_1trIX1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0cfg1t0uqjywuoj47nvp.png" alt="Explanation for cron expression syntax"&gt;&lt;/a&gt;  &lt;/p&gt;




&lt;h2&gt;
  
  
  2. Setup
&lt;/h2&gt;

&lt;p&gt;Although cron is installed in most Linux distributions you can check if it is present or not.&lt;br&gt;
Just Type &lt;code&gt;crontab&lt;/code&gt; and check.&lt;/p&gt;




&lt;h2&gt;
  
  
  3. Write your cron Job
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. To see if any cron job already exists
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;crontab -l&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Let's write a new cron job
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;crontab -e&lt;/code&gt; &lt;br&gt;
and since cron uses vi by default you may use the below command to edit it using your favorite editor&lt;br&gt;
 &lt;code&gt;EDITOR=/usr/bin/vim crontab -e&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Running a sample cron job
&lt;/h3&gt;

&lt;p&gt;Open up your crontab and write&lt;br&gt;
&lt;code&gt;0 0 * * * date &amp;gt;&amp;gt; /tmp/cron_output&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This will run every day at 00:00 in 24-hour format or 12:00 am in 12-hour format and will output the current date to /tmp/cron_output.&lt;/p&gt;




&lt;h2&gt;
  
  
  Tips
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Tests your cron job before deploying. &lt;/li&gt;
&lt;li&gt;Remember that &lt;strong&gt;cron jobs&lt;/strong&gt; run on a separate thread(daemon thread) and sometimes may have different behavior than intended.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Stay tuned for more. &lt;br&gt;
&lt;strong&gt;&lt;em&gt;Next coming up&lt;/em&gt;&lt;/strong&gt;: Sending Automated WhatsApp message using cron&lt;/p&gt;

</description>
      <category>linux</category>
    </item>
    <item>
      <title>DIY Home Media Server </title>
      <dc:creator>anubhav_sharma</dc:creator>
      <pubDate>Sun, 04 Jul 2021 14:09:54 +0000</pubDate>
      <link>https://dev.to/maanuanubhav999/diy-home-media-server-jdp</link>
      <guid>https://dev.to/maanuanubhav999/diy-home-media-server-jdp</guid>
      <description>&lt;h1&gt;
  
  
  Create a simple home server
&lt;/h1&gt;

&lt;p&gt;Sometimes there is no Internet connection in my area and since there is not much you could do at that time, I love to watch a movie and listen to my all times favorite music. &lt;/p&gt;

&lt;p&gt;All the code is mentioned using &lt;code&gt;$ ......&lt;/code&gt; and you can run it in terminal&lt;/p&gt;

&lt;h1&gt;
  
  
  Equipment
&lt;/h1&gt;

&lt;ol&gt;
&lt;li&gt;Raspberry Pi&lt;/li&gt;
&lt;li&gt;USB hard drive&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Hardware configuration
&lt;/h2&gt;

&lt;p&gt;If you have a new raspberry pi you may wish to Download and install OS in it.&lt;a href="https://www.raspberrypi.org/software/" rel="noopener noreferrer"&gt;Download OS from the official link&lt;/a&gt;&lt;br&gt;
To install just flash the OS to a memory card and attach it to raspberry pi.&lt;/p&gt;

&lt;h3&gt;
  
  
  Make a network connection
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;wifi&lt;/li&gt;
&lt;li&gt;ethernet&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Here you may want to have a fixed Local Network IP since this is what you will connect to for ssh and Plex server&lt;/p&gt;

&lt;h3&gt;
  
  
  Updating and Upgrading
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;$ sudo apt update &amp;amp;&amp;amp; sudo apt upgrade&lt;/code&gt; &lt;/p&gt;

&lt;h3&gt;
  
  
  Optional
&lt;/h3&gt;

&lt;p&gt;If you intent to use GUI in raspberry pi you can skip this step. &lt;br&gt;
As we are using it as a server we can use remote access tool&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Install an open-ssh server.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;To startup CLI as system Boots up.&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;$ sudo raspi-config&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Boot option &lt;/li&gt;
&lt;li&gt;Desktop / CLI &lt;/li&gt;
&lt;li&gt;choose Console&lt;/li&gt;
&lt;li&gt;&lt;code&gt;$ sudo reboot&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Connecting Hdd as Raspberry pi boots up
&lt;/h2&gt;

&lt;h5&gt;
  
  
  You may need to pump up your USB port output for hdd to work.
&lt;/h5&gt;

&lt;ol&gt;
&lt;li&gt;&lt;code&gt;sudo nano /boot/config.txt&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&amp;gt; set max_usb_current=1&lt;/li&gt;
&lt;/ol&gt;

&lt;h5&gt;
  
  
  Make a permanent location where HDD will Connect.
&lt;/h5&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;$ mkdir /media/hd&lt;/code&gt;
(if using NTFS drive install ntfs-3g)&lt;/li&gt;
&lt;/ul&gt;

&lt;h5&gt;
  
  
  To mount, we will need UUID
&lt;/h5&gt;

&lt;p&gt;Here we will use uuid or partuuid and mention it in /etc/fstab, and when raspberry pi will boot it will auto-mount it to our desired location.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;$ sudo blkid&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;get the UUID of your device &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;finally, add the device in the /etc/fstab&lt;br&gt;
--&amp;gt; make sure you have a backup in case you mess-up or something went wrong.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;$ sudo nano /etc/fstab&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;attach your device using UUID or partuuid &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;sample file&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;PARTUUID=06568f1  /media/hd/ auto nofail,uid=1000,git=1000,umask=000 0 0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Plex Installation and configuration.
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Download plex directly from &lt;a href="https://www.plex.tv/media-server-downloads/" rel="noopener noreferrer"&gt;Website&lt;/a&gt; &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You will download a .deb file &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To excute it &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt; &lt;code&gt;$sudo dpkg -i ./plexserver....deb&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;&lt;p&gt;When installation is completed you may wish to reboot.&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;Now open a browser and head over to IP/web/index.html of your raspberry pi (in my case IP is 192.168.1.100)&lt;br&gt;&lt;br&gt;
--&amp;gt; 192.168.1.100:32400/web/index.html&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;You will need to log in to plex to continue.&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;Adding library &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdpf3ialoj8qx6vfiznpl.png" alt="Alt Text"&gt;&lt;/li&gt;
&lt;li&gt;select the media type&lt;/li&gt;
&lt;li&gt;select the folder&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvzqseswdlus0vku2x5gx.png" alt="Add folder"&gt;
&lt;/li&gt;
&lt;li&gt;When you are done it will sync the resources and you are good to go.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;




&lt;h1&gt;
  
  
  Important
&lt;/h1&gt;

&lt;p&gt;since like me you may want to watch content from Plex even when there is no internet connection &lt;/p&gt;

&lt;h3&gt;
  
  
  This should be done before you encounter "No Internet"
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;settings &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftxyry84h91dxwgs4smto.png" alt="Alt Text"&gt; &lt;/li&gt;
&lt;li&gt;Server &lt;/li&gt;
&lt;li&gt;Network &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fldvxh4f9yw164i1qnf74.png" alt="Alt Text"&gt;
&lt;/li&gt;
&lt;li&gt;enable local network discovery&lt;/li&gt;
&lt;li&gt;Click on Advance Settings&lt;/li&gt;
&lt;li&gt;list of IP addresses and Networks allowed without Auth. 
You can add specific IP's or you may go with something like '192.168.0.0/24'&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Well,for syncing I am currently using tools like &lt;code&gt;rsync&lt;/code&gt;. Have better options comment down.&lt;/p&gt;




&lt;h2&gt;
  
  
  Reference
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://medium.com/@ptofanelli/raspberry-pi-creating-a-home-media-server-767e169a6cb3" rel="noopener noreferrer"&gt;pi create home server&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://pimylifeup.com/raspberry-pi-plex-server" rel="noopener noreferrer"&gt;Raspberry pi plex server&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://linuxize.com/post/how-to-install-plex-media-server-on-raspberry-pi" rel="noopener noreferrer"&gt;Installing a Plex&lt;/a&gt;&lt;/p&gt;

</description>
      <category>diy</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Beginner's guide to Linux</title>
      <dc:creator>anubhav_sharma</dc:creator>
      <pubDate>Thu, 20 May 2021 21:49:08 +0000</pubDate>
      <link>https://dev.to/maanuanubhav999/beginner-s-guide-to-linux-5eeo</link>
      <guid>https://dev.to/maanuanubhav999/beginner-s-guide-to-linux-5eeo</guid>
      <description>&lt;p&gt;Once upon a time I installed Ubuntu, and here is a summary of how it progressed. Here I am trying to write in laymen's terms, and suggestions are welcomed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why did I install it?&lt;/strong&gt;&lt;br&gt;
My computer at the time was low on ram, and quite slow so as a workaround, I decide to install Linux.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Which Linux to install as a beginner.&lt;/strong&gt;&lt;br&gt;
There are many easy to install and use, I found Ubuntu a good one.&lt;/p&gt;

&lt;p&gt;Also GUI of Ubuntu is same as Windows with some difference like you won't find Microsoft office here, instead Libre office, for music you can use Vlc,and for Web browsing Firefox.&lt;/p&gt;

&lt;p&gt;There are all alternative tools available for all sorts of work.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is ubuntu.&lt;/strong&gt;&lt;br&gt;
Leaving behind the technicals terms, It is just an operating system like windows but it is Open Sourced.&lt;br&gt;
Go to &lt;a href="https://ubuntu.com/download/desktop" rel="noopener noreferrer"&gt;https://ubuntu.com/download/desktop&lt;/a&gt; for more information.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzfy9bjfjrr8bjp8lh6dd.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzfy9bjfjrr8bjp8lh6dd.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How to Try ubuntu&lt;/strong&gt;&lt;br&gt;
Create a bootable device. How?&lt;br&gt;
Go to &lt;a href="https://rufus.ie" rel="noopener noreferrer"&gt;https://rufus.ie&lt;/a&gt;(Rufus link) and download the software.&lt;/p&gt;

&lt;p&gt;Proper Installation is not mentioned here you can look for it on youtube or blogs.&lt;/p&gt;

&lt;p&gt;Since you wish to use ubuntu, you may want to learn more than a normal user would.&lt;/p&gt;
&lt;h3&gt;
  
  
  1. Terminal
&lt;/h3&gt;

&lt;p&gt;This is the place where all the magic happens.&lt;br&gt;
To access the terminal you can press &lt;code&gt;ctrl+atl+t&lt;/code&gt; or press windows button and search terminal&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5nru7agurj6ze2nu7ssx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5nru7agurj6ze2nu7ssx.png" alt="Terminal Image"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  2. Updating and Upgrading through terminal
&lt;/h3&gt;



&lt;p&gt;&lt;code&gt;sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;little background:&lt;/p&gt;

&lt;p&gt;sudo: gives Root privileges &lt;br&gt;
apt-get: is a package manager. you can find the software you need here.&lt;br&gt;
update: gets an updated list from the repository&lt;br&gt;
upgrade: install the updated list to your computer&lt;/p&gt;
&lt;h3&gt;
  
  
  3. Installing software.
&lt;/h3&gt;



&lt;p&gt;&lt;code&gt;sudo apt-get install software_name_here&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;example: sudo apt-get install firefox&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Basic commands to use in terminal
&lt;/h3&gt;

&lt;p&gt;Start a Program from terminal&lt;br&gt;
Open terminal and &lt;code&gt;vlc&lt;/code&gt; and &lt;strong&gt;enter&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;cd&lt;/strong&gt;: change directory eg. &lt;code&gt;cd ~/Downloads&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;mkdir&lt;/strong&gt;: make a new directory  eg. &lt;code&gt;mkdir dev&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;cp&lt;/strong&gt;: copy command eg. &lt;code&gt;cp fileNameYouWishtoCopy DestinationWheretoCopy&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;rm&lt;/strong&gt;: remove a file eg. &lt;code&gt;rm fileToRemove&lt;/code&gt; &lt;/p&gt;

&lt;h2&gt;
  
  
  Pro tip
&lt;/h2&gt;

&lt;p&gt;when writing command try to use &lt;code&gt;Tab&lt;/code&gt; and most time it will autocomplete commands.&lt;br&gt;
Most commands are written in smallcase.&lt;br&gt;
eg. &lt;code&gt;cd&lt;/code&gt; and &lt;code&gt;CD&lt;/code&gt; are different things.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjmyh7f5h5tsconaq3tl5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjmyh7f5h5tsconaq3tl5.png" alt="smallcase cd vs capital case"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  A general tip:
&lt;/h2&gt;

&lt;p&gt;Even after experiencing it for years I still face issues, don't worry just search them online, In most of the case, there will be people similar to you, who already had that issue and got it resolved.&lt;/p&gt;

&lt;p&gt;If this is not the case then no need to fear.&lt;br&gt;
Your all-new best friend Stack Overflow is here. Just log in and put up your question there. ( Remember, always check if any similar question already exits or not)&lt;/p&gt;

&lt;p&gt;or sometimes help from a friend is also useful.&lt;/p&gt;

&lt;p&gt;Thanks to &lt;a class="mentioned-user" href="https://dev.to/chrisachard"&gt;@chrisachard&lt;/a&gt; for inspiring me to write my first blog.&lt;/p&gt;

</description>
      <category>linux</category>
      <category>beginners</category>
      <category>ubuntu</category>
    </item>
  </channel>
</rss>
