<?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>DEV Community: Bear Cherian</title>
    <description>The latest articles on DEV Community by Bear Cherian (@bearcherian).</description>
    <link>https://dev.to/bearcherian</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%2F112681%2F2824f4bd-afb6-4d52-b232-7b3b126df10a.jpg</url>
      <title>DEV Community: Bear Cherian</title>
      <link>https://dev.to/bearcherian</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/bearcherian"/>
    <language>en</language>
    <item>
      <title>Defer Panic Recover</title>
      <dc:creator>Bear Cherian</dc:creator>
      <pubDate>Mon, 10 Jun 2019 23:15:37 +0000</pubDate>
      <link>https://dev.to/bearcherian/defer-panic-recover-1m85</link>
      <guid>https://dev.to/bearcherian/defer-panic-recover-1m85</guid>
      <description>&lt;p&gt;I was reading a bit about Go's builtin for &lt;code&gt;panic()&lt;/code&gt; and &lt;code&gt;recover()&lt;/code&gt;. I wanted to understand it a bit more, so I made a small app that tries to show how &lt;code&gt;defer&lt;/code&gt;, &lt;code&gt;panic()&lt;/code&gt;, and &lt;code&gt;recover()&lt;/code&gt; all work together.&lt;/p&gt;

&lt;p&gt;Enjoy!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/bearcherian/defer-panic-recover"&gt;https://github.com/bearcherian/defer-panic-recover&lt;/a&gt;&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>go</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Git users and their last commits</title>
      <dc:creator>Bear Cherian</dc:creator>
      <pubDate>Tue, 19 Mar 2019 15:52:30 +0000</pubDate>
      <link>https://dev.to/bearcherian/git-users-and-their-last-commits-2gpi</link>
      <guid>https://dev.to/bearcherian/git-users-and-their-last-commits-2gpi</guid>
      <description>&lt;p&gt;I needed to remember who was working with me on a certain project over the last year. I had some trouble remembering, because this last year has been crazy personally, and the project overlapped a couple years. All the years and months and days were running together in my brain.&lt;/p&gt;

&lt;p&gt;Fortunately, we have git logs, but it's not straightforward. I came up with this set of commands to help with the task:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git log --pretty=format:"%an" | sort | uniq | awk '{system("git log -1 --author="$1 " --pretty=format:\"%ad%x09%an\""); print "\r"}' | sort -k5n -k2M -k3n
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Here's what we're doing:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;get all of the user names in the git logs&lt;/li&gt;
&lt;li&gt;sort them lexically&lt;/li&gt;
&lt;li&gt;remove repeats (sort -u could have replaced these)&lt;/li&gt;
&lt;li&gt;do another git log for each user, but print out their last commit, and format it to be just the date and their name separated by a tab. &lt;/li&gt;
&lt;li&gt;Sort by the columns (year, month, date)&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>git</category>
      <category>logs</category>
      <category>bash</category>
      <category>linux</category>
    </item>
    <item>
      <title>AEM Responsive Grid with 0px height</title>
      <dc:creator>Bear Cherian</dc:creator>
      <pubDate>Tue, 15 Jan 2019 06:19:25 +0000</pubDate>
      <link>https://dev.to/bearcherian/aem-responsive-grid-with-0px-height-1il3</link>
      <guid>https://dev.to/bearcherian/aem-responsive-grid-with-0px-height-1il3</guid>
      <description>&lt;p&gt;In AEM when you create a new page component with a editable area that uses the responsive grid (&lt;code&gt;wcm/foundation/components/responsivegrid&lt;/code&gt;) you might experience an issue where the editable area appears, but has no height, and is unusable. All you get is a thin blue line where the editable area should be.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_E4uttIS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/fjyznpqt1kqgzexdvwe4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_E4uttIS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/fjyznpqt1kqgzexdvwe4.png" alt="Screenshot of unusable editable area"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The cause of this is a missing include. To initialize the AEM editing features, an JSP is loaded that initializes all of the editable areas, as well as some other things. &lt;/p&gt;

&lt;p&gt;The solution is to add the following in your &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; of your page component&lt;/p&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight html"&gt;&lt;code&gt;    &lt;span class="c"&gt;&amp;lt;!--/* Initializes the Experience Manager authoring UI */--&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;sly&lt;/span&gt; &lt;span class="na"&gt;data-sly-include=&lt;/span&gt;&lt;span class="s"&gt;"/libs/wcm/core/components/init/init.jsp"&lt;/span&gt; &lt;span class="na"&gt;data-sly-unwrap&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;You can remove the comment, but I like to leave it in so I, or anyone else editing the page component, knows why we have it in there. Now you'll see your editable area ready to add components.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Vilwqkc9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/f0l4q5udxc8ueo4kqlr8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Vilwqkc9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/f0l4q5udxc8ueo4kqlr8.png" alt="Screenshot of working editable area"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks to user manasip9 for posting &lt;a href="https://forums.adobe.com/message/9942397#9942397"&gt;their answer on this thread&lt;/a&gt;  on the Adobe forums.&lt;/p&gt;

</description>
      <category>aem</category>
      <category>experiencemanager</category>
      <category>htl</category>
      <category>sightly</category>
    </item>
  </channel>
</rss>
