<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Github on Noetic Nought</title>
    <link>https://punchagan.muse-amuse.in/tags/github/</link>
    <description>Recent content in Github on Noetic Nought</description>
    <generator>Hugo</generator>
    <language>en-US</language>
    <copyright>© 2006-2026 CC-BY-SA-4.0</copyright>
    <lastBuildDate>Tue, 26 Apr 2022 12:37:00 +0530</lastBuildDate>
    <atom:link href="https://punchagan.muse-amuse.in/tags/github/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>GitHub Gists from Emacs Orgmode</title>
      <link>https://punchagan.muse-amuse.in/blog/ox-gist/</link>
      <pubDate>Tue, 26 Apr 2022 12:37:00 +0530</pubDate>
      <guid>https://punchagan.muse-amuse.in/blog/ox-gist/</guid>
      <description>&lt;p&gt;TL;DR: I released my first Emacs MELPA package &amp;ndash; &lt;a href=&#34;https://melpa.org/#/ox-gist&#34;&gt;ox-gist&lt;/a&gt; &amp;ndash; An Orgmode backend&#xA;to export and update sub-trees and buffers to GitHub gists.  It was a great&#xA;experience contributing to MELPA.&lt;/p&gt;&#xA;&lt;h2 id=&#34;motivation&#34;&gt;Motivation&lt;/h2&gt;&#xA;&lt;p&gt;I often share bits and pieces of my &lt;code&gt;journal.org&lt;/code&gt; file with others, mostly for&#xA;reading, some times for comments. The file contains different subtrees for each&#xA;day with subtrees for different topics, meetings, articles, etc.&lt;/p&gt;&#xA;&lt;p&gt;Orgmode lets you export subtrees to specific file names using the&#xA;&lt;code&gt;EXPORT_FILE_NAME&lt;/code&gt; property (and &lt;code&gt;FILE_NAME&lt;/code&gt; buffer export option when&#xA;exporting full buffers). It is easy to create these exported files on a&#xA;publicly accessible webserver using the power of &lt;a href=&#34;https://www.gnu.org/software/tramp/&#34;&gt;Emacs TRAMP mode&lt;/a&gt;.  For&#xA;instance, I often set the property to some thing like&#xA;&lt;code&gt;/ssh:muse-amuse.in:~/public_html/&amp;lt;filename&amp;gt;&lt;/code&gt; to publish stuff.&lt;/p&gt;&#xA;&lt;p&gt;But, exporting to HTML is a distraction some times because I start fiddling&#xA;with CSS and styling. Exporting to a simple org file doesn&amp;rsquo;t seem to cut it&#xA;because there&amp;rsquo;s no styling at all, and making longer exports hard to read in a&#xA;web-browser.  Exporting to a GitHub Gist is a nice middle ground because GitHub&#xA;renders Orgmode files reasonably well. Additionally, the comment functionality&#xA;is pretty handy.&lt;/p&gt;&#xA;&lt;p&gt;I could also directly use &lt;a href=&#34;https://github.com/defunkt/&#34;&gt;@defunkt&lt;/a&gt;&amp;rsquo;s excellent &lt;a href=&#34;https://github.com/defunkt/gist.el&#34;&gt;&lt;code&gt;gist.el&lt;/code&gt;&lt;/a&gt; to share stuff as&#xA;Gists.  I&amp;rsquo;ve used it in the past, and it works well when I don&amp;rsquo;t care about&#xA;having the contents of the Gist locally on my machine. It&amp;rsquo;s also quite easy to&#xA;update existing/old Gists in this scenario, since there&amp;rsquo;s a single &amp;ldquo;source of&#xA;truth&amp;rdquo; and &lt;code&gt;gist.el&lt;/code&gt; makes it quite easy to update Gists.&lt;/p&gt;&#xA;&lt;p&gt;But, this isn&amp;rsquo;t good enough when I want to have a &amp;ldquo;synced&amp;rdquo; copy of the text on&#xA;my machine.  Also, it doesn&amp;rsquo;t work very well when I want to share just a&#xA;subtree from my notes file, and not the entire file.  I&amp;rsquo;ve to export the&#xA;subtree to a temporary Orgmode buffer and then create a Gist from that buffer.&lt;/p&gt;&#xA;&lt;h2 id=&#34;hackish-wrapper-around-gist-dot-el&#34;&gt;Hackish wrapper around &lt;code&gt;gist.el&lt;/code&gt;&lt;/h2&gt;&#xA;&lt;p&gt;A couple or so years ago, I wrote a wrapper around &lt;code&gt;gist.el&lt;/code&gt; to let me post&#xA;Orgmode subtrees as a Gist and also update them when I edited these subtrees&#xA;locally.  There was no support for exporting entire buffers since that wasn&amp;rsquo;t&#xA;my use-case.  This wrapper code was just a part of my &lt;code&gt;.emacs&lt;/code&gt; and worked&#xA;reasonably well for me.&lt;/p&gt;&#xA;&lt;p&gt;A few weeks ago, I ended up procrastinating on writing and sharing notes for a&#xA;discussion with a friend, and extracted this wrapper as a separate package &amp;ndash;&#xA;&lt;code&gt;org2gist&lt;/code&gt; &amp;ndash; to make it easy for other people to use.&lt;/p&gt;&#xA;&lt;h2 id=&#34;melpa-submission-and-feedback&#34;&gt;MELPA submission and feedback&lt;/h2&gt;&#xA;&lt;p&gt;I &lt;a href=&#34;https://github.com/melpa/melpa/pull/7940&#34;&gt;submitted&lt;/a&gt; this as a package to &lt;a href=&#34;https://melpa.org/&#34;&gt;MELPA&lt;/a&gt; while being skeptical about whether it&#xA;would be accepted.  I wasn&amp;rsquo;t sure if my thin wrapper around &lt;code&gt;gist.el&lt;/code&gt; would&#xA;meet MELPA&amp;rsquo;s criteria for a &amp;ldquo;Reasonably innovative package&amp;rdquo;:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;MELPA provides a curated set of Emacs Lisp packages, not an exhaustive list&#xA;of every single Emacs Lisp file ever created. By default, MELPA maintainers&#xA;will reject packages that duplicate functionality provided by existing&#xA;packages. Please try to improve existing packages instead of creating new&#xA;ones when possible.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;It was a pleasant surprise to get very helpful reviews from the MELPA&#xA;maintainers.  They not only thought the package was good enough to include in&#xA;MELPA, but also looked at it&amp;rsquo;s code and gave great feedback &amp;mdash; not just basic&#xA;quality checks before accepting the package into MELPA.&lt;/p&gt;&#xA;&lt;p&gt;I&amp;rsquo;m pretty sure mainting a package repository like MELPA is a lot of work, but&#xA;as an end-user it mostly just worked for me and I never really gave it much&#xA;thought.  It was eye-opening to submit the package to MELPA and see first-hand&#xA;the care and effort the maintainers put into what goes into the repository.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://github.com/riscy/&#34;&gt;@riscy&lt;/a&gt; (a MELPA maintainer) &lt;a href=&#34;https://github.com/melpa/melpa/pull/7940#issuecomment-1080036663&#34;&gt;suggested&lt;/a&gt; a different approach that I hadn&amp;rsquo;t&#xA;thought of &amp;mdash; turning the wrapper into an &lt;a href=&#34;https://orgmode.org/manual/Exporting.html&#34;&gt;Orgmode Export backend&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;h2 id=&#34;current-version-ox-gist&#34;&gt;Current version: &lt;code&gt;ox-gist&lt;/code&gt;&lt;/h2&gt;&#xA;&lt;p&gt;It turned out to be a great idea which I ended up implementing.  The user&#xA;interface became much cleaner, since it used the Orgmode Export UI.  And it&#xA;also forced me to &amp;ldquo;complete&amp;rdquo; the feature-set by adding support for exporting&#xA;entire Orgmode buffers to GitHub Gists, not just subtrees.&lt;/p&gt;&#xA;&lt;p&gt;The package now adds an Orgmode export backend that lets you export a subtree&#xA;or the whole buffer as a GitHub Gist, similar to how you&amp;rsquo;d export to HTML or&#xA;LaTeX from Orgmode. The GitHub Gist ID is saved for each exported buffer or&#xA;subtree and is to update a Gist when re-exporting an already exported subtree&#xA;or buffer.&lt;/p&gt;&#xA;&lt;h2 id=&#34;outro&#34;&gt;Outro&lt;/h2&gt;&#xA;&lt;p&gt;The package has now been added to MELPA as &lt;a href=&#34;https://github.com/punchagan/ox-gist&#34;&gt;&lt;code&gt;ox-gist&lt;/code&gt;&lt;/a&gt;.  Feel free to give it a&#xA;spin and give feedback directly to me or on the &lt;a href=&#34;https://github.com/punchagan/ox-gist/issues&#34;&gt;issue tracker&lt;/a&gt;!&lt;/p&gt;&#xA;&lt;p&gt;I don&amp;rsquo;t know if anyone else would find the package useful and use it, though,&#xA;MELPA tells me that 20-odd people atleast downloaded it.  I&amp;rsquo;m happy this code&#xA;may be to a handful of people.&lt;/p&gt;&#xA;&lt;p&gt;Also, I now have a new found appreciation for MELPA and the work put into it by&#xA;the maintainers.  I&amp;rsquo;m glad I took the time out to submit this package to MELPA.&lt;/p&gt;&#xA;&lt;div style=&#34;font-size:small;&#34; class=&#34;reviewers&#34;&gt;&#xA;&lt;p&gt;Thanks to &lt;a href=&#34;http://baali.muse-amuse.in&#34;&gt;Shantanu&lt;/a&gt; for reading drafts and helping me restructure this post.&lt;/p&gt;&#xA;&lt;/div&gt;&#xA;</description>
    </item>
    <item>
      <title>Recurse Center, 2014-06-11</title>
      <link>https://punchagan.muse-amuse.in/recurse-center/recurse-center-2014-06-11/</link>
      <pubDate>Wed, 11 Jun 2014 15:02:11 -0400</pubDate>
      <guid>https://punchagan.muse-amuse.in/recurse-center/recurse-center-2014-06-11/</guid>
      <description>&lt;h2 id=&#34;plan&#34;&gt;Plan&lt;/h2&gt;&#xA;&lt;p&gt;Continue with the Haskell tutorials, with additional reading from&#xA;Real World Haskell.&lt;/p&gt;&#xA;&lt;h2 id=&#34;actual&#34;&gt;Actual&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Finished exercises 4 and 5.&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Learnt about Type classes in Haskell and how to create them and&#xA;make data types instances of them.&lt;/li&gt;&#xA;&lt;li&gt;Also came across a new algorithm of sieving called the &lt;a href=&#34;http://en.wikipedia.org/wiki/Sieve_of_Sundaram&#34;&gt;Sieve of&#xA;Sundaram&lt;/a&gt;, which was discovered by a student.  Surprisingly, I&#xA;never heard of it before!&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;miscellaneous&#34;&gt;Miscellaneous&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;A few of us had an interesting discussion about various places&#xA;people grew up in and visited, and the cultures, etc.&lt;/li&gt;&#xA;&lt;li&gt;Idea: implement a GitHub dashboard for organizations (say, HS&#xA;batches) that give you different statistics, and interesting&#xA;graphs. (Use elm?) [Update: Tom is working on HS and GitHub&#xA;integration. So, that&amp;rsquo;s perfect!]&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;</description>
    </item>
    <item>
      <title>GitHub Cue: Recommendations for GitHub Repos</title>
      <link>https://punchagan.muse-amuse.in/blog/github-cue-recommendations-for-github-repos/</link>
      <pubDate>Fri, 05 Aug 2011 00:00:00 +0530</pubDate>
      <guid>https://punchagan.muse-amuse.in/blog/github-cue-recommendations-for-github-repos/</guid>
      <description>&lt;p&gt;If you aren&amp;rsquo;t already aware of it, I&amp;rsquo;m one of those people who&#xA;goes around saying, &amp;ldquo;GitHub is my Facebook&amp;rdquo;.  I spend quite a lot&#xA;of time on GitHub, browsing the work of various people, looking at&#xA;loads of interesting stuff that people built.  I keep jumping&#xA;between people pages and projects using the Watchers/Watching &amp;amp;&#xA;Followers/Following pages.  This way, I do come across interesting&#xA;people and projects, but the SNR is too low.  I wanted a better&#xA;way to be able to see stuff, that I find interesting.  That&amp;rsquo;s how&#xA;the idea for this Chromium app &amp;ndash; GitHub Cue &amp;ndash; was born.&lt;/p&gt;&#xA;&lt;p&gt;@baali and I hacked on this, during the last few days and got it&#xA;working.  It works as follows, (from the README) &amp;mdash;&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Scrapes all the descriptions of the repositories being watched&#xA;by the user.&lt;/li&gt;&#xA;&lt;li&gt;Key terms are extracted from this description text using the&#xA;Yahoo Term Extractor.&lt;/li&gt;&#xA;&lt;li&gt;A list of languages is obtained, based on the languages of the&#xA;repositories, the user if watching.&lt;/li&gt;&#xA;&lt;li&gt;GitHub searches are performed for a combination of 3 randomly&#xA;chosen languages and 5 random key terms.&lt;/li&gt;&#xA;&lt;li&gt;10 random repositories out of all these, are shown.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;This is a very simplistic algorithm, but works decently for my&#xA;purposes.  Ideally, I would&amp;rsquo;ve liked to use a Collaborative&#xA;Filtering algorithm, but I found the data to be too sparse, and&#xA;the amount of computation to be too much to be done on the fly.  I&#xA;wasn&amp;rsquo;t really interested in pre-computing stuff and putting it&#xA;onto my server.  I settled down to the next best thing I could&#xA;think of.&lt;/p&gt;&#xA;&lt;p&gt;I would appreciate any further ideas and suggestions.  Thanks!&lt;/p&gt;&#xA;</description>
    </item>
  </channel>
</rss>
