<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Sereya on Medium]]></title>
        <description><![CDATA[Stories by Sereya on Medium]]></description>
        <link>https://medium.com/@sereya?source=rss-5fe8aa62f009------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*FSFQ5u-G1IV9B9Gz8K57yQ.jpeg</url>
            <title>Stories by Sereya on Medium</title>
            <link>https://medium.com/@sereya?source=rss-5fe8aa62f009------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 07:28:34 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sereya/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Understand Sessions in Sinatra]]></title>
            <link>https://sereya.medium.com/understand-sessions-in-sinatra-65bff2037867?source=rss-5fe8aa62f009------2</link>
            <guid isPermaLink="false">https://medium.com/p/65bff2037867</guid>
            <category><![CDATA[ruby]]></category>
            <category><![CDATA[sessions]]></category>
            <category><![CDATA[authentication]]></category>
            <category><![CDATA[sinatra]]></category>
            <dc:creator><![CDATA[Sereya]]></dc:creator>
            <pubDate>Sun, 12 Mar 2023 06:46:56 GMT</pubDate>
            <atom:updated>2023-03-12T06:46:56.747Z</atom:updated>
            <content:encoded><![CDATA[<p>Here’s a step-by-step guide for implementing persisted login in your React and Sinatra web application:</p><ol><li>Store the user credentials securely: When a user logs in or registers, store their credentials securely in your database. You’ll want to store a hashed version of their password, not the password itself, to maintain security.</li><li>Set up a session: In Sinatra, you can use the session object to store information about a user&#39;s session. You can set this up by adding enable :sessions to your config.ru file or the application_controller.rb file by adding</li></ol><pre>configure do<br>      enable :sessions<br>    end</pre><p>3. Set a session variable when a user logs in: When a user logs in successfully, set a session variable to store their user ID or other relevant information. For example, you might do something like session[:user_id] = user.id.</p><p>Before we continue let’s make a request and return the session in JSON syntax</p><pre>class ApplicationController &lt; Sinatra::Base<br><br>    set default_content_type: &quot;application/json&quot;<br><br>    configure do<br>      enable :sessions<br>    end<br><br>    post &#39;/login&#39; do<br>      user = User.find_by_username(params[:user][:username])<br>      if user.password == params[:user][:password]<br>       session[:user_id] = user.id<br>       session.to_json<br>      else<br>        redirect &#39;/login&#39;<br>      end<br>    end<br>end<br></pre><pre>[<br>    [<br>        &quot;session_id&quot;,<br>        &quot;e5e624f810cfd10831ad55faae3392b96d947439c5a29d314f87f80ba77b7029&quot;<br>    ],<br>    [<br>        &quot;csrf&quot;,<br>        &quot;rY13K5QLr8MjXoD8L17HQvhe9FiR3ZU4BlEeVYa-OxQ=&quot;<br>    ],<br>    [<br>        &quot;tracking&quot;,<br>        {<br>            &quot;HTTP_USER_AGENT&quot;: &quot;postmanruntime/7.29.2&quot;<br>        }<br>    ],<br>    [<br>        &quot;user_id&quot;,<br>        2<br>    ]<br></pre><p>The JSON returned above is a result of a post request I made to /login route with the following as the body:</p><pre>{<br>    &quot;email&quot;:&quot;adminuser@gmail.com&quot;,<br>    &quot;password&quot;: &quot;123&quot;<br>}</pre><p>I should also note I have a user in users table with the same details. Hence the reason user_id is set to 2.</p><p>4. Check for a session variable on subsequent requests: On subsequent requests to your application, check for the presence of the session variable you set in step 3. If it’s present, you know the user is logged in and can use their user ID or other stored information to personalize their experience.</p><p>5. Add a logout route: To allow users to log out of your application, add a logout route that clears their session variable. For example, you might do something like session[:user_id] = nil.</p><p>6. Add authentication to protected routes: If you have any routes that require authentication, you’ll want to check for the presence of the session variable before allowing access. If the user is not logged in, you can redirect them to the login page.</p><p>That’s it! With these steps, you should be able to implement persisted login in your React and Sinatra web application.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=65bff2037867" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Generate SSH key and link to your github profile.]]></title>
            <link>https://sereya.medium.com/generate-ssh-key-and-link-to-your-github-profile-49d59fd965a?source=rss-5fe8aa62f009------2</link>
            <guid isPermaLink="false">https://medium.com/p/49d59fd965a</guid>
            <category><![CDATA[github]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[ssh-keys]]></category>
            <category><![CDATA[ubuntu]]></category>
            <dc:creator><![CDATA[Sereya]]></dc:creator>
            <pubDate>Thu, 26 Jan 2023 20:07:16 GMT</pubDate>
            <atom:updated>2023-01-26T20:07:16.142Z</atom:updated>
            <content:encoded><![CDATA[<h4>Generating an SSH key pair</h4><p>You might already have an SSH key pair on your machine. You can check to see if one exists by moving to your .ssh directory and listing the contents.</p><pre>$ cd ~/.ssh<br>$ ls</pre><p>If you see id_rsa.pub, you already have a key pair and don&#39;t need to create a new one.</p><p>If you don’t see id_rsa.pub, use the following command to generate a new key pair. Make sure to replace your@email.com with your own email address.</p><pre>$ ssh-keygen -t rsa -C &quot;your@email.com&quot;</pre><p>When asked where to save the new key, hit enter to accept the default location and subsequent prompts.</p><p>When the key generation is complete, you should see The key&#39;s randomart image as confirmation.</p><p>We now need to copy the public key. To display the contents of your new public key file:</p><pre>$ cat ~/.ssh/id_rsa.pub</pre><p>The output should look something like this:</p><pre>ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA879BJGYlPTLIuc9/R ..........</pre><p>Copy the contents of the output and then <strong>Add SSH key to Github.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=49d59fd965a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Things To Help You Navigate Various Spheres Of Life.]]></title>
            <link>https://sereya.medium.com/things-to-help-you-navigate-various-spheres-of-life-2ed5db0519c9?source=rss-5fe8aa62f009------2</link>
            <guid isPermaLink="false">https://medium.com/p/2ed5db0519c9</guid>
            <category><![CDATA[passion]]></category>
            <category><![CDATA[inspiration]]></category>
            <category><![CDATA[life]]></category>
            <category><![CDATA[mindset]]></category>
            <category><![CDATA[growth]]></category>
            <dc:creator><![CDATA[Sereya]]></dc:creator>
            <pubDate>Sun, 06 Nov 2022 17:23:56 GMT</pubDate>
            <atom:updated>2022-11-06T17:23:56.559Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0SuQrkKT3Df69d-Z-ikoBg.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@goian?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Ian Schneider</a> on <a href="https://unsplash.com/s/photos/life?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p><strong>Intuition — </strong>Your gut is always right. Learn to heed the voice of your gut. It is God’s way of protecting you. When you listen to your gut, you will be fulfilled despite not having sufficient evidence to back the gut feeling.</p><p><strong>Love — </strong>I have come to learn fundamentally, Love is a decision, and learn to place the value of love based on actions and less on words. Value never begs, learn to have high self-respect that you are able to leave the table when the love in whichever context is not reciprocated or felt. In matters of relationships, aspire to have a very kind partner and one that has an established relationship with God. You’ll learn the importance of kindness when you commit an error or in your weakness. It will teach you a lot of the partner you have on board.</p><p><strong>Work — </strong>Be a firm believer in hard work. The spirit of excellence honors God. Learn to build the spirit of excellence in whichever task you undertake. Trust and credibility are what people per take when they look at your work.</p><p><strong>Faith — </strong>Ultimately, life will always boil down to your faith. Learn to spend time with God intentionally daily. He will only speak to you when you sit and listen.</p><p><strong>Friendships —</strong> I am a huge believer in genuineness and offer the best in friendship I have through giving. I am learning to offer what i wish to receive in friendships. If you want to have great friendships, learn to be a good friend. Lastly, friendships require intentionality in communication. This is the glue to lasting friendships.</p><p><strong>Money — </strong>Understand very early the Time-Value of money. Learn to develop the habit of reading books on money. A lot of our beliefs and behavior regarding money is socially cultured. Wealth creation is a mindset and so is abundance, when you grasp this you learn money is a tool and means to get you where you are going and it will never be the center of your control in life.</p><p><strong>Reading and Thinking — </strong>Spend and invest in books. Learn the secret to wisdom in the amount of time you sacrifice to read. Reading becomes fundamentally the foundation of your thinking. Your life revolves around your thoughline. Anytime I see a great man, I am inspired by the thoughts that informed their life.</p><p>Be inspired and fill your heart with gratitude.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2ed5db0519c9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[28 Life Rules From A 28-Year-Old]]></title>
            <link>https://sereya.medium.com/28-life-rules-from-a-28-year-old-2d6b770ea43b?source=rss-5fe8aa62f009------2</link>
            <guid isPermaLink="false">https://medium.com/p/2d6b770ea43b</guid>
            <category><![CDATA[adulthood]]></category>
            <category><![CDATA[life]]></category>
            <category><![CDATA[lessons-learned]]></category>
            <category><![CDATA[life-lessons]]></category>
            <category><![CDATA[adulting]]></category>
            <dc:creator><![CDATA[Sereya]]></dc:creator>
            <pubDate>Sun, 25 Sep 2022 00:10:26 GMT</pubDate>
            <atom:updated>2022-11-03T13:36:08.872Z</atom:updated>
            <content:encoded><![CDATA[<p><em>I may or may not have learned these the hard way…</em></p><p><strong>1. Relax your shoulders.</strong></p><p>2. Take up space. It only intimidates the insecure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bNgp7wV_UiTFP_9QtvGzOA.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@danielcgold?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Dan Gold</a> on <a href="https://unsplash.com/?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p><strong>3. Prioritize wellbeing. A nap will never disappoint you.</strong></p><p>4. Denial is the mother of fools. They meant what they said.</p><p><strong>5. Don’t forget to cover your own ass (everyone else is covering theirs).</strong></p><p>6. Consistency &gt;&gt;&gt; Intensity.</p><p><strong>7. No paragraph texts. Walking away cures deafness.</strong></p><p>8. A 70% beats a 0% any day.</p><p><strong>9. Have an independent identity. Don’t only be someone’s something.</strong></p><p>10. It’s not your job to make them comfortable. Let yourself exist.</p><p><strong>11. Don’t chase, repel. Authenticity is the real prize.</strong></p><p>12. Learn to reject a no. Always ask, “How do we get to yes?”</p><p><strong>13. Don’t “push through”; eliminate the resistance instead.</strong></p><p>14. If losing your job today would affect your lifestyle, you’re still broke.</p><p><strong>15. Reduce fiction. Never bet on potential.</strong></p><p>16. You are never lost. Everything is in perfect timing.</p><p><strong>17. Can’t decide? If it’s not a f**k yes, it’s a no.</strong></p><p>18. You can’t change people, but you don’t have to stick around either.</p><p><strong>19. Remember that money is neutral. Personal morality adds bias.</strong></p><p>20. Don’t complain, just make adjustments.</p><p><strong>21. Learn to observe, not absorb. People love to project.</strong></p><p>22. Gatekeep your next move. It relieves pressure and expectations.</p><p><strong>23. You don’t need to earn validity. You’re more than enough as is.</strong></p><p>24. There may never be a later. Do do it now!</p><p><strong>25. Don’t feel compelled to carry on with traditions that suffocate your existence.</strong></p><p>26. No one spends their days judging you or criticizing you but you.</p><p><strong>27. You will make mistakes and you will fail. That’s how you learn, it’s how you grow and become a better person of yourself. Take the bruised ego and hurt pride out of it and you will grow, you will flourish and be better than before. It’s not an easy lesson to learn but it will make all the difference.</strong></p><p>28. God is good. His plan is so much better than anything you have planned. It sounds so trite (<em>I know, I know!</em>) but it’s true. He takes our messes, rearranges them and makes something beautiful <strong><em>every</em>. <em>single</em>. <em>time</em>.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2d6b770ea43b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Start, you will never be prepared enough!]]></title>
            <link>https://sereya.medium.com/start-you-will-never-be-prepared-enough-fecc0da93615?source=rss-5fe8aa62f009------2</link>
            <guid isPermaLink="false">https://medium.com/p/fecc0da93615</guid>
            <category><![CDATA[courage]]></category>
            <category><![CDATA[motivation]]></category>
            <category><![CDATA[beginning]]></category>
            <category><![CDATA[beginner]]></category>
            <category><![CDATA[wellness]]></category>
            <dc:creator><![CDATA[Sereya]]></dc:creator>
            <pubDate>Sat, 10 Sep 2022 23:37:24 GMT</pubDate>
            <atom:updated>2022-11-06T17:27:25.939Z</atom:updated>
            <content:encoded><![CDATA[<p>We get caught up in our own trap of not kickstarting something we want to do because of self-doubt. Doubt manifests in many forms: excuses, imposter syndrome, procrastination, overthinking and fear.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*WZP82ohjEJjKTJjLMMw9iQ.jpeg" /><figcaption>Learn by doing.</figcaption></figure><p>What is the worst that can happen if you start now?</p><p>A lesson? Yes?</p><p>So here is to being intentional about growth because starting something is choosing growth.</p><p>Love and Light.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fecc0da93615" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>