<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.8.6">Jekyll</generator><link href="https://www.saikiransripada.com/feed.xml" rel="self" type="application/atom+xml" /><link href="https://www.saikiransripada.com/" rel="alternate" type="text/html" /><updated>2024-11-09T05:13:04+00:00</updated><id>https://www.saikiransripada.com/feed.xml</id><title type="html">Sai Kiran Sripada</title><subtitle>A software engineer with a strong interest in data structures, algorithms, and back-end development.</subtitle><author><name>Sai Kiran Sripada</name></author><entry><title type="html">Find similar Instagram hashtags of a keyword</title><link href="https://www.saikiransripada.com/find-similar-instagram-hashtags-of-a-keyword/" rel="alternate" type="text/html" title="Find similar Instagram hashtags of a keyword" /><published>2019-08-05T17:01:27+00:00</published><updated>2023-12-23T10:31:26+00:00</updated><id>https://www.saikiransripada.com/find-similar-instagram-hashtags-of-a-keyword</id><content type="html" xml:base="https://www.saikiransripada.com/find-similar-instagram-hashtags-of-a-keyword/">&lt;p&gt;&lt;a href=&quot;https://github.com/saikiransripada/instagram-similar-hashtags&quot; target=&quot;_blank&quot;&gt;Instagram Similar Hashtags&lt;/a&gt; is a command-line script that lists similar hashtags based on the user keyword. No configuration or password required.&lt;/p&gt;

&lt;h3 id=&quot;requirements&quot;&gt;Requirements&lt;/h3&gt;
&lt;ul&gt;
  &lt;li&gt;Python 3.x&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;usage&quot;&gt;Usage&lt;/h3&gt;
&lt;ol&gt;
  &lt;li&gt;Clone the &lt;a href=&quot;https://github.com/saikiransripada/instagram-similar-hashtags&quot; target=&quot;_blank&quot;&gt;Instagram Similar Hashtags&lt;/a&gt; repository to your computer.&lt;/li&gt;
  &lt;li&gt;Run the script using the command &lt;code class=&quot;highlighter-rouge&quot;&gt;python3 hashtags.py&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;Enter the hashtag.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Please feel free to fork and file issues or create pull requests.
&lt;a href=&quot;https://github.com/saikiransripada/instagram-similar-hashtags&quot; target=&quot;_blank&quot;&gt;https://github.com/saikiransripada/instagram-similar-hashtags&lt;/a&gt;&lt;/p&gt;</content><author><name>Sai Kiran Sripada</name></author><summary type="html">Instagram Similar Hashtags is a command-line script that lists similar hashtags based on the user keyword. No configuration or password required.</summary></entry><entry><title type="html">Download photos, videos, and sidecars from Instagram</title><link href="https://www.saikiransripada.com/download-photos-and-videos-from-instagram/" rel="alternate" type="text/html" title="Download photos, videos, and sidecars from Instagram" /><published>2019-08-04T17:01:27+00:00</published><updated>2023-12-23T10:31:26+00:00</updated><id>https://www.saikiransripada.com/download-photos-and-videos-from-instagram</id><content type="html" xml:base="https://www.saikiransripada.com/download-photos-and-videos-from-instagram/">&lt;p&gt;&lt;a href=&quot;https://github.com/saikiransripada/instagram-media-downloader&quot; target=&quot;_blank&quot;&gt;Instagram Media Downloader&lt;/a&gt; is a command-line script to download photos, videos and sidecars (album) of an Instagram profile. No configuration or password required. This script works with public profiles only.&lt;/p&gt;

&lt;h3 id=&quot;requirements&quot;&gt;Requirements&lt;/h3&gt;
&lt;ul&gt;
  &lt;li&gt;Python 3.x&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;usage&quot;&gt;Usage&lt;/h3&gt;
&lt;ol&gt;
  &lt;li&gt;Clone the &lt;a href=&quot;https://github.com/saikiransripada/instagram-media-downloader&quot; target=&quot;_blank&quot;&gt;Instagram Media Downloader&lt;/a&gt; repo to your computer.&lt;/li&gt;
  &lt;li&gt;Install the required packages using &lt;code class=&quot;highlighter-rouge&quot;&gt;pip3 install -r requirements.txt&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;Run the script using the command &lt;code class=&quot;highlighter-rouge&quot;&gt;python3 instagram.py -u &amp;lt;instagram_username&amp;gt; -p &amp;lt;path_to_download&amp;gt;&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The path parameter is optional. Specify the path if you want to save the media in a specific location. If omitted, it downloads the media to the current working directory.&lt;/p&gt;

&lt;p&gt;Please feel free to fork and file issues or create pull requests.
&lt;a href=&quot;https://github.com/saikiransripada/instagram-media-downloader&quot; target=&quot;_blank&quot;&gt;https://github.com/saikiransripada/instagram-media-downloader&lt;/a&gt;&lt;/p&gt;</content><author><name>Sai Kiran Sripada</name></author><summary type="html">Instagram Media Downloader is a command-line script to download photos, videos and sidecars (album) of an Instagram profile. No configuration or password required. This script works with public profiles only.</summary></entry><entry><title type="html">Prevent CNAME file in Jekyll from being deleted during the build process</title><link href="https://www.saikiransripada.com/prevent-cname-file-in-jekyll-from-being-deleted-during-the-build-process/" rel="alternate" type="text/html" title="Prevent CNAME file in Jekyll from being deleted during the build process" /><published>2019-06-29T17:01:27+00:00</published><updated>2023-12-23T10:31:26+00:00</updated><id>https://www.saikiransripada.com/prevent-cname-file-in-jekyll-from-being-deleted-during-the-build-process</id><content type="html" xml:base="https://www.saikiransripada.com/prevent-cname-file-in-jekyll-from-being-deleted-during-the-build-process/">&lt;p&gt;If you have a custom domain, you may have to copy the CNAME file after every Jekyll build.&lt;/p&gt;

&lt;p&gt;You can use the &lt;code class=&quot;highlighter-rouge&quot;&gt;keep_files&lt;/code&gt; option in &lt;code class=&quot;highlighter-rouge&quot;&gt;_config.yml&lt;/code&gt; to prevent the CNAME file in the &lt;code class=&quot;highlighter-rouge&quot;&gt;_site&lt;/code&gt; directory from being deleted during the build process.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-yaml&quot; data-lang=&quot;yaml&quot;&gt;&lt;span class=&quot;na&quot;&gt;keep_files&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;pi&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;CNAME'&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;]&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;If you are using Travis CI, you can copy the CNAME file to the &lt;code class=&quot;highlighter-rouge&quot;&gt;_site&lt;/code&gt; directory after the build process. Here’s a sample &lt;code class=&quot;highlighter-rouge&quot;&gt;.travis.yml&lt;/code&gt; configuration that you can use:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-yaml&quot; data-lang=&quot;yaml&quot;&gt;&lt;span class=&quot;na&quot;&gt;language&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;ruby&lt;/span&gt;
&lt;span class=&quot;na&quot;&gt;cache&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;bundler&lt;/span&gt;
&lt;span class=&quot;na&quot;&gt;branches&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;only&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;dev&lt;/span&gt;
&lt;span class=&quot;na&quot;&gt;script&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;JEKYLL_ENV=production bundle exec jekyll build --destination _site&lt;/span&gt;
  &lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;cp CNAME ./_site/CNAME&lt;/span&gt;
&lt;span class=&quot;na&quot;&gt;deploy&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;provider&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;pages&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;local-dir&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;./_site&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;target-branch&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;master&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;email&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;deploy@travis-ci.org&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;Deployment Bot&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;skip-cleanup&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;true&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;github-token&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;$GITHUB_TOKEN&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;keep-history&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;true&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;on&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;branch&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;dev&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;</content><author><name>Sai Kiran Sripada</name></author><summary type="html">If you have a custom domain, you may have to copy the CNAME file after every Jekyll build.</summary></entry><entry><title type="html">Get a notification when the movie tickets are available on BookMyShow</title><link href="https://www.saikiransripada.com/get-a-notification-when-the-movie-tickets-are-available-on-bookmyshow/" rel="alternate" type="text/html" title="Get a notification when the movie tickets are available on BookMyShow" /><published>2018-11-18T17:01:27+00:00</published><updated>2023-12-23T10:31:26+00:00</updated><id>https://www.saikiransripada.com/get-a-notification-when-the-movie-tickets-are-available-on-bookmyshow</id><content type="html" xml:base="https://www.saikiransripada.com/get-a-notification-when-the-movie-tickets-are-available-on-bookmyshow/">&lt;p&gt;This python script checks if movie tickets are available for a showtime and send an email notification. I have written this in &lt;a href=&quot;https://www.python.org/&quot; target=&quot;_blank&quot;&gt;Python 3&lt;/a&gt; using &lt;a href=&quot;https://www.crummy.com/software/BeautifulSoup/&quot; target=&quot;_blank&quot;&gt;BeautifulSoup&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Run the script using &lt;code class=&quot;highlighter-rouge&quot;&gt;python3 app.py&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Please feel free to fork and file issues or create pull requests.
&lt;a href=&quot;https://github.com/saikiransripada/bookmyshow&quot; target=&quot;_blank&quot;&gt;https://github.com/saikiransripada/bookmyshow&lt;/a&gt;&lt;/p&gt;</content><author><name>Sai Kiran Sripada</name></author><summary type="html">This python script checks if movie tickets are available for a showtime and send an email notification. I have written this in Python 3 using BeautifulSoup.</summary></entry><entry><title type="html">Font from origin has been blocked from loading by Cross-Origin Resource Sharing policy</title><link href="https://www.saikiransripada.com/font-from-origin-has-been-blocked-from-loading/" rel="alternate" type="text/html" title="Font from origin has been blocked from loading by Cross-Origin Resource Sharing policy" /><published>2016-02-19T17:01:27+00:00</published><updated>2023-12-23T10:31:26+00:00</updated><id>https://www.saikiransripada.com/font-from-origin-has-been-blocked-from-loading</id><content type="html" xml:base="https://www.saikiransripada.com/font-from-origin-has-been-blocked-from-loading/">&lt;p&gt;Custom web fonts via CDN requires CORS (Cross-Origin Resource Sharing) configuration to display fonts properly.&lt;/p&gt;

&lt;p&gt;Add the below rule to your .htaccess&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-apache&quot; data-lang=&quot;apache&quot;&gt;&lt;span class=&quot;c&quot;&gt;# Allow access from all domains for webfonts.&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;IfModule&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt; mod_headers.c&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&amp;gt;
&lt;/span&gt;  &lt;span class=&quot;p&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;FilesMatch&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt; &quot;\.(ttf|ttc|otf|eot|woff|font.css|css)$&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&amp;gt;
&lt;/span&gt;    &lt;span class=&quot;nc&quot;&gt;Header&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;add&lt;/span&gt; Access-Control-Allow-Origin &quot;*&quot;
  &lt;span class=&quot;p&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;FilesMatch&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;IfModule&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Using a wildcard is potentially insecure as it opens the domain to JavaScript access from any domain. Instead, you can allow your domain or subdomain.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-apache&quot; data-lang=&quot;apache&quot;&gt;&lt;span class=&quot;nc&quot;&gt;Header&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;add&lt;/span&gt; Access-Control-Allow-Origin &quot;your-domain.com&quot;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;When &lt;code class=&quot;highlighter-rouge&quot;&gt;add&lt;/code&gt; is used, the response header will be added to the existing set of headers; Whereas with &lt;code class=&quot;highlighter-rouge&quot;&gt;set&lt;/code&gt; the response header will be set, replacing any header with this name.&lt;/p&gt;</content><author><name>Sai Kiran Sripada</name></author><summary type="html">Custom web fonts via CDN requires CORS (Cross-Origin Resource Sharing) configuration to display fonts properly.</summary></entry><entry><title type="html">Get the file extension in PHP</title><link href="https://www.saikiransripada.com/get-the-file-extension-in-php/" rel="alternate" type="text/html" title="Get the file extension in PHP" /><published>2015-11-24T17:01:27+00:00</published><updated>2023-12-23T10:31:26+00:00</updated><id>https://www.saikiransripada.com/get-the-file-extension-in-php</id><content type="html" xml:base="https://www.saikiransripada.com/get-the-file-extension-in-php/">&lt;p&gt;A simple function to get the extension of a file. Meet &lt;a href=&quot;https://php.net/pathinfo&quot; target=&quot;_blank&quot;&gt;pathinfo()&lt;/a&gt;.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-php&quot; data-lang=&quot;php&quot;&gt;&lt;span class=&quot;cp&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$extension&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;pathinfo&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$filename&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;PATHINFO_EXTENSION&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt; &lt;span class=&quot;cp&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;</content><author><name>Sai Kiran Sripada</name></author><summary type="html">A simple function to get the extension of a file. Meet pathinfo().</summary></entry><entry><title type="html">Always backup your database</title><link href="https://www.saikiransripada.com/always-backup-your-database/" rel="alternate" type="text/html" title="Always backup your database" /><published>2015-11-24T17:01:27+00:00</published><updated>2023-12-23T10:31:26+00:00</updated><id>https://www.saikiransripada.com/always-backup-your-database</id><content type="html" xml:base="https://www.saikiransripada.com/always-backup-your-database/">&lt;blockquote&gt;
  &lt;p&gt;Always backup your database before playing with it! Better safe than sorry!&lt;/p&gt;
&lt;/blockquote&gt;</content><author><name>Sai Kiran Sripada</name></author><summary type="html">Always backup your database before playing with it! Better safe than sorry!</summary></entry><entry><title type="html">Include CSS or JavaScript in Moodle</title><link href="https://www.saikiransripada.com/include-css-or-javascript-in-moodle/" rel="alternate" type="text/html" title="Include CSS or JavaScript in Moodle" /><published>2015-11-20T17:01:27+00:00</published><updated>2023-12-23T10:31:26+00:00</updated><id>https://www.saikiransripada.com/include-css-or-javascript-in-moodle</id><content type="html" xml:base="https://www.saikiransripada.com/include-css-or-javascript-in-moodle/">&lt;p&gt;When writing a custom plugin, place CSS in a file called styles.css in the base directory of your plugin /plugin/styles.css. Moodle will automatically load the CSS file for you.&lt;/p&gt;

&lt;p&gt;To include a CSS file in Moodle:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-php&quot; data-lang=&quot;php&quot;&gt;&lt;span class=&quot;cp&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$PAGE&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;requires&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;css&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;moodle_url&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'/path/to/file.css'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;));&lt;/span&gt; &lt;span class=&quot;cp&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;To include a JavaScript file in Moodle:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-php&quot; data-lang=&quot;php&quot;&gt;&lt;span class=&quot;cp&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$PAGE&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;requires&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;js&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;moodle_url&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'/path/to/file.js'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;));&lt;/span&gt; &lt;span class=&quot;cp&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Provide the relative path to the file (excluding document root).&lt;/p&gt;

&lt;p&gt;When writing a custom plugin, place CSS in a file called &lt;code class=&quot;highlighter-rouge&quot;&gt;styles.css&lt;/code&gt; in the base directory of your plugin &lt;code class=&quot;highlighter-rouge&quot;&gt;/plugin/styles.css&lt;/code&gt;. Moodle will automatically load the CSS file for you.&lt;/p&gt;</content><author><name>Sai Kiran Sripada</name></author><summary type="html">When writing a custom plugin, place CSS in a file called styles.css in the base directory of your plugin /plugin/styles.css. Moodle will automatically load the CSS file for you.</summary></entry></feed>