<?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 Naveen on Medium]]></title>
        <description><![CDATA[Stories by Naveen on Medium]]></description>
        <link>https://medium.com/@naveen17797?source=rss-42754a5d4864------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*R7NnlazzSdmaem-clUA7lA.jpeg</url>
            <title>Stories by Naveen on Medium</title>
            <link>https://medium.com/@naveen17797?source=rss-42754a5d4864------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 05:10:35 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@naveen17797/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[1ClickWP — Open source solution to rapidly create new WP Sites]]></title>
            <link>https://medium.com/@naveen17797/1clickwp-open-source-solution-to-rapidly-create-new-wp-sites-38a4d769b641?source=rss-42754a5d4864------2</link>
            <guid isPermaLink="false">https://medium.com/p/38a4d769b641</guid>
            <dc:creator><![CDATA[Naveen]]></dc:creator>
            <pubDate>Thu, 26 Oct 2023 02:56:52 GMT</pubDate>
            <atom:updated>2023-10-26T05:17:23.695Z</atom:updated>
            <content:encoded><![CDATA[<h3>1ClickWP — Open source solution to rapidly create new WP Sites</h3><p>I didn’t even had this idea until I stumbled across this problem. As I was reporting WordPress security vulnerabilities to PatchStack, I had to rapidly create PoCs for each vulnerability. However, WP can be quite complex to set up, so I was relying on a 3rd-party WordPress sandbox solution. Although this 3rd-party solution is easy to configure, it has some constraints that prevented me from operating quickly.</p><p>So I started looking for an open-source solution that does the following:</p><ol><li>It should be able to create multiple wordpress site with less configuration.</li><li>It should also support multisites.</li><li>It should support a range of wordpress versions.</li></ol><p>I couldnt find one, So i started writing one on my own.</p><p>Introducing 1ClickWP</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*tGN-goV2WQa8oXdh.jpg" /></figure><p>That’s about it; all it needs is access to Docker in the local environment. With this, you can deploy multiple instances of WordPress with just one click. All it asks for is the WordPress version. Click on ‘create’, and boom, you have a WordPress site in three seconds.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*4k9QdjbHTU3BB-DO.png" /></figure><p><strong>Challenges faced</strong></p><p>I decided to use the official Docker image for WordPress. However, choosing it caused me a lot of issues for this use case. I didn’t want to build my own because I didn’t want to take responsibility for publishing new versions of my variant, especially as the newer versions of official images get published.</p><p>The major issue with the official image is</p><ol><li>It reads the configuration from environment variables.</li><li>It doesn’t have wp-cli installed. I wanted it because I want to configure default values, convert it to multi-site, and maybe in the future, I might need to install predefined plugins, etc.</li></ol><p>The first didn’t seem like a major issue until I decided to install wp-cli. However, I can’t run these installation commands after creating each container; that would take time and waste a lot of network bandwidth. Also, keep in mind that WordPress instances need to be created rapidly, and I don’t want to add more time to it. So, this means I had to create the <strong>‘Frankenstein’s monster.’</strong> I did what I shouldn’t have done: I volume mapped the wp-cli from my app to the container. No big deal, it should work, right? Except it didn’t.</p><p>The thing with wp-cli is it doesn’t read from the environment variables. This means I would have to write a script to write the wp-config YAML to its default path. I did that. Now when I tried to run the wp-cli, here comes the next problem. It has a dependency on mysql-client. I was quite surprised by it because I was under the assumption that it used the PHP MySQL client rather than the standalone binary itself.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*fzcBVCVhJj9nrT7Y.jpg" /></figure><p>At this point, I already had the ‘Frankenstein’s monster’. I don’t mind adding components to it, so I just volume-mapped the mysql-client. Here comes another twist: it had a dependency on libedit.so. At this point, I got quite frustrated and decided to quit the project. I wanted to try one last time before quitting it. I already had two volume mappings, so I just mapped the deb file for libedit.so and installed it while running the container. This made the complete setup work as intended.</p><p>This might create the issues on older wp images</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/0*kCUUY8vSMAZXrJik.jpg" /></figure><p>Now I was able to continue my work. The sites don’t have persistence; they can be rapidly created and deleted. Once you shut down the app, all of the sites’ data gets erased. This helped me test multiple plugins quickly without jumping through hoops set by 3rd-party solutions. You can find the link at the bottom of this article.</p><p><strong>Stack Used</strong></p><ol><li>FastAPI — For handling api requests from ui ( docker sdk )</li><li>Angular (ng-zorro) — for ui</li></ol><p><strong>Link</strong></p><p><a href="https://github.com/naveen17797/1clickwp">https://github.com/naveen17797/1clickwp</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=38a4d769b641" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[1 / 48 CTFs]]></title>
            <link>https://medium.com/@naveen17797/1-48-ctfs-5317671e4518?source=rss-42754a5d4864------2</link>
            <guid isPermaLink="false">https://medium.com/p/5317671e4518</guid>
            <dc:creator><![CDATA[Naveen]]></dc:creator>
            <pubDate>Sat, 30 Apr 2022 04:19:28 GMT</pubDate>
            <atom:updated>2022-04-30T04:19:28.889Z</atom:updated>
            <content:encoded><![CDATA[<h3>steganography challenge</h3><p>The given image is jpeg, however it cant be viewed.</p><p>when checked with hexeditor, the signature bits are different. JPEG files should start with <strong>FF D8 FF. Using hexedit after you alter the starting bits we get the flag</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Fg6wsSMRq4kOa_LpJa-UcQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5317671e4518" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Enabling ECG & BP feature in samsung galaxy active 2 on debian based os]]></title>
            <link>https://medium.com/@naveen17797/enabling-ecg-bp-feature-in-samsung-galaxy-active-2-on-debian-based-os-30a2b6ecfa22?source=rss-42754a5d4864------2</link>
            <guid isPermaLink="false">https://medium.com/p/30a2b6ecfa22</guid>
            <category><![CDATA[ubuntu]]></category>
            <category><![CDATA[samsung]]></category>
            <category><![CDATA[ecg]]></category>
            <category><![CDATA[pbs]]></category>
            <category><![CDATA[galaxy-watch-active-2]]></category>
            <dc:creator><![CDATA[Naveen]]></dc:creator>
            <pubDate>Mon, 18 Oct 2021 02:19:16 GMT</pubDate>
            <atom:updated>2021-10-18T08:28:51.366Z</atom:updated>
            <content:encoded><![CDATA[<p>Its quite complicated at the moment to install the two apps in the watch from linux based distro, this post would cover the steps needed.</p><h3>Disclaimer</h3><blockquote>* I’m not responsible for bricked devices, dead SD cards, thermonuclear war, or you getting fired because the alarm app failed.<br> * YOU are choosing to make these modifications. <br> * Your warranty will be void if you tamper with any part of your device / software.</blockquote><h3>// TODO</h3><ol><li>Generate a certificate from Tizen certificate manager</li><li>Sign the tpks with the generated certificate</li><li>Installing those tpks in your watch using sdb ( Smart Development Bridge )</li></ol><h3>What should i install ?</h3><h4>On your PC / Laptop</h4><ol><li>Install tizen studio from <a href="https://developer.tizen.org/development/tizen-studio/download">here</a></li><li>Once you install it, open the tizen package manager</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/635/1*eOPz_yW63WGWRJNwDXIEvA.png" /></figure><p>Choose your wearable version and install. you can find this version in the watch in this section ( settings &gt; about &gt; software ), varies based on device.</p><p>3. Go to extension sdk and install these two extensions</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/620/1*1EYKQMe-3Q5ZApkDUvX7GQ.png" /></figure><p>4. You would also need to download sdb for your os, i created a repo with all the sdb, you can download the sdb from this repo</p><p><a href="https://github.com/naveen17797/sdb">GitHub - naveen17797/sdb</a></p><p>5. Extract the sdb zip, there would be an binary file inside every zip, run the binary file like this.</p><blockquote>./sdb</blockquote><p>you should able to see the below output</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZHTOyNedG5XYwY1frtGR0A.png" /></figure><p>In some cases you would get an error that it was not able to find libssl, in that case you need to install dependency.</p><p>go here, get the deb file and install it</p><p><a href="http://security.ubuntu.com/ubuntu/pool/main/o/openssl1.0/">Index of /ubuntu/pool/main/o/openssl1.0</a></p><p>6. Connect your pc to the wifi network ( later you are going to connect the phone to same wifi network )</p><p>Thats it, you have completed the installation step for pc.</p><h4>On your watch</h4><p>In the watch you would not need to install anything, but you would need to configure the following settings</p><ol><li>settings &gt; bluetooth &gt; turn it off<strong> ( very important step, if you skip this this tutorial wont work, thou shalt treat this tutorial like arch linux installation procedure )</strong></li><li>Turn on the developer mode with following options, Settings &gt; about &gt; software version, tap on it 5 times, you should be able to see developer mode turned on.</li><li>Turn on debugging, settings &gt; about &gt; debugging to on.</li><li>settings &gt; connections &gt; wifi &gt; set always on option</li><li>settings &gt; connections &gt; wifi &gt; wifi connection &gt; connect to your wifi</li><li>Turn the watch off and turn it on.</li></ol><h3>Generate a certificate from Tizen certificate manager</h3><ol><li>Make sure you watch and your pc is on same wifi network, we are going to connect to your watch from sdb tool.</li><li>In you watch, go to settings &gt; wifi &gt; wifi networks &gt; tap on your wifi network name</li><li>If you scroll a bit you would see the local ip address of your watch, from the sdb we are going to connect to the watch using this ip address.</li><li>open the sdb folder, navigate to binary file in {EXTRACTED_FOLDEr_NAME}/data/tools/ and run this command</li></ol><blockquote>./sdb connect &lt;the_local_ip_of_the_watch&gt;</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k75HkI072r5pXsTRZ79ddQ.png" /></figure><p>it says failed to connect, but in your watch there would be an prompt to enable debugging, click on yes.</p><p>5. Lets reconnect using the same command</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CfML8v9mb9F0432ou9VOHg.png" /></figure><p>6. Its connected, now open certificate manager.</p><p>Note: the ui for certificate manager is broke in my theme, so some text might not appear in the screenshot.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/699/1*5RLUl--2B1rL7rx7R_MJwg.png" /></figure><p>click on add button, follow the pictures</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/683/1*ih7oPVOOc_tqx9BsK-U6Gw.png" /></figure><p>click on samsung</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/684/1*EqZveqkK1mfWu754LiBNJQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/680/1*QD8ZdY5OjpH1fTYnKRDXEw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/686/1*L58blh-2qO-l2FeuqYZ0dA.png" /></figure><p>I am naming my cert as test, we would need this info while signing the app. follow the below steps.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/680/1*QD8ZdY5OjpH1fTYnKRDXEw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/681/1*Kter3jcJV9b4t3KHDFegpg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/631/1*HfyZCNbbqJ4b_cHOfi7Opg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/517/1*oL7_qoEvmo_ZXch-e0GvKA.png" /></figure><p>You would need to create an account if you dont have one.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/681/1*cOqV_S5kP0-beC5UpQKrpQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/684/1*0PALjVJ6ajACseu8RDG6Xg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/682/1*ZkW9Gqlv0PDok624bzzcDg.png" /></figure><p>Its important that DUID appear here automatically, if it doesnt then the tutorial wont work. ( probably )</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/684/1*o4-0BLCZvq5aRMD-LK-WVQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/701/1*VnT4f-TcUfJgYxh36sU_EQ.png" /></figure><p>at the end we should be able to successfully generate a certificate.</p><h3>Sign the tpks with the generated certificate</h3><p>Download those tpks from here, all of them are unsigned.</p><p><a href="https://github.com/naveen17797/ecg-bp-tpk">GitHub - naveen17797/ecg-bp-tpk</a></p><p>Next step is to sign them. Tizen is usually installed on your home dir, so if you check this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LQCM8r-32v_APYVDTslBxg.png" /></figure><p>you should be able to find this file, now navigate to tools/ide/bin</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1001/1*U11ReDBzLOQ_zxkPWrwCdA.png" /></figure><p>tizen binary should be in this folder, we are going to using this binary to sign our app. before doing that we would do a check if our certificate is choosen as default, run this command.</p><p>./tizen security-profiles list</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nhqoy9VBVSQsulPkUcihXQ.png" /></figure><p>we should be able to see our certificate name here, lets proceed to sign those tpks, i have those in my Desktop, this is the syntax for the command</p><blockquote>./tizen package -t tpk -s test -- &lt;path_to_your_tpk_file&gt; -o &lt;path_to_store_your_signed_tpk_file&gt;</blockquote><p>./tizen package -t tpk -s test — ~/Desktop/ecg-bp-tpk/ecg-unsigned.tpk -o ~/Desktop/ecg-bp-tpk/ecg.tpk</p><p>substitute your paths and run this command, you should be able to see this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CwnOgySfoyU0BHAnVKRK-w.png" /></figure><p>lets do the same for BP tpk</p><p>./tizen package -t tpk -s test — ~/Desktop/ecg-bp-tpk/bp-unsigned.tpk -o ~/Desktop/ecg-bp-tpk/bp.tpk</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ozy2_dQFNxn9FQOGPf8LNg.png" /></figure><h3>Installing tpks to the watch</h3><ol><li>Lets go to the sdb binary and check if the device is connected, this is the command</li></ol><blockquote>./sdb devices</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iaPsLeV7gXz8RegfMHkfMg.png" /></figure><p>2. To install those tpks this is the syntax for that command</p><p>./sdb install &lt;path_to_your_signed_tpk&gt;</p><p>once you do this, It will take 2 to 3 minutes to install the tpk, after installing it will prompt if you want to delete the file, close the terminal or do ctrl + c. Repeat this for installing ecg and BP tpk</p><p>3. Download samsung health monitor modded apk from here.</p><p><a href="https://github.com/naveen17797/shm-modded">GitHub - naveen17797/shm-modded</a></p><p>4. Install the above apk on your phone.</p><p>5. Go to your watch, settings &gt; bluetooth &gt; on</p><p>6. Restart your watch and phone, go to samsung health montior app you should be able to see ecg and bp working</p><p>If you would like to thank samsung for MAkIng thE WOrLd A BEttEr PLAcE you can do it via this contact form <a href="https://www.samsung.com/us/support/contact/">https://www.samsung.com/us/support/contact/</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=30a2b6ecfa22" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Inferno ctf - Dank PHP challenge writeup]]></title>
            <link>https://medium.com/@naveen17797/inferno-ctf-dank-php-challenge-writeup-c5011e86ebb?source=rss-42754a5d4864------2</link>
            <guid isPermaLink="false">https://medium.com/p/c5011e86ebb</guid>
            <category><![CDATA[php]]></category>
            <dc:creator><![CDATA[Naveen]]></dc:creator>
            <pubDate>Sat, 28 Dec 2019 08:13:33 GMT</pubDate>
            <atom:updated>2019-12-28T08:24:32.008Z</atom:updated>
            <content:encoded><![CDATA[<iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ac1b32a08b42be8af5ce8f0b58110833/href">https://medium.com/media/ac1b32a08b42be8af5ce8f0b58110833/href</a></iframe><p>The code for the challenge is above, here is how we are going to solve this</p><blockquote>$usr = unserialize($id);</blockquote><p>This line seems to be interesting, unserialize can cause a lot of vulnerabilities if the data is not properly sanitized, there are two checks to pass in order to get the flag. Be sure to checkout php.net documentation for unserialise function, find the notice dialog and read the text present in it.</p><ol><li>($usr-&gt;name === “admin” &amp;&amp; $usr-&gt;pass === $usr-&gt;secret) {</li><li>if (preg_match(“/[A-Za-z0–9]+/”, $cap)) {</li></ol><p>Hmm, seems like $usr-&gt;pass and $usr-&gt;secret should be equal, but $usr-&gt;secret is an unknown value.</p><p>But i can make a reference from $usr-&gt;pass to point the $usr-&gt;secret, while running the payload even if the secret is changed, pass would be equal to secret. so when compared it would be equal we bypass the first check. I have copied the class from code and created a instance like this. Lets get the payload for first check</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/732/1*86O24V2EB8SEJVVCjPO0uA.png" /></figure><p>this is the generated payload to be passed via id parameter</p><p>O:4:”user”:3:{s:4:”name”;s:5:”admin”;s:4:”pass”;s:4:”ssss”;s:6:”secret”;R:3;}</p><p>But wait, this wont get us past the second check, after the second check there is a eval() function call, which helps us to get the flag, the second check seems to be little restrictive.</p><p>Here are the restrictions</p><ol><li>It wont allow alpha numeric value</li><li>It wont allow payload more than 45 characters.</li></ol><p>Second point seems to be a hint for something, we need to pass our payload in different param rather than caption parameter, we can use the caption param to get that payload. But this regex is still preventing the alphanumeric payload, so we are going to use XOR feature in php to pass the payload without getting caught by regex, our payload would be this</p><p><strong>&amp;caption=$_=%22`{{{%22^%22?%3C%3E/%22;${$_}[_](${$_}[__]);&amp;_=echoFlag</strong></p><p>If you couldnt get how the payload is constructed, no need to worry, here is the detailed explanation from the ctf wiki, in short we are using xor to generate the characters on run time so that it would bypass the regex filter, but we might need to bypass the size check, so we are creating a new get variable to pass our malicious code to the eval() function.</p><p><a href="https://ctf-wiki.github.io/ctf-wiki/web/php/php/#preg_match-code-execution">Php</a></p><p>Here is the full url with the payload</p><p><a href="http://104.197.168.32:17010/?id=O:4:%22user%22:3:{s:4:%22name%22;s:5:%22admin%22;s:4:%22pass%22;s:4:%22ssss%22;s:6:%22secret%22;R:3;}&amp;caption=$_=%22`{{{%22^%22?%3C%3E/%22;${$_}[_](${$_}[__]);&amp;_=echoFlag">http://104.197.168.32:17010/?id=O:4:%22user%22:3:{s:4:%22name%22;s:5:%22admin%22;s:4:%22pass%22;s:4:%22ssss%22;s:6:%22secret%22;R:3;}&amp;caption=$_=%22`{{{%22^%22?%3C%3E/%22;${$_}[_](${$_}[__]);&amp;_=echoFlag</a></p><p>And finally, we got the flag</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/347/1*lyisUTiryIAkn6lrBVr_Ug.png" /></figure><p>Struggled for 4 hrs to get this thing done, but finally it was so much rewarding. we got 61th rank out of 400, but solving web exploits was fun.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T2iLHmKUMdenAvEw8wwAkA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c5011e86ebb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Newway file manager — a file manager for servers]]></title>
            <link>https://medium.com/@naveen17797/newway-file-manager-a-file-manager-for-servers-44cdadee86b9?source=rss-42754a5d4864------2</link>
            <guid isPermaLink="false">https://medium.com/p/44cdadee86b9</guid>
            <category><![CDATA[file-manager]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[php]]></category>
            <dc:creator><![CDATA[Naveen]]></dc:creator>
            <pubDate>Sun, 20 Oct 2019 12:40:55 GMT</pubDate>
            <atom:updated>2019-10-20T12:54:28.428Z</atom:updated>
            <content:encoded><![CDATA[<h3>Newway file manager — a file manager for servers</h3><p>Its been almost 3 years since i have started my open source project newway file manager, so i am writing this post in excitement to share the<a href="https://github.com/naveen17797/newway-filemanager/releases/tag/v3.0-stable"> 3rd stable version</a> has been released.</p><p><strong>Why did i start?</strong></p><p>When i got started with php, i was learning stuff and eventually decided to host my website on a server, at that time i was not aware of git and ftp programs like file zilla, i have used the hosting file manager to upload the files and made changes to it, but the experience was horrible, it kind of sparked the idea to start the <a href="https://github.com/naveen17797/newway-filemanager">project</a>. But my experience with programming wasn’t good at that time, i built it, but it wasn’t up to the level, <strong>it looked even horrible than the hosting file managers on first version</strong></p><p><a href="https://github.com/naveen17797/newway-filemanager/releases/tag/v1.0"><strong>Newway file manager v 1.0</strong></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YV7ABokD9GiIpwIxgekY-g.png" /><figcaption>First version of newway file manage</figcaption></figure><p>But it helped me to learn stuff, i realised i had vulnerabilities in the project when i almost got good in programming, it needed to be fixed, so i decided to launch the version 2.0</p><p><a href="https://github.com/naveen17797/newway-filemanager/releases/tag/v2.0"><strong>Newway file manager v 2.0</strong></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9uvB8mXsQ2ny7HdEVPUPVg.png" /></figure><p>It looked good and almost fixed all of the vulnerabilities, but i felt a thing, i felt code base got messy and finds it hard to introduce new features, every time when i tried to add any new feature the code broke at some places, it was kind of irritating to fix them.Then i decided a full refactoring is necessary, but this time with <strong>test driven development. Codeception testing framework </strong>helped me a lot and saved my time<strong>.</strong>it took me a week to build the file manager from scratch, i did complete TDD with my code and now the project got in to almost good shape.</p><p><a href="https://github.com/naveen17797/newway-filemanager/releases/tag/v3.0-stable"><strong>Newway file manager v 3.0</strong></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5QkDXP9N6pvnemMqDjEt9A.png" /></figure><p>i did a lot of ui improvements with vuejs and made the ui user friendly and also made the backend strong with test cases,finally i made a codebase which is maintainable, secure and easy to modify. I would like to thank my friends <a href="https://medium.com/u/884512f283a9">Puvipavan</a>, <a href="https://github.com/Maikuolan">Caleb Mazalevskis</a> for introducing me to the field of open source.</p><p><strong>New Features added on this update:</strong></p><ul><li>restrict user by directories</li><li>multiple user administration</li><li>introducing access level for each user</li><li>improving the ui a lot</li></ul><p><strong>User reviews:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1004/1*jC7MQhbs0vfiJYA7aF2-fQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/460/1*nxCt7-51p6_-1RgXpd47tQ.png" /></figure><p><strong>Future Plans</strong></p><p>I have decided to make some premium features for users, yes as a blogpost in medium said this <strong>“Github stars cant pay your bill”, yes making open source software was fun, </strong>but it needs to be something which could generate money, As a independent developer i cant spend my time on making something for free,<strong> </strong>so i have decided to build a premium version with v 3.0 as the base.</p><p>P.s: i think i have missed a lot of things,people in this post, i will keep adding them once it strikes my memory.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=44cdadee86b9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How height of an heap is floor(lg n)?]]></title>
            <link>https://medium.com/@naveen17797/how-height-of-an-heap-is-floor-lg-n-32cbded87700?source=rss-42754a5d4864------2</link>
            <guid isPermaLink="false">https://medium.com/p/32cbded87700</guid>
            <category><![CDATA[heap]]></category>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[heap-height]]></category>
            <category><![CDATA[heap-sor]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Naveen]]></dc:creator>
            <pubDate>Sat, 20 Jul 2019 04:01:44 GMT</pubDate>
            <atom:updated>2019-07-20T04:01:44.827Z</atom:updated>
            <content:encoded><![CDATA[<p>CLRS : 6–1–2 : show that n element heap has height floor(lg n)</p><p>We need to show that the heap height of lg n if it has n elements. Don’t get bored, this isn’t a another blog post explaining boring math, lets discover the height to be lg n, so the post would be in layman terms.</p><p><strong>Whats a heap?</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L0g7CDZCCQZIi481NAERkg.png" /><figcaption>source: Wiki</figcaption></figure><p>A heap is a tree based data structure like above, i am not going to explain the other properties of a heap here since they are not used in this post.</p><p>what is the height of the above heap? lets draw the lines 😄</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*LwN78gIVnQ7Fs20UM6lzxA.png" /></figure><p>its the shortest path between root node to the leaf node, <strong>oh wait i didn’t explain what is root and leaf yet,</strong> the root is the top most node in this heap and the leave is bottom ( which indirectly implies root has leave nodes, but leave nodes are single)</p><p>For the given diagram, the height of the above heap is 4, for 9 elements.But for our discovery lets assume the heap is completely filled</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/471/1*RywWK4LOwHkqNaEUj0UPvQ.png" /></figure><p>lets say when we are given 1 element to put it in heap, what would be the height? the height would be just 1 (no leaf nodes, just a single node would be present in heap</p><p>For 2 elements, the height would be 2 (how? we have node 1 as the root of heap, node 2 as the leaf of heap, just like below)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/370/1*BxNknAIuDHVNnFHkU2-C6w.png" /></figure><p>For 3 elements, the height would be 2 (how, we have node 1 as root of heap, node 2, node 3 as leaf like below)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/417/1*J5L63zar_Q-mB2LDpB7Vcg.png" /></figure><p>for 4 elements, ….</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*GULcXc2HnWT6vuIqtz53_Q.gif" /></figure><p>So now we can now make a table for height and number of nodes in heap</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/200/1*qG-RPSrtHwkDJ_MMER09bA.png" /></figure><p>noticed any thing from this data?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/392/1*jNGXXb8xXHD93NkZr0nUXw.png" /></figure><p>i think the above table should made it clear, yes the nodes are increasing exponentially by a power of 2 at each height increment.</p><p>Lets say if the height of the tree is 2 , then it should contain 2 ^ 1 nodes, so from this relation we can state that</p><p><strong>height of node = 2 ^ ( height-1) nodes</strong></p><p>Lets look at the problem statement again, can we?</p><blockquote><strong>show that n element heap has height floor(lg n)</strong></blockquote><p>for now we are given n elements, so what would be the height? can we reverse this relation?</p><p>number of nodes = 2 ^ (height-1)</p><p>we already know number of nodes is n (take it as 10, 7, or 2 or whatever number you feel comfortable)</p><p>taking log on both sides</p><p>log (number of nodes) = log ( 2 ^ (height -1 ))</p><p>in other words</p><p>log(n) = log(2 ^ (h -1 ))</p><p>log(n) = h-1*log 2</p><p>h = lg n + 1 / log 2</p><p>h = floor(lg n)</p><p>at last we discovered this relation</p><p>Note: In some books the height usually starts with 0 and the derivation would be little different.</p><p>Thanks for reading this article, any improvements, if i have any errors in my approach feel free to comment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*3ir8kkBggVEZYEMPXEV40w.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=32cbded87700" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Verifying the recursion tree result by substitution method — #2]]></title>
            <link>https://medium.com/@naveen17797/verifying-the-recursion-tree-result-by-substitution-method-2-1ffda29d6b01?source=rss-42754a5d4864------2</link>
            <guid isPermaLink="false">https://medium.com/p/1ffda29d6b01</guid>
            <category><![CDATA[recursion-tree]]></category>
            <category><![CDATA[substitution]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[verification]]></category>
            <category><![CDATA[algorithms]]></category>
            <dc:creator><![CDATA[Naveen]]></dc:creator>
            <pubDate>Fri, 28 Jun 2019 03:28:23 GMT</pubDate>
            <atom:updated>2019-06-28T03:28:23.623Z</atom:updated>
            <content:encoded><![CDATA[<h3>Verifying the recursion tree result by substitution method — #2</h3><p>the given recurrence in the problem is</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/170/1*gnaTHO2h0eRaO-ko0E_XgA.png" /></figure><p>can you see the variable <strong>a </strong>here? of course not, this reccurrence doesn’t divide the subproblems equally, so it means the main problem is divided to two unequal subproblems at each step, so lets draw the recursion tree</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/427/1*wbV222FIxiFrrDDpuQ0Ang.png" /><figcaption>recursion tree for the above recurrence equation</figcaption></figure><p>can we compare this with the another recursion tree we have drawn before on part 1?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/688/1*3WXWsvnaFFaS2HkZZjm6aQ.png" /></figure><p>noticed any difference ? yep it has cn² at top, but our new recurrence equation has cn at top.</p><h3>Why cn?</h3><p>Because we can see that value from the equation, but we still dont know whether it has lower and upper bound, whether it could be classified in to Θ(g(n)), or O(g(n)), or Ω(g(n)), we didnt know that from the equation.</p><h3><strong>Determine the depth k</strong></h3><p>like all other recurrence problem we are interested in knowing at which depth k this recurrence is going to attain the boundary condition, so we take one of the nodes. At any depth k, the sub problem size can be given as <strong>(2/3) ^ k * n </strong>Is the above term confusing? have a look at our recursion tree again, you will find that the large node on recurrence is growing at the rate of this equation., for example for depth = 1 the equation <strong>(2/3) ^ k * n </strong>gives (2/3)*n which can be found in the recursion tree</p><p>Now lets get in to the problem, we need to find the depth where the sub problem size gets to one, in other words we need to find the boundary condition depth, i.e at which depth boundary condition occurs.In last problem we coined the term as <strong>i,</strong> since the author had used it in the book i choose to stay with k to avoid confusion among readers.</p><p><strong>At boundary condition, subproblem size tends to be 1, applying that condition to find the depth k</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xS3SdXl-meeuNrDqIvqgPQ.jpeg" /></figure><p>after this calculation we have found the depth of the recurrence, which is</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/109/1*u8Ph0Fzc2jmmI0TGEiChyg.png" /></figure><p>at last we found the depth at which this recurrence ends.</p><h3>How Many Nodes at the boundary condition?</h3><p>Did you notice a pattern between last post and this one? we are doing the exactly same steps.Now we need to find how many nodes are present in the boundary condition.we can see that the number of nodes are growing at a rate of 2ᵏ at every depth, where does this term 2ᵏ come from? how do i know if it is correct?</p><p>lets apply and find out</p><p>at depth = 0 , there should be 2⁰ = 1 node</p><p>at depth = 1, there should be 2¹ = 2 nodes</p><p>at depth = 2, there should be 2² = 4 nodes, can we the recurrence tree again?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/427/1*wbV222FIxiFrrDDpuQ0Ang.png" /></figure><p>well our equation is correct, the number of nodes getting increased at a rate of 2ᵏ , where k is the depth such that k ≥ 0</p><p>so we already knew the k value, ie depth value at boundary condition can be given as</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/109/1*u8Ph0Fzc2jmmI0TGEiChyg.png" /></figure><p>we substitute the value of k in equation 2ᵏ to find the number of subproblems</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KliAG_b6B_EgkGn-WGWkiA.jpeg" /></figure><p>we find the depth and number of sub problems at boundary conditions, but we need to get a intuition about the upper bound, how do we approach that?</p><p>We know that cost of each level is cn, and depth ∈ 0….log₃/₂ (n) and has</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/97/1*Yy65o7Q0VbpjP15O3l5GOg.png" /></figure><p>leaves, so cost at each level times * number of leaves, which is equal to</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/163/1*wAAcbJfHkguFD4Mgon5YAw.png" /></figure><p>which represents a form of O(n lg n), so we can now get a intuition about our upper bound.But we need a method to verify this case is true, so we are now going to use substitution method, to prove that upper bound is O(n lg(n)) it is essential to prove T(n) ≤ dn lg n, so substituting, dn lg n in place of recurrence terms T(n/3) and 2T(n/3) we can obtain the following equation</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/739/1*0lqgZEVZKDZHE6c03xDYSg.png" /></figure><p>this should be pretty simple calculation , so i didnt explain it.But at the end we can see we have guessed the upper bound as correct value.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1ffda29d6b01" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Solving recurrences using recursion tree method — determining time complexity]]></title>
            <link>https://medium.datadriveninvestor.com/solving-recurrences-using-recursion-tree-method-determining-time-complexity-5e327c82e4d5?source=rss-42754a5d4864------2</link>
            <guid isPermaLink="false">https://medium.com/p/5e327c82e4d5</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[recursion]]></category>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[recursion-tree]]></category>
            <category><![CDATA[mathematics-explanation]]></category>
            <dc:creator><![CDATA[Naveen]]></dc:creator>
            <pubDate>Thu, 27 Jun 2019 09:19:05 GMT</pubDate>
            <atom:updated>2019-06-28T14:38:08.407Z</atom:updated>
            <content:encoded><![CDATA[<figure><a href="http://www.track.datadriveninvestor.com/1B9E"><img alt="" src="https://cdn-images-1.medium.com/max/700/0*o_8Q3gWffgojn1Ki" /></a></figure><h3>Solving Recurrences Using Recursion Tree Method -Determining time Complexity -#1</h3><p>For the past few weeks I have been reading the <strong>introduction to algorithms -the third edition written by Thomas H. Cormen,</strong> while reading it section by section I have felt that some math is skipped between the steps, it took me some time to figure out, but it won&#39;t always be the same for others, and in future I might need to remember the steps again, so I thought of writing the steps here. In this post I will be showing the steps involved in recursion tree method, if I made a mistake somewhere please feel free to mention it in comments.</p><p><strong>CHAPTER 4: RECURSION TREE METHOD FOR SOLVING RECURRENCES</strong></p><p>I am going to start this series with recurrence tree method, the given recurrence is</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4OWZbWx93Ur8sW9zfpRymA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TuoNTX8RPlC_CyjvkWnGqQ.jpeg" /></figure><p>in the given problem a=3, it represents how many subproblems are produced at each level</p><p><a href="https://www.datadriveninvestor.com/2019/03/25/a-programmers-guide-to-creating-an-eclectic-bookshelf/">A Programmer&#39;s Guide to Creating an Eclectic Bookshelf | Data Driven Investor</a></p><p><strong>so we can draw a recursion tree like this ( we need to divide each problem to 3 subdivisions in each step)</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jOoaE6OqO5J9ZwCYfQVHuA.jpeg" /></figure><p>from this tree, you can see that the number of subproblems growing at a rate of (3) raised to power i, where is the depth, for example at starting depth</p><p>when i = 0, 3⁰ = 1,</p><p>when i = 1, 3¹ = 3,</p><p>when i = 2, 3² = 9</p><blockquote>so the number of subproblems at any i th depth would be <strong>3 raised to the power i</strong></blockquote><p>we are going to calculate the cost at each step, so we could draw a recursion tree like this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0AiIoGDNNN7Iv4jJk4Hxkg.jpeg" /></figure><p>Noticed cn² at the top tree level? what is it? appeared out of nowhere? :-)</p><h3><strong>Why the cost is cn²?</strong></h3><p>Given recurrence is</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/272/1*Fq7y1nWCw9RWpeSRLptjKA.png" /></figure><p>have a look at the second term,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/80/1*yf_ztsWMSupp_MUHDsxMeQ.png" /></figure><p>Θ(n²) represents the following graph ( page number 45)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/330/1*emTVv-JmmUCg1-I3IgsF9g.png" /></figure><p><strong>it tends to fall between c₁g(n) and c₂g(n), in our case g(n) is n², so the bounds are strict , since it lies between limits c₁ and c₂, lets take a constant c, such that f(n) = cn² such that c &gt; n</strong>₀</p><p>that is the reason the recursion tree uses cn² at the top level, it took me a while to figure it out.</p><p>so what are waiting for, we can add the costs and determine the running time of this reccurence ….. Not yet :-) , we need to determine some other factors before adding the running time at each step.</p><p>the only thing to determine before adding the time taken at each steps is to find the time taken at last step. in the book after skipping some math it is given as</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/156/1*CHHaLuAUxwxqZ2HDA-TomQ.png" /></figure><blockquote>for me it didn’t make any sense at the first look, therefore i have tried to find what was done before this term arrived.before jumping in to that calculation, let me make a gentle remainder</blockquote><p>3 -number of subproblems at each step</p><p>16 -factor in which n gets divided at every step (a little bit confusing at this stage, ignore this if you didn’t understand, it will be clear at the end of this article)</p><p>i is the depth of the recursion i ∈ 0,1,2…h , can you guess what might be the depth when the recursion reaches its bottom?(h represents the bottom depth level)</p><p>we have another factor getting affected when the problem reaches the bottom condition, <strong>the subproblem size, yep you guessed it right. When you touch the bottom or boundary condition the subproblem size tends to be 1, you may notice at step 0, size = n</strong></p><p>step 1, size = n / 16</p><p>step 2, size = n²/ 256, or n²/16²</p><p>at any step i , size = n/4ⁱ (equation 1)</p><p><strong>we know the fact that when it hits the boundary condition, size tends to be 1</strong></p><p>substituting in equation 1 we can get the following equation</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/96/1*CMoQIrJFSN12_8QIwwBnvA.png" /></figure><p>we solve this equation by two methods ( choose which one is easy for you), <strong>the aim is to find the depth where the recurrence will eventually reach the boundary condition.</strong></p><p><strong>METHOD 1</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5nX5fe0y3oJ3Af8jPaa_JA.jpeg" /></figure><p><strong>METHOD 2 (TAKING LOG ON BOTH SIDES)</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pVfFhQ6ye3bE78Ua8lO4Ag.jpeg" /></figure><p>So we found the boundary depth would be log<a href="https://www.compart.com/en/unicode/U+2084">₄</a> n , this is the depth our recurrence stops, so our depth would range from 0,1,2, ….. log<a href="https://www.compart.com/en/unicode/U+2084">₄</a> n</p><p>ADDING ALL THE COSTS FROM DEPTH 0 TO log<a href="https://www.compart.com/en/unicode/U+2084">₄</a> n</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9T5UnEkYk9ziIANgI2640w.jpeg" /></figure><p>whoa, how does this equation appear out of nowhere?, here we go again</p><p>at depth 0 , cost = cn²</p><p>at depth 1 cost = 3 * c(n/4)² ( 3 represents the number of subproblems at that node)<strong> (solving this will give the second term)</strong></p><p>at depth 2 cost = 3 * c(n/16)² (notice subproblems get increased exponentially by factor of 4 )</p><p>at depth n-1 cost (just a term before the last term, we have a constant value for last term, that is the reason we find this term here)</p><p>depth n-1 cost = 3 *c(n/16)^(log<a href="https://www.compart.com/en/unicode/U+2084">₄</a> n -1)</p><p>last level, ie boundary level cost =</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-NeX5EIiI2_cwVGu8-m2jg.jpeg" /></figure><p>so we find that n ^ ( log<a href="https://www.compart.com/en/unicode/U+2084">₄</a> n³) subproblems are present in the last depth. the time required to compute them would be T(1), we assume that as a constant, that&#39;s how we get sum equation like this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/526/1*r48oPW_mfo596XNTdzTn-Q.png" /></figure><p>the explanation for the second step would be unnecessary, but still, this derivation is incomplete, we need to derive a quadratic polynomial from this equation, we need set the upper bound as infinity, so T(n) would be definitely lesser than the assumed upper bound.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gCGhdf2v5-1JqBLOHXKoPA.jpeg" /></figure><p><strong>at the end, the term (16/13) cn² clearly indicates the recurrence has an upper bound of O(n²)</strong></p><p>This series will be continued…</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fupscri.be%2Fb2a0d6%3Fas_embed%3Dtrue&amp;dntp=1&amp;display_name=Upscribe&amp;url=https%3A%2F%2Fupscri.be%2Fb2a0d6%2F&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=upscri" width="800" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/0707f5c806284d01a4a13c7b13a91ce3/href">https://medium.com/media/0707f5c806284d01a4a13c7b13a91ce3/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5e327c82e4d5" width="1" height="1" alt=""><hr><p><a href="https://medium.datadriveninvestor.com/solving-recurrences-using-recursion-tree-method-determining-time-complexity-5e327c82e4d5">Solving recurrences using recursion tree method — determining time complexity</a> was originally published in <a href="https://medium.datadriveninvestor.com/">DataDrivenInvestor</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Google summer of code 2018— Final Report]]></title>
            <link>https://medium.com/@naveen17797/google-summer-of-code-2018-final-report-d2ec2eff828b?source=rss-42754a5d4864------2</link>
            <guid isPermaLink="false">https://medium.com/p/d2ec2eff828b</guid>
            <category><![CDATA[github]]></category>
            <category><![CDATA[gsoc]]></category>
            <category><![CDATA[gsoc-2018]]></category>
            <category><![CDATA[librehealth]]></category>
            <category><![CDATA[libreehr]]></category>
            <dc:creator><![CDATA[Naveen]]></dc:creator>
            <pubDate>Sun, 12 Aug 2018 06:34:04 GMT</pubDate>
            <atom:updated>2018-08-12T08:43:06.368Z</atom:updated>
            <content:encoded><![CDATA[<p>Proposal Title : Updater for Libre EHR using Github API</p><p>Mentors : Tony McCormick, Nilesh Prasad</p><p>Proposal Link : <a href="https://docs.google.com/document/d/1vr0t87jfFcwI-dZ-kXrRXB3ZGO7sub8jkON_Sw5ezjk/edit">https://docs.google.com/document/d/1vr0t87jfFcwI-dZ-kXrRXB3ZGO7sub8jkON_Sw5ezjk</a></p><p>Description : This project aims to build a new updating system for Libre EHR application using the github API.The major idea behind the necessity of this project is patching the security vulnerabilities in the application.Because whenever a security vulnerability gets discovered and patched in the github repo, the user need to update the application manually, so it is essential to create this module and integrate it with this application</p><p>Deliverables :</p><ol><li>User Mode (The mode for the normal users)</li><li>Developer Mode(The mode for contributors, by which repo owners can test the PRs easily)</li></ol><p>PULL REQUEST OF MY WORK :</p><p><a href="https://github.com/LibreHealthIO/lh-ehr/pull/1122">GSOC project : Updater for LibreEHR using github API by naveen17797 · Pull Request #1122 · LibreHealthIO/lh-ehr</a></p><p>PATCH PRs:</p><ul><li><a href="https://github.com/LibreHealthIO/lh-ehr/pull/1208">fix for folders with dot causing bug in updater by naveen17797 · Pull Request #1208 · LibreHealthIO/lh-ehr</a></li><li><a href="https://github.com/LibreHealthIO/lh-ehr/pull/1220">Patch : fixing updater logic by naveen17797 · Pull Request #1220 · LibreHealthIO/lh-ehr</a></li></ul><p>CONFIGURABLES : these are some configurables for updater which can be found on updater/settings.json</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/75e068859a1fdbf3e04e212138d76d0f/href">https://medium.com/media/75e068859a1fdbf3e04e212138d76d0f/href</a></iframe><p><strong>PARAMETERS:</strong></p><p>host : The host which the updater is making pull requests to, currently it is only using github API, but updater is built in way that it can adopt any API.</p><p>owner : The owner of the repository on which the updater should check for the updates</p><p>repository_name : The name at which the Libre EHR application is located</p><p>github_current : The pull request number at which the updater got merged in to the application, it can be added with or without #</p><p>feedback_issue_number : The issue number where we can get opinions of user for that update</p><p>db_backup_file : This file at which updater reads all the changed table names and it makes backup, restore from it.</p><p><strong>HURDLES FACED:</strong></p><p>The major problem i have faced in this project is i couldn’t get endpoint to fetch only merged requests from github API.</p><p>It can only give PRs in three states</p><ol><li>open (all open pull requests)</li><li>closed ( couldn’t use it because it may also contain PR which got closed without merging)</li><li>All (contain both open, closed PR)</li></ol><p>So the only way i got is, i have to check the current PR time stamp against all other PRs.It caused a huge performance lag,it took me 1 min 30 seconds to loop through all pull request data. So i have cached the order the pull request got merged and reduced the performance lag</p><p>SCREENSHOTS OF MY WORK :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/899/1*rN7aBF3E62zviiXWSH6Pdw.png" /><figcaption>setup wizard for updater</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/907/1*zo3ueBCpLgWS6WN5F9QBpQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/902/1*xVI3P0KeNPXqyLubiWyMIg.png" /><figcaption>Developer Mode</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*lqdUluzdqzIe_5_J5mHc9A.png" /><figcaption>User mode</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/981/1*mk7Ec8VP7t_BilkKdyh2AQ.png" /><figcaption>Updater User Administration</figcaption></figure><p>VIDEO TUTORIAL:</p><p>I have also made a video tutorial to help users to operate this module.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Ff42BiTp75Z8%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Df42BiTp75Z8&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Ff42BiTp75Z8%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/8bb27bb6927401827ad78f5147463f67/href">https://medium.com/media/8bb27bb6927401827ad78f5147463f67/href</a></iframe><p>FUTURE WORK</p><ol><li>To write api functions for the gitlab, bit bucket</li><li>To add some user friendly features such as allowing full update ( without single PR by PR update)</li></ol><p><strong>ACKNOWLDGEMENT</strong></p><p>I would like to thank my mentors Tony, Nilesh prasad for providing me assistance and helping me to shape the project idea.I would also like to thank <a href="https://medium.com/u/4e2274118522">Terry Hill</a>, <a href="https://medium.com/u/f064489b9b68">Arthur Eaton</a> for providing support, ideas, encouragement during this period.They both supported me a lot in acheiving this goal.</p><p>I would also like to org admins <a href="https://medium.com/u/53ba2bb84284">Judy Gichoya, MD</a>, <a href="https://medium.com/u/46b7fd9a7ed8">Robert O&#39;Connor</a>, <strong>Michael Downey </strong>for their continuous support.</p><p><strong>QUICK LINKS</strong></p><p>Github profile : <a href="https://github.com/naveen17797">https://github.com/naveen17797</a></p><p>Blog posts : <a href="https://medium.com/@naveen17797">https://medium.com/@naveen17797</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d2ec2eff828b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GSOC Completion of coding]]></title>
            <link>https://medium.com/@naveen17797/gsoc-completion-of-coding-8478d69b9efa?source=rss-42754a5d4864------2</link>
            <guid isPermaLink="false">https://medium.com/p/8478d69b9efa</guid>
            <category><![CDATA[gsoc]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[libreeher]]></category>
            <category><![CDATA[librehealth]]></category>
            <category><![CDATA[gsoc-2018]]></category>
            <dc:creator><![CDATA[Naveen]]></dc:creator>
            <pubDate>Mon, 06 Aug 2018 04:25:44 GMT</pubDate>
            <atom:updated>2018-08-06T04:25:44.081Z</atom:updated>
            <content:encoded><![CDATA[<p>This is the last day of coding in gsoc, since the day i have started gsoc i have been kept telling myself, finish every thing mentioned on proposal before this date and submit patches.</p><p>I did the same.I have almost completed all the work i mentioned in proposal and my main PR got merged in to the Libre EHR repository 😌 (<a href="https://github.com/LibreHealthIO/lh-ehr/pull/1122">https://github.com/LibreHealthIO/lh-ehr/pull/1122</a>)</p><p>As <a href="https://medium.com/u/4e2274118522">Terry Hill</a> once said “There comes a time in the life of a project where you must shoot the engineer and get on with production”.Yes the statement proved to be true, i initially thought my gsoc project updater wont arise any new issues, but it proved me wrong.I have made a logic mistake in the updater which i found out once my main PR got merged, finally i figured out the mistake and done my patch on this PR (<a href="https://github.com/LibreHealthIO/lh-ehr/pull/1220">https://github.com/LibreHealthIO/lh-ehr/pull/1220</a>)</p><p>But this costed me a performance issue, it took 1 min 30 seconds to get and do a update, i have altered the function and brought it to 1 min 15 seconds, yep i didn’t get the satisfication, since i like perfection, i have continued and cached the API data and also made sure it wont malfunction at any case, brought performance in to 15 seconds.</p><p>And also i have completed the db backup and restore Module, both PRs are open and awaiting review, i hope once they get merged this would improve updater a lot.</p><p>It was a nice working time with my friends rachman,abhinav, apoorvac, trodridge and perseus.And mentors supported me a lot during this period, i would like to thank Art Eaton, <a href="https://medium.com/u/4e2274118522">Terry Hill</a>, Tony for having patience and helping me to acheive what i have mentioned in my proposal</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/263/1*FyNakE8MfPuGj_TBR1p7Jw.png" /></figure><p>I was so afraid of entering this internship at the begining stage, <a href="https://medium.com/u/4e2274118522">Terry Hill</a>, Art Eaton helped me to overcome my fear and provided assistance in learning the code base of the application</p><p>Art Eaton encouraged my proposal idea, which motivated me to do my proposal in the best way.I have also made a tutorial video to explain users how to use my updater module to keep their application safe</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Ff42BiTp75Z8%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Df42BiTp75Z8&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Ff42BiTp75Z8%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/8bb27bb6927401827ad78f5147463f67/href">https://medium.com/media/8bb27bb6927401827ad78f5147463f67/href</a></iframe><p>Finally i am going to be missing these days in my life.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8478d69b9efa" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>