<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Dev on Antomor</title><link>https://antomor.com/tags/dev/</link><description>Recent content in Dev on Antomor</description><generator>Hugo -- gohugo.io</generator><language>en</language><managingEditor>dev@antomor.com (Antonio Morrone)</managingEditor><webMaster>dev@antomor.com (Antonio Morrone)</webMaster><copyright>© 2026 Antonio Morrone</copyright><lastBuildDate>Sat, 11 Apr 2020 10:51:42 +0200</lastBuildDate><atom:link href="https://antomor.com/tags/dev/index.xml" rel="self" type="application/rss+xml"/><item><title>Angular Dynamic Content</title><link>https://antomor.com/blog/angular-dynamic-content/</link><pubDate>Sat, 11 Apr 2020 10:51:42 +0200</pubDate><author>dev@antomor.com (Antonio Morrone)</author><guid>https://antomor.com/blog/angular-dynamic-content/</guid><description>&lt;p&gt;In many cases we need to change the content of a component dynamically — for instance, to allow the user to change view, or to let the children render data retrieved and processed by its parent component. Below, we are going to show some techniques for creating a component without deciding in advance how the data will be shown. According to the application&amp;rsquo;s needs, each technique has its own strengths, but all of them encourage component reusability. We are going to describe:&lt;/p&gt;</description></item><item><title>CSP and CORS</title><link>https://antomor.com/blog/csp-and-cors/</link><pubDate>Sat, 11 Apr 2020 10:51:20 +0200</pubDate><author>dev@antomor.com (Antonio Morrone)</author><guid>https://antomor.com/blog/csp-and-cors/</guid><description>&lt;h2 class="relative group"&gt;What is CSP&#10; &lt;div id="what-is-csp" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#what-is-csp" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;p&gt;CSP stands for &lt;em&gt;Content Security Policy&lt;/em&gt; and it is a security mechanism that helps to protect or mitigate some common attacks such as XSS (Cross-site scripting). It can be set by means of a &lt;em&gt;Content-Security-Policy HTTP header&lt;/em&gt; or using an HTML &lt;em&gt;meta&lt;/em&gt; tag.&lt;/p&gt;&#10;&lt;p&gt;HTTP header:&lt;/p&gt;&#10;&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-txt" data-lang="txt"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Content-Security-Policy: policy&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#10;&lt;p&gt;HTML Meta tag:&lt;/p&gt;&#10;&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-txt" data-lang="txt"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&amp;lt;meta http-equiv=&amp;#34;Content-Security-Policy&amp;#34; content=&amp;#34;policy&amp;#34;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#10;&lt;p&gt;A &lt;em&gt;policy&lt;/em&gt; describes a set of directives, each composed of the area in which the rule is applied and the rule itself. The policy directive &lt;code&gt;default-src 'self'&lt;/code&gt; says to load all content from the site&amp;rsquo;s origin, while if we want to load content from the site and from another trusted domain, the policy would be &lt;code&gt;Content-Security-Policy: default-src 'self' *.trusted.com&lt;/code&gt;.&lt;/p&gt;</description></item><item><title>Git: Move Files Retaining History</title><link>https://antomor.com/blog/git-move-file-with-history/</link><pubDate>Sat, 14 Mar 2020 12:28:03 +0100</pubDate><author>dev@antomor.com (Antonio Morrone)</author><guid>https://antomor.com/blog/git-move-file-with-history/</guid><description>&lt;p&gt;Some time ago we needed to create a new product that shares many features with the existing one. The first idea was to extract some of the code into a library, to be then imported and used independently in the two projects.&lt;/p&gt;&#10;&lt;p&gt;After creating the repository for the library, the first thing I would have done was copy the files from one repo to another. Well, it works like a charm, it&amp;rsquo;s fast, and it doesn&amp;rsquo;t require any particular expertise — a normal drag-and-drop operation. What&amp;rsquo;s more? It could be a very effective approach, but &amp;hellip;&lt;/p&gt;</description></item><item><title>Mongodb Query Profiler</title><link>https://antomor.com/blog/mongodb-query-profiler/</link><pubDate>Sat, 28 Dec 2019 18:06:38 +0100</pubDate><author>dev@antomor.com (Antonio Morrone)</author><guid>https://antomor.com/blog/mongodb-query-profiler/</guid><description>&lt;p&gt;Some months ago, I was creating a web page to show some aggregated data, but I soon noticed the API used to retrieve the data was very slow. After investigating the possible issue, we discovered the bottleneck: the database. The solution was to restructure the data to make it consumable from a web page.&lt;/p&gt;&#10;&lt;p&gt;Although I had sometimes used the SQL Server profiler, I had no experience with the MongoDB profiler, so here are the steps involved in analysing a MongoDB query.&lt;/p&gt;</description></item><item><title>Security Headers on Static Websites</title><link>https://antomor.com/blog/security-headers-on-static-websites/</link><pubDate>Thu, 26 Dec 2019 10:56:23 +0100</pubDate><author>dev@antomor.com (Antonio Morrone)</author><guid>https://antomor.com/blog/security-headers-on-static-websites/</guid><description>&lt;p&gt;When I started this blog, I evaluated many options:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;blogging platform vs static-generated website&lt;/li&gt;&#10;&lt;li&gt;self-hosted vs hosted solutions&lt;/li&gt;&#10;&lt;li&gt;costs&lt;/li&gt;&#10;&lt;li&gt;and many more.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;I ended up trying to build something very simple, consisting of a static website hosted on &lt;a href="https://pages.github.com/" target="_blank" rel="noreferrer"&gt;GitHub Pages&lt;/a&gt;.&#10;With this solution, I have been able to cut the cost of any hosting solution, since, being a dev, I am quite comfortable writing in a text editor. But soon some problems arose.&lt;/p&gt;</description></item><item><title>SPA deployment with GitLab</title><link>https://antomor.com/blog/gitlab-cd/</link><pubDate>Fri, 13 Dec 2019 10:53:54 +0100</pubDate><author>dev@antomor.com (Antonio Morrone)</author><guid>https://antomor.com/blog/gitlab-cd/</guid><description>&lt;p&gt;In the last few projects, I started using &lt;a href="https://about.gitlab.com/" target="_blank" rel="noreferrer"&gt;GitLab&lt;/a&gt;, not only as a git repository server, but also as a DevOps platform. So here I am going to describe a very simple architecture for deploying a single-page application using &lt;a href="https://www.docker.com/" target="_blank" rel="noreferrer"&gt;Docker&lt;/a&gt;, &lt;a href="https://docs.docker.com/compose/" target="_blank" rel="noreferrer"&gt;docker-compose&lt;/a&gt;, and &lt;a href="https://www.nginx.com/" target="_blank" rel="noreferrer"&gt;nginx&lt;/a&gt;.&#10;In this specific project I also used &lt;a href="https://docs.microsoft.com/en-us/dotnet/core/" target="_blank" rel="noreferrer"&gt;dotnet-core&lt;/a&gt; for the back-end API and &lt;a href="https://vuejs.org/" target="_blank" rel="noreferrer"&gt;VueJS&lt;/a&gt; as the front-end framework, but it is language-agnostic, meaning that you can replace whatever back-end or front-end you prefer.&lt;/p&gt;</description></item><item><title>Browser Extension Development</title><link>https://antomor.com/blog/browser-extension/</link><pubDate>Wed, 20 Nov 2019 17:15:01 +0100</pubDate><author>dev@antomor.com (Antonio Morrone)</author><guid>https://antomor.com/blog/browser-extension/</guid><description>&lt;p&gt;Web extensions or browser plugins can be used to improve browser functionalities. The following examples summarize the different goals they can have:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://noscript.net/" target="_blank" rel="noreferrer"&gt;no-script&lt;/a&gt; - to block script served from not-trusted domains&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://github.com/gorhill/uBlock#ublock-origin" target="_blank" rel="noreferrer"&gt;ublock Origin&lt;/a&gt; - it is &amp;ldquo;a wide-spectrum blocker&amp;rdquo;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://addons.mozilla.org/it/firefox/addon/dark-mode-zen/" target="_blank" rel="noreferrer"&gt;dark-mode&lt;/a&gt; - it changes the appearance of web pages&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://addons.mozilla.org/it/firefox/addon/react-devtools/" target="_blank" rel="noreferrer"&gt;React Developer Tools&lt;/a&gt; - to inspect react-specific properties of a page that makes use of React.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&#10;&lt;h2 class="relative group"&gt;Anatomy of an extension&#10; &lt;div id="anatomy-of-an-extension" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#anatomy-of-an-extension" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;p&gt;The main components of a browser extension are:&lt;/p&gt;</description></item></channel></rss>