<?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 Mattia Zanella on Medium]]></title>
        <description><![CDATA[Stories by Mattia Zanella on Medium]]></description>
        <link>https://medium.com/@mattiazanella?source=rss-563e93df78a4------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*IScszMRQ4kPw2gf0rAC76g.jpeg</url>
            <title>Stories by Mattia Zanella on Medium</title>
            <link>https://medium.com/@mattiazanella?source=rss-563e93df78a4------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 20:54:50 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mattiazanella/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[Usare chiavi SSH multiple con github.]]></title>
            <link>https://medium.com/@mattiazanella/usare-chiavi-ssh-multiple-con-github-4f6321392066?source=rss-563e93df78a4------2</link>
            <guid isPermaLink="false">https://medium.com/p/4f6321392066</guid>
            <category><![CDATA[terminal]]></category>
            <category><![CDATA[agents]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[ssh-keys]]></category>
            <category><![CDATA[medium-italia]]></category>
            <dc:creator><![CDATA[Mattia Zanella]]></dc:creator>
            <pubDate>Thu, 24 Jan 2019 23:35:21 GMT</pubDate>
            <atom:updated>2019-01-24T23:35:21.981Z</atom:updated>
            <content:encoded><![CDATA[<p>Il seguente articolo(sono coraggioso) è semplicemente la traduzione 🇮🇹 di questa simpatica guida:</p><p><a href="https://tiffanybbrown.com/2017/06/using-multiple-ssh-keys-with-github/index.html">Using multiple SSH keys with GitHub</a></p><p>Con qualche suggerimento in più.</p><p>Egggnente nel cammin della mia vita mi ritrovai a gestire chiavi ssh multiple sulla stessa macchina 🚘</p><h4>Premesse:</h4><ul><li>Sei una persona multimilionaria e possiedi un macbook <strong></strong></li><li>Possiedi entrambe le mail di entrambi gli account (naturalmente)</li><li><a href="https://help.github.com/articles/adding-a-new-ssh-key-to-your-github-account/">Hai già creato una chiave SSH e l’hai già associata ad uno dei due account.</a></li></ul><h3>Creazione della 2° chiave SSH:</h3><ul><li><strong>Step mancante nella guida originale:</strong> se si opta per un nome personalizzato per la chiave (diverso dal default, come il 99% dei casi) è necessario lanciare dal terminale il seguente comando: cd ~/.ssh/</li><li>Creare la chiave con “commento” la propria 2° mail: ssh-keygen -t rsa -b 4096 -C &quot;your_email@example.com&quot;</li><li>Inserire una <a href="https://www.ssh.com/ssh/passphrase"><em>passphrase</em></a><em> </em>personalizzata come da prompt.</li></ul><h3>Modifica del file SSH di configurazione:</h3><ul><li>Sempre da terminale: cd ~/.ssh/ &amp;&amp; sudo code config</li><li>Usare sudo non è una best-practice ma è la più rapida( è quasi mezzanotte e mi scade il coprifuoco ). Siete liberi di usare <a href="http://vim.wikia.com/wiki/Vim_Tips_Wiki">vim</a>.</li><li>Inserire nel file <em>config</em> il seguente testo <strong>con le dovute modifiche</strong>:</li></ul><pre># First account<br>Host github.com-first_user_name<br>  HostName github.com<br>  PreferredAuthentications publickey<br>  IdentityFile ~/.ssh/first_key_rsa<br>  IdentitiesOnly yes<br><br># Second account<br>Host github.com-second_user_name<br>  HostName github.com<br>  PreferredAuthentications publickey<br>  IdentityFile ~/.ssh/second_key_rsa<br>  IdentitiesOnly yes</pre><pre>Host * AddKeysToAgent yes UseKeychain yes</pre><ul><li>Infine, aggiungete la chiave all’agente: ssh-add -K ~/.ssh/second_key_rsa</li></ul><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FsaD01LsKDzxL2%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FsaD01LsKDzxL2%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2FsaD01LsKDzxL2%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="244" frameborder="0" scrolling="no"><a href="https://medium.com/media/22aaaed39c787c407f189bab8d57d9f9/href">https://medium.com/media/22aaaed39c787c407f189bab8d57d9f9/href</a></iframe><ul><li>Giusto per dormire bene la notte ora dovreste avere 2 chiavi associate all’agente. ssh-add -l dovrebbe darvi un output simile:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Iy-r5KxQIzNmova_ySNYLw.png" /></figure><h3>Aggiungere <em>origine</em> e <em>utente</em> nei vostri repositories locali:</h3><ul><li>cd your_repo_name/.git/ &amp;&amp; sudo code config (ridaje)</li><li>Aggiungete questo <strong>con le dovute modifiche</strong>:</li></ul><pre>[remote &quot;origin&quot;]<br>        url = git@github.com-second_user_name:org-name-if-applicable/reponame.git<br>        fetch = +refs/heads/*:refs/remotes/origin/*<br>    [user]<br>        email = your_email@example.com</pre><ul><li>Credo comunque che i 2 precedenti step equivalgano al seguente comando <strong>per quanto riguarda la parte dell’user</strong>:</li></ul><pre>cd your_repo_name<br>git config user.name &quot;Mattia Zanella&quot;<br>git config user.email &quot;mattia_zanella@email.com&quot;</pre><h3>Aggiungere la chiave SSH a Github:</h3><ul><li>Da terminale: cd ~/.ssh/ &amp;&amp; pbcopy &lt; your_key_rsa.pub</li><li>Login su <a href="https://github.com/">github</a></li><li>Settings &gt; SSH and GPG keys</li><li>Aggiungi nuova chiave e incollate il contenuto nella text-area</li><li>Done 🎉</li></ul><p>Dovrebbe funzionare tutto ora.<br>Per qualsiasi problema…Googlate 😀 👋🏻</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4f6321392066" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Angular Core Concepts, an Angular 2 course]]></title>
            <link>https://medium.com/linkme/angular-core-concepts-an-angular-2-course-by-fabio-biondi-24b46a3bbef6?source=rss-563e93df78a4------2</link>
            <guid isPermaLink="false">https://medium.com/p/24b46a3bbef6</guid>
            <category><![CDATA[angular2]]></category>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[angularjs]]></category>
            <dc:creator><![CDATA[Mattia Zanella]]></dc:creator>
            <pubDate>Fri, 17 Feb 2017 11:29:22 GMT</pubDate>
            <atom:updated>2017-02-17T16:50:37.260Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*91T44lWO1AS-9v3Dk2uhNw.png" /></figure><p>A couple of weeks ago me and my colleague <a href="https://medium.com/u/6f3ddbadc567">Gianfranco</a> spent two days with <a href="https://medium.com/u/6811aef7b11">Fabio</a> (<a href="https://twitter.com/biondifabio">Twitter</a>) digging into Angular and its main changes with version 2 and further.</p><h3>LinkMe SRL on Twitter</h3><p>@biondifabio parla di #angular2 a LinkMe @s2kagency 👨🏻‍💻</p><h4>First of all Javascript evolution</h4><p>From ES1 to ES2016/<a href="https://www.typescriptlang.org/">Typescript</a>.<br>Now we have this amazing superset which helps developers write clear and structured code.</p><p>Yes but what are the benefits? ( most important )<br>1. Classes<br>2. Interface<br>3. Types<br>4. Decorators</p><p>Here’s some declarations:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z1KbzoPvcnmB1kWFEojmAA.jpeg" /></figure><p>So life is wonderful ? 🤔 Nope of course.<br>Currently ES6/Typescript is not fully supported by browsers.</p><p>The Solution?</p><ol><li>You write ES6/Typescript code</li><li>Then you use a transpiler ( like <a href="https://babeljs.io/">Babel</a> ) to translate your code into ES5 standard.</li></ol><h4>Almost everything becomes components</h4><p>Clear example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MuLU4YKe0xTehqNelHCn-w.jpeg" /></figure><p>But how we define it? Easy 👇🏼</p><pre>import { Component } from ‘@angular/core’;</pre><pre>@Component({<br> selector: ‘hello’,<br> template: ‘&lt;div class=”message”&gt;Hi!!!&lt;/div&gt;’<br> styles: [‘.message: { color: red }’]<br>})</pre><pre>export <strong>class</strong> <strong>HelloComponent</strong> { }</pre><p>Then thanks to the selector che can use this amazing tag <em>&lt;hello&gt;&lt;/hello&gt; </em>in our template.</p><p>So a component:<br>1. Is a class with metadata thanks to angular’s @Component decorator.<br>2. Extends HTML syntax with custom tags definition.<br>3. Has an HTML template which defines its layout.<br>4. Can retrieve input property.<br>5. Can comunicate outside its “scope”.</p><h4>Similar to components we have services</h4><p>Utility:<br>1. Useful for keeping logic separate.<br>2. Useful for sharing logic between components.<br>3. Useful with repeated actions.<br>4. Useful with operations like REST or <a href="https://github.com/AngularClass/angular-websocket">WebSocket</a>.</p><p>How we create a service ? 👇🏼</p><pre>@Injectable()</pre><pre>export <strong>class</strong> UserService {</pre><pre>getAllUsers() {<br> <em>// …<br></em>}</pre><pre>deleteUser() { … }</pre><pre>addUser() { … }</pre><pre>}</pre><p>Angular’s services are built on top of @Injectable Angular’s decorator.<br>This is very important when you have to inject your service into your component like this:</p><pre>@Component({<br> selector: ‘home-component’,<br> template: ‘…’,<br>})</pre><pre>export class HomeComponent {<br> constructor (<strong>private service: UserService</strong>) {<br>  <strong>service</strong>.getAllUser()<br> }<br>}</pre><p>So services are so easy to use? Of course not 😀<br>You have to instantiate Injector inside app.module.ts like this:</p><pre>import { NgModule } from ‘@angular/core’;<br>import { BrowserModule } from ‘@angular/platform-browser’;<br>import { UserComponent } from ‘./[PATH]/user.component’;<br>import { LoggedUser } from “./[PATH]/logged-user.service”;</pre><pre>…</pre><pre>@NgModule({</pre><pre>declarations: [UserComponent, TabBarComponent …],<br> imports: [BrowserModule],<br><strong> providers: [LoggedUser, UserService],<br></strong> bootstrap: [AppComponent]<br>})</pre><pre>class AppModule {}</pre><p>Services follow Singleton pattern and information are available between all components and services of that module app.module.ts</p><h4>Conclusions</h4><p>This article was a preview of what Angular is bringing to us in the next months.</p><p>Hope it was helpful, for more details you can find here the slides:</p><p><a href="http://www.fabiobiondi.com/blog/training/angular-master-class/">ANGULAR 2+ MASTER CLASS (4gg) - Fabio Biondi</a></p><p>Thanks again to <a href="https://medium.com/u/6811aef7b11">Fabio Biondi</a>, see you soon!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=24b46a3bbef6" width="1" height="1" alt=""><hr><p><a href="https://medium.com/linkme/angular-core-concepts-an-angular-2-course-by-fabio-biondi-24b46a3bbef6">Angular Core Concepts, an Angular 2 course</a> was originally published in <a href="https://medium.com/linkme">LinkMe</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>