<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Denny's Blog</title>
    <description>Tech Blog</description>
    <link>http://dennyac.com/</link>
    <atom:link href="http://dennyac.com/feed.xml" rel="self" type="application/rss+xml" />
    <pubDate>Mon, 29 Nov 2021 01:35:43 +0000</pubDate>
    <lastBuildDate>Mon, 29 Nov 2021 01:35:43 +0000</lastBuildDate>
    <generator>Jekyll v3.9.0</generator>
    
      <item>
        <title>Open Source Contributions</title>
        <description>&lt;p&gt;During my daily work, whenever I notice bugs, lack of documentation or features that could be useful in open source software I use, I make an attempt to contribute back during my free time. Maintainers generally welcome contributions, guide you and give good feedback during the process. I get pretty excited when an open source contribution gets accepted. Just compiling a list of contributions I’ve made so far.&lt;/p&gt;

&lt;h3 id=&quot;dropwizard&quot;&gt;&lt;a href=&quot;https://www.dropwizard.io&quot;&gt;Dropwizard&lt;/a&gt;&lt;/h3&gt;
&lt;h4 id=&quot;a-damn-simple-library-for-building-production-ready-restful-web-services&quot;&gt;A damn simple library for building production-ready RESTful web services.&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/dropwizard/dropwizard/pull/1218&quot;&gt;Add support for Logback’s FixedWindowRollingPolicy&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/dropwizard/dropwizard/pull/1247&quot;&gt;Add FileAppenderFactory validations and tests&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/dropwizard/dropwizard/pull/1858&quot;&gt;Add logging configuration options to documentation&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/dropwizard/dropwizard/pull/1861&quot;&gt;Include logging options in config&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/dropwizard/dropwizard/pull/2649&quot;&gt;Use instrumented thread factory&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/dropwizard/dropwizard/pull/2675&quot;&gt;Add documentation for metrics annotations&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;metrics&quot;&gt;&lt;a href=&quot;https://metrics.dropwizard.io&quot;&gt;Metrics&lt;/a&gt;&lt;/h3&gt;
&lt;h4 id=&quot;capturing-jvm--and-application-level-metrics-so-you-know-whats-going-on&quot;&gt;Capturing JVM- and application-level metrics. So you know what’s going on.&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/dropwizard/metrics/pull/1186&quot;&gt;Add ResponseMetered annotation for Jersey Resource&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/dropwizard/metrics/pull/1406&quot;&gt;Add doc and examples for jersey annotations&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/dropwizard/metrics/pull/1407&quot;&gt;Add idle time for Callable in InstrumentedExecutorService&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;java-faker&quot;&gt;&lt;a href=&quot;http://dius.github.io/java-faker&quot;&gt;Java-faker&lt;/a&gt;&lt;/h3&gt;
&lt;h4 id=&quot;brings-the-popular-ruby-faker-gem-to-java&quot;&gt;Brings the popular ruby faker gem to Java&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/DiUS/java-faker/pull/308&quot;&gt;Upgrade to trusty and remove oraclejdk7&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/DiUS/java-faker/pull/310&quot;&gt;Port over dogs from stympy/faker&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;fastimage&quot;&gt;&lt;a href=&quot;http://github.com/sdsykes/fastimage&quot;&gt;Fastimage&lt;/a&gt;&lt;/h3&gt;
&lt;h4 id=&quot;fastimage-finds-the-size-or-type-of-an-image-given-its-uri-by-fetching-as-little-as-needed&quot;&gt;FastImage finds the size or type of an image given its uri by fetching as little as needed&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/sdsykes/fastimage/pull/78&quot;&gt;Handle protocol relative urls&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
        <pubDate>Thu, 30 May 2019 12:00:00 +0000</pubDate>
        <link>http://dennyac.com/2019/05/30/open-source-contributions/</link>
        <guid isPermaLink="true">http://dennyac.com/2019/05/30/open-source-contributions/</guid>
        
        
      </item>
    
      <item>
        <title>Frequently used Git commands</title>
        <description>&lt;p&gt;With my experience using Git so far, which is quite minimal, I have found the following commands to be extremely handy. I’ll keep updating this post from time to time, if I do come across other useful commands. Please note that some of these commands are not recommended as they might re-write history which may not be preferable. Also since I’m relatively new to git, some of these practices may not be advised. I would love to hear feedback regarding this post and about best practices to be followed.&lt;/p&gt;

&lt;p&gt;In situations where your local repository is out of sync and you want to get it sync it with the central repository -&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;git reset &lt;span class=&quot;nt&quot;&gt;--hard&lt;/span&gt; HEAD
git clean &lt;span class=&quot;nt&quot;&gt;-f&lt;/span&gt;
git pull&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;To remove the most recent commit -&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;git reset &lt;span class=&quot;nt&quot;&gt;--hard&lt;/span&gt; HEAD^&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;The “Branch-Edit-Commit-Merge” workflow -&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;git checkout &lt;span class=&quot;nt&quot;&gt;-b&lt;/span&gt; branch-name
&lt;span class=&quot;c&quot;&gt;# Make changes&lt;/span&gt;
git commit &lt;span class=&quot;nt&quot;&gt;-a&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-m&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;Change made&quot;&lt;/span&gt;
git checkout master
git merge branch-name&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;To combine the last n commits into a single commit -&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;c&quot;&gt;# Replace n with the number of commits to combine&lt;/span&gt;
git reset &lt;span class=&quot;nt&quot;&gt;--soft&lt;/span&gt; HEAD~n &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt;
git commit&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Forcefully push to a repository -&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;git push heroku master &lt;span class=&quot;nt&quot;&gt;--force&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Rebasing -&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;git checkout new-feature
git rebase master
git checkout master
git merge new-feature&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;To check out a remote git branch -&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;c&quot;&gt;# Works with git versions &amp;gt;= 1.6.6&lt;/span&gt;
git fetch
git checkout &amp;lt;branch_name&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;If you want to dicard or keep your uncommited changes to a branch aside, and continue to work on it later -&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;git checkout &lt;span class=&quot;nb&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;c&quot;&gt;# To discard changes&lt;/span&gt;
git stash      &lt;span class=&quot;c&quot;&gt;# To keep changes aside&lt;/span&gt;
git stash pop  &lt;span class=&quot;c&quot;&gt;# To bring them back&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Syncing a repository with a fork -&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;git remote add upstream &amp;lt;repository_url&amp;gt; &lt;span class=&quot;c&quot;&gt;# To configure a remote to point to the upstream repository&lt;/span&gt;
git fetch upstream &lt;span class=&quot;c&quot;&gt;# Fetches from the upstream repository and stores it in upstream/master&lt;/span&gt;
git checkout master
git merge upstream/master&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

</description>
        <pubDate>Fri, 10 Apr 2015 12:00:00 +0000</pubDate>
        <link>http://dennyac.com/2015/04/10/frequently-used-git-commands/</link>
        <guid isPermaLink="true">http://dennyac.com/2015/04/10/frequently-used-git-commands/</guid>
        
        
      </item>
    
  </channel>
</rss>
