diff --git a/2022/01/04/build-and-deploy-automatically.html b/2022/01/04/build-and-deploy-automatically.html index 6c4a504..73ec1b6 100644 --- a/2022/01/04/build-and-deploy-automatically.html +++ b/2022/01/04/build-and-deploy-automatically.html @@ -427,8 +427,8 @@ python3 -m venv venv secret = bytes(config.APP_KEY, 'utf-8') digester = hmac.new(secret, content, hashlib.sha256) calculated_signature = 'sha256=' + digester.hexdigest() - signature = request.headers.get('X-Hub-Signature-256') - if calculated_signature == signature: + actual_signature = request.headers.get('X-Hub-Signature-256') + if calculated_signature == actual_signature: subprocess.Popen( ['./perform-git-pull.sh', config.PROJECT_PATH]) return 'OK' diff --git a/feed.xml b/feed.xml index b443ade..1746697 100644 --- a/feed.xml +++ b/feed.xml @@ -1,4 +1,4 @@ -Jekyll2022-01-22T00:10:19+00:00https://sahinakkaya.dev/feed.xmlŞahin Akkaya’s Personal PageŞahin Akkaya's personal blog - a perfectionist who likes to tinker everything until it is just right. Get ready to find some sweet tips that will boost your productivity and make you fall in love with your computer.Şahin AkkayaUsing ffmpeg for Simple Video Editing2022-01-21T20:40:00+00:002022-01-21T20:40:00+00:00https://sahinakkaya.dev/2022/01/21/ffmpeg-to-rescue<h2 id="story">Story</h2> +Jekyll2022-01-29T05:42:12+00:00https://sahinakkaya.dev/feed.xmlŞahin Akkaya’s Personal PageŞahin Akkaya's personal blog - a perfectionist who likes to tinker everything until it is just right. Get ready to find some sweet tips that will boost your productivity and make you fall in love with your computer.Şahin AkkayaUsing ffmpeg for Simple Video Editing2022-01-21T20:40:00+00:002022-01-21T20:40:00+00:00https://sahinakkaya.dev/2022/01/21/ffmpeg-to-rescue<h2 id="story">Story</h2> <p>Today, I have recorded a video for one of my classes and I was required to upload it till midnight. The video was perfect except for a few seconds where I misspelled some words and started again. I had to remove that part from the video before uploading it. Since I was low on time, I thought that I better use a GUI program to do this job. I opened up <a href="https://kdenlive.org/en/">Kdenlive</a> and jumped into editing my video. It was my first time using it so I spent some time to cut and delete the parts that I want to get rid of. When I was ready, I clicked Render button to render my video. It was waaay too slow than I expected. Since I have nothing to do while waiting for render to finish, I thought I could give <code class="language-plaintext highlighter-rouge">ffmpeg</code> a shot.</p> <h2 id="let-the-show-begin">Let the show begin</h2> @@ -133,8 +133,8 @@ python3 <span class="nt">-m</span> venv venv <span class="n">secret</span> <span class="o">=</span> <span class="nb">bytes</span><span class="p">(</span><span class="n">config</span><span class="p">.</span><span class="n">APP_KEY</span><span class="p">,</span> <span class="s">'utf-8'</span><span class="p">)</span> <span class="n">digester</span> <span class="o">=</span> <span class="n">hmac</span><span class="p">.</span><span class="n">new</span><span class="p">(</span><span class="n">secret</span><span class="p">,</span> <span class="n">content</span><span class="p">,</span> <span class="n">hashlib</span><span class="p">.</span><span class="n">sha256</span><span class="p">)</span> <span class="n">calculated_signature</span> <span class="o">=</span> <span class="s">'sha256='</span> <span class="o">+</span> <span class="n">digester</span><span class="p">.</span><span class="n">hexdigest</span><span class="p">()</span> - <span class="n">signature</span> <span class="o">=</span> <span class="n">request</span><span class="p">.</span><span class="n">headers</span><span class="p">.</span><span class="n">get</span><span class="p">(</span><span class="s">'X-Hub-Signature-256'</span><span class="p">)</span> - <span class="k">if</span> <span class="n">calculated_signature</span> <span class="o">==</span> <span class="n">signature</span><span class="p">:</span> + <span class="n">actual_signature</span> <span class="o">=</span> <span class="n">request</span><span class="p">.</span><span class="n">headers</span><span class="p">.</span><span class="n">get</span><span class="p">(</span><span class="s">'X-Hub-Signature-256'</span><span class="p">)</span> + <span class="k">if</span> <span class="n">calculated_signature</span> <span class="o">==</span> <span class="n">actual_signature</span><span class="p">:</span> <span class="n">subprocess</span><span class="p">.</span><span class="n">Popen</span><span class="p">(</span> <span class="p">[</span><span class="s">'./perform-git-pull.sh'</span><span class="p">,</span> <span class="n">config</span><span class="p">.</span><span class="n">PROJECT_PATH</span><span class="p">])</span> <span class="k">return</span> <span class="s">'OK'</span> diff --git a/sitemap.xml b/sitemap.xml index cb6e6b5..05a9961 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -27,6 +27,6 @@ https://sahinakkaya.dev/assets/docs/resume.pdf -2022-01-22T00:05:55+00:00 +2022-01-29T05:42:03+00:00