<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: martiliones</title>
    <description>The latest articles on Forem by martiliones (@martiliones).</description>
    <link>https://forem.com/martiliones</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F594953%2F1daf8c81-bfb0-4cd4-b782-576c87a1eb60.jpeg</url>
      <title>Forem: martiliones</title>
      <link>https://forem.com/martiliones</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/martiliones"/>
    <language>en</language>
    <item>
      <title>How I got Linus Torvalds in my contributors on GitHub</title>
      <dc:creator>martiliones</dc:creator>
      <pubDate>Wed, 25 Aug 2021 14:54:39 +0000</pubDate>
      <link>https://forem.com/martiliones/how-i-got-linus-torvalds-in-my-contributors-on-github-3k4g</link>
      <guid>https://forem.com/martiliones/how-i-got-linus-torvalds-in-my-contributors-on-github-3k4g</guid>
      <description>&lt;p&gt;Before starting, you can see for yourself by clicking on the link → &lt;a href="https://github.com/martiliones/icon-set-creator" rel="noopener noreferrer"&gt;https://github.com/martiliones/icon-set-creator&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;* don't forget to star project if you like it :)&lt;/p&gt;

&lt;h1&gt;
  
  
  Idea
&lt;/h1&gt;

&lt;p&gt;One day I wondered why my commits were not showing up in the activity overview. I googled and &lt;a href="https://stackoverflow.com/a/19183663/10939574" rel="noopener noreferrer"&gt;found on StackOverflow&lt;/a&gt; that GitHub uses your git email to link to the profile instead of the authentication data. So I thought that maybe I can change git email to get a commit from another user without his participation&lt;/p&gt;

&lt;h1&gt;
  
  
  Realisation
&lt;/h1&gt;

&lt;p&gt;First of all, you need to get e-mail address of a target user. At first my idea was to get the email address from the user's git repository, but then I found that I could use the GitHub API to get it. Here is the GET API method you can run in your browser&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://api.github.com/users/REPLACE_WITH_USERNAME/events/public
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You will get list of user events and you can easily find e-mail with search box in your browser (&lt;code&gt;ctrl + F&lt;/code&gt; in most browsers, or if "Filter JSON" for Firefox)&lt;/p&gt;

&lt;p&gt;Once we get the email address, we can create a commit:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git &lt;span class="nt"&gt;-c&lt;/span&gt; user.name&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'Linus Torvalds'&lt;/span&gt; &lt;span class="nt"&gt;-c&lt;/span&gt; user.email&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'torvalds@linux-foundation.org'&lt;/span&gt; commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"JavaScript is my favorite language 💕"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To display your commits in target user Activity Overview &lt;strong&gt;at least one&lt;/strong&gt; of the following must be true:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;User is a collaborator on the repository or are a member of the organization that owns the repository.&lt;/li&gt;
&lt;li&gt;User have forked the repository.&lt;/li&gt;
&lt;li&gt;User have opened a pull request or issue in the repository.&lt;/li&gt;
&lt;li&gt;User have starred the repository.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Results
&lt;/h1&gt;

&lt;p&gt;You can do this with anyone as long as you have a user's email address.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F76sots36it7nt0inx6sx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F76sots36it7nt0inx6sx.png" alt="Linus Torvalds commit"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgs8jmuwnt1mki89nq1sl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgs8jmuwnt1mki89nq1sl.png" alt="Contributors Graph"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;I think GitHub should fix this bug to prevent attacks on profiles. If the target user starred your repository, you can draw something in his Activity Overview as example&lt;/p&gt;

&lt;p&gt;Thank you for your time. Share your opinion about it in the comments 👇&lt;/p&gt;

</description>
      <category>news</category>
      <category>github</category>
      <category>git</category>
    </item>
    <item>
      <title>How to Add and Manage App Icons to React Native App on IOS &amp; Android</title>
      <dc:creator>martiliones</dc:creator>
      <pubDate>Sun, 15 Aug 2021 10:42:23 +0000</pubDate>
      <link>https://forem.com/martiliones/the-easiest-way-to-create-and-manage-app-icons-for-react-native-on-ios-android-52j0</link>
      <guid>https://forem.com/martiliones/the-easiest-way-to-create-and-manage-app-icons-for-react-native-on-ios-android-52j0</guid>
      <description>&lt;p&gt;In this article, we are going to discuss the in and outs of the React Native App Icon for both iOS and Android. The app icon is a critical component of a mobile app since it’s always exposed to users. A great app icon can improve your app install numbers and can boost daily active users if it’s attractively designed. Anyone who is building a React Native app will eventually need to solve the issue of adding a React Native app icon to their mobile apps, prior to publishing them to the app stores.&lt;/p&gt;

&lt;p&gt;To create app icon you need:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;PNG icon for IOS and Android (I highly recommend using an icon with a size of at least 1024x1024 pixels)&lt;/li&gt;
&lt;li&gt;You can also create Adaptive Icon for Android, which can display a variety of shapes across different device models (&lt;a href="https://developer.android.com/guide/practices/ui_guidelines/icon_design_adaptive" rel="noopener noreferrer"&gt;Learn More&lt;/a&gt;). To create it you need a foreground image and a background color or image. &lt;a href="https://medium.com/google-design/designing-adaptive-icons-515af294c783" rel="noopener noreferrer"&gt;There&lt;/a&gt; is also a good article on how to design such icons.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In this guide we’re going to use the following assets, which can be found in &lt;a href="https://github.com/martiliones/icon-set-creator/tree/master/example" rel="noopener noreferrer"&gt;GitHub repository&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8g015kwdejjnp2e3cc0c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8g015kwdejjnp2e3cc0c.png" alt="screenshot of assets to create app icon"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;First you need to install &lt;a href="https://github.com/martiliones/icon-set-creator" rel="noopener noreferrer"&gt;⭐ ️icon-set-creator&lt;/a&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; icon-set-creator
&lt;span class="c"&gt;# OR&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;yarn global add icon-set-creator
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After installation, you will have access to the iconset binary in your command line. You can verify that it is properly installed by simply running &lt;code&gt;iconset&lt;/code&gt;, which should present you with a help message listing all available commands.&lt;/p&gt;

&lt;p&gt;Now you can create config file for icon-set-creator. Create &lt;code&gt;iconset.config.js&lt;/code&gt; file in root of your app (where &lt;code&gt;package.json&lt;/code&gt; is located) and set options for our assets:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;imagePath&lt;/code&gt; — The location of the icon image file which you want to use as the app launcher icon. e.g. &lt;code&gt;./assets/icon.png&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;android&lt;/code&gt;/&lt;code&gt;ios&lt;/code&gt; (optional): &lt;code&gt;true&lt;/code&gt; — Override the default existing Flutter launcher icon for the platform specified, &lt;code&gt;false&lt;/code&gt; — ignore making launcher icons for this platform, &lt;code&gt;icon_name&lt;/code&gt; — this will generate a new launcher icons for the platform with the name you specify, without removing the old default existing Flutter launcher icon.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;imagePathAndroid&lt;/code&gt; — The location of the icon image file specific for Android platform (optional — if not defined then the &lt;code&gt;imagePath&lt;/code&gt; is used)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;imagePathIos&lt;/code&gt; — The location of the icon image file specific for iOS platform (optional — if not defined then the &lt;code&gt;imagePath&lt;/code&gt; is used)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The next two attributes are only used when generating Android launcher icon:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;adaptiveIconBackground&lt;/code&gt; — The color (E.g. &lt;code&gt;"#ffffff"&lt;/code&gt;) or image asset (E.g. &lt;code&gt;"assets/images/dark-background.png"&lt;/code&gt;) which will be used to fill out the background of the adaptive icon&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;adaptiveIconForeground&lt;/code&gt; — The image asset which will be used for the icon foreground of the adaptive icon&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In our example we will use one icon for both platforms and also an adaptive icon for android. This is how the our config file will look:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="cm"&gt;/*iconset.config.js*/&lt;/span&gt;
&lt;span class="nx"&gt;module&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;exports&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;imagePath&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./assets/app-icon/icon.png&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

  &lt;span class="na"&gt;adaptiveIconBackground&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./assets/app-icon/background.png&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;adaptiveIconForeground&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./assets/app-icon/foreground.png&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🎉 Enter the command below and you’re done!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;iconset create
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you want, you can add the package in the dev dependencies and the scripts to the &lt;code&gt;package.json&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"scripts"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"create-appicon"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"iconset create"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"devDependencies"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"icon-set-creator"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"latest"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next time you can just enter the &lt;code&gt;npm run create-appicon&lt;/code&gt; command.&lt;/p&gt;

&lt;p&gt;🙌 Thanks for reading! If you like what I do, you can &lt;a href="https://github.com/martiliones" rel="noopener noreferrer"&gt;follow me on GitHub&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
