<?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 mohamed aiman on Medium]]></title>
        <description><![CDATA[Stories by mohamed aiman on Medium]]></description>
        <link>https://medium.com/@aimme?source=rss-2a6b79c77953------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*U8XiY8JQSBEEnytGlTl3_w.jpeg</url>
            <title>Stories by mohamed aiman on Medium</title>
            <link>https://medium.com/@aimme?source=rss-2a6b79c77953------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 00:12:15 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@aimme/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[Very Simple way to manage permissions on Vue.js]]></title>
            <link>https://medium.com/@aimme/very-simple-way-to-manage-permissions-on-vue-js-6ecbf930c0aa?source=rss-2a6b79c77953------2</link>
            <guid isPermaLink="false">https://medium.com/p/6ecbf930c0aa</guid>
            <category><![CDATA[custom-directive]]></category>
            <category><![CDATA[vue]]></category>
            <category><![CDATA[permission]]></category>
            <category><![CDATA[management]]></category>
            <category><![CDATA[acl]]></category>
            <dc:creator><![CDATA[mohamed aiman]]></dc:creator>
            <pubDate>Fri, 01 Mar 2019 19:50:22 GMT</pubDate>
            <atom:updated>2019-03-03T07:25:05.436Z</atom:updated>
            <content:encoded><![CDATA[<p>In this article I am going to present an easy way to manage permissions on Vue js. This is when you want to show or hide components of the page according to the user permissions provided from the API. Performance is something we need to keep in mind, as this might be used on lot of components.</p><p><strong>Here are the steps:</strong></p><ul><li>make a vue directive (v-can) to show or hide component based on current user permission</li><li>call api get current user permissions</li><li>store it on local storage</li><li>when v-can directive is bound to component check whether user has the provided permission and show or hide it</li></ul><p><strong><em>Disclaimer: This code snippets are for demonstration purpose only. Front-end permission is only used to show or hide components and that it’s not enough to keep the application secure. Remember to keep your API endpoints secure with proper permissions enabled.</em></strong></p><p>1 —Sample Html content</p><p>add v-clock to keep elements hidden till it’s being loaded.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/378f7bf2d93196a50a17d9325e657f48/href">https://medium.com/media/378f7bf2d93196a50a17d9325e657f48/href</a></iframe><p>2 — Sample Backend (API) routes and it’s response</p><p>lets say you have a route that can be used to fetch currently logged in users something like</p><pre>[POST]/users/permissions</pre><p>or</p><pre>[GET]/users/permissions</pre><p>that returns current user permissions like this.</p><p>Sample response:</p><pre>[<br> “articles.show”,<br> “articles.update”<br>]</pre><p>3 — JS http request, store permissions and make a v-can Vue Directive.</p><ul><li>should have <a href="https://github.com/axios/axios">axios</a> installed and used</li><li>learn more about<a href="https://vuejs.org/v2/guide/custom-directive.html"> custom directives</a></li></ul><p>create <strong>acl.js</strong> file</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/437d60ae8f8eab73e2d8bbeb15872fcf/href">https://medium.com/media/437d60ae8f8eab73e2d8bbeb15872fcf/href</a></iframe><p>4 — compile as usual</p><p>5 — use it</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/61fe377c108d32734f5a372b8ee34235/href">https://medium.com/media/61fe377c108d32734f5a372b8ee34235/href</a></iframe><p>use will be able to see content and update button but not the delete button.</p><p>Thank you for reading.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6ecbf930c0aa" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I changed a “running out of storage” problem to a “now I don’t have to worry” solution.]]></title>
            <link>https://medium.com/@aimme/how-i-changed-a-running-out-of-storage-problem-to-a-now-i-dont-have-to-worry-solution-45d6840c2ef0?source=rss-2a6b79c77953------2</link>
            <guid isPermaLink="false">https://medium.com/p/45d6840c2ef0</guid>
            <category><![CDATA[git]]></category>
            <category><![CDATA[cloud-storage]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[version-control]]></category>
            <dc:creator><![CDATA[mohamed aiman]]></dc:creator>
            <pubDate>Mon, 05 Jun 2017 17:59:29 GMT</pubDate>
            <atom:updated>2017-06-05T17:59:29.271Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Summary</strong></h3><p>This article is about how some of the tactics and technologies helped me get out of multiple difficulties, that same difficulties that might be faced by many other people.</p><p>Starting from how my system ran out of storage and a broad overview of what I used to make my system to be able to setup from zero in no time and how I used cloud storage as a solution to overcome most of these problems. And also how symbolic links are helpful.</p><h3><strong>Story</strong></h3><p>I was building an android application for my Mobile Application Development module on my final semester of the bachelors degree program. I was using Android Developer studio on my Ubuntu system. So I thought of downloading emulator images to test whether my new recipe app works on as many devices. So I opened SDK manager and selected multiple images and started downloading. While downloading those large images, for few minutes everything was fine until an alert box popped informing that the system(OS) partition was running out of space and whether you want to open the disk usage analyzer.</p><p>I have one partition for system(OS) and one for media, etc storage. Before clicking to open disk usage analyzer I checked the SDK path and found that it’s already on media partition. So I didn’t have any option other than checking what that it is eating up my storage space. So I opened the disk usage analyzer and started expending the partition’s folder structure tree and the size of each folder.</p><p>One thing that i noticed was desktop directory holding lot of my family and personal photos, which probably I should have managed by moving to media partition. Next thing that came up to my mind was “If my SDK path is in media partition why would it have to complain about system partition getting full?”. Then I quickly checked the system partition to see that very small free space is left, which concludes that the partition was almost full even before I started the updating.</p><p>So if I were to continue the updating process i would have to free up my system partition by deleting or moving out some files, or else, I should increase the size of my system partition. To get some free space i removed some movies, series and some files from downloads folder and emptied the trash, but it was not enough for what i actually started.</p><p>To shrink and increase the size of the partition by editing the partition using something like disk part does sound risky, at least for that time. Me, my system and the data in it were not in a position to take such a risk. As I mentioned earlier, as it was latest days of the semester and i was preparing for exams, making the mobile app for college and doing multiple assignments at the same time. All those files are on that system.</p><p>Anyways, thanks to following</p><h3>Solutions - What is important</h3><p><strong>Git and version controlling</strong></p><p>I have all my private projects, including Recipe application and API on my Bitbucket, so that I don’t have to worry about backing up the web applications, mobile applications and my standalone applications.</p><p><strong>Google Apps and Cloud Computing</strong></p><p>My ongoing assignment documents were kept as Google Docs and Lecture shared notes, slides etc are on Google Drive.</p><p><strong>Docker and Containerization</strong></p><p>Even after all of this assurances, one thing was holding me back from playing with system partition is the development setups.</p><p>I am also into Laravel API development and most commonly use Apache, Php and MySQL for that purpose. As I already use Docker at office in development, I thought to resume the work of containerization at home too that i already have started some time ago. And that way it would be better if i use docker at home too. It was a great idea after all.</p><p>Started composing the docker files for projects and when that was finished, used Docker Composer to turn on the container. Docker container was pulling the images until again the system alerted that system(OS) partition was running out of space. So I checked where Docker was putting the downloaded image files and found that it was on system partition (<em>/var/lib/docker</em>) and i would have to figure out away to change the base directory of docker to my media partition(<em>/mnt/examplemediadrive</em>) - which was set to automatically mount on computer start.</p><p>There are two ways to change the base directory of docker. One way is by changing the start up options of docker by modifying configurations and another way is by creating a symbolic link.</p><p><strong>Symbolic(sym) Links and Configurations</strong></p><p>Created a symlink as <em>/mnt/examplemediadrive/docker</em> pointed by <em>/var/lib/docker</em></p><p>So now that system partition will just hold the link that is pointed to the media partition’s docker folder, and all images downloaded by docker will be on my media partition sparing all those spaces that would have been taken from system partition.</p><p>And then I had observed a way to move large directories in system partition to my media partition. From now I didn’t have to worry about shrinking the partition.</p><p>Next, decided to cleanup the desktop.</p><p><strong>Flickr and Cloud storage</strong></p><p>To clean the desktop and to keep the photos safe and secure I decided to move it to cloud. So I estimated that too.</p><p>For 100 years * 365 days a year * 10 photos a day * 10 megabytes for each photo is 3.65 Terabytes.</p><p>I just need not more than 3.65 Terabytes and remembered one of my boss said to me that my there is a free plan of 1 terabyte on Flikr and for now I just need less than a terabyte. So lets say I moved all my images to Flickr.</p><h3><strong>Conclusion</strong></h3><p>The point is that with the help of these solutions now I am able to setup a new system in no time starting from zero and also don’t have to worry about losing important data, cos there is backup of everything on cloud.</p><p><em>Containerization help me to setup my environments in no time. Version controlling technologies help me to keep my projects and repositories. Cloud Storage options keep my files.</em></p><p><strong>Thank You for reading, feel free to leave a feedback.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=45d6840c2ef0" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>