Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

added tagging ability to site and new posts

  • Loading branch information...
commit e8acc143134628cfebbddf2bc87be995323d2a1e 1 parent 9e223fd
Brian Muller authored
1  _includes/postitem.markdown
Source Rendered
... ... @@ -0,0 +1 @@
  1 +<li><a href="{{ post.id }}.html">{{ post.title }}</a><span id="date">posted {{ post.date | date: "%m.%d.%Y" }}{% include tags.markdown %}</span></li>
10 _includes/tags.markdown
Source Rendered
... ... @@ -0,0 +1,10 @@
  1 +{% if page.categories.size > 0 %}
  2 +to {% for cat in page.categories %}
  3 +<a href="/tags.html#{{ cat }}">{{ cat | replace:'_',' ' }}</a>{% if forloop.last == false %}, {% endif %}
  4 +{% endfor %}
  5 +{% endif %}
  6 +{% if post.categories.size > 0 %}
  7 +to {% for cat in post.categories %}
  8 +<a href="/tags.html#{{ cat }}">{{ cat | replace:'_',' ' }}</a>{% if forloop.last == false %}, {% endif %}
  9 +{% endfor %}
  10 +{% endif %}
7 _layouts/base.html
@@ -27,9 +27,10 @@
27 27 <div id="menu">
28 28 <ul>
29 29 <li><a href="/">blog</a></li>
30   - <li><a href="/projects">projects</a></li>
31   - <li><a href="/about">about</a></li>
32   - <li><a href="/archive">archive</a></li>
  30 + <li><a href="/tags.html">tags</a></li>
  31 + <li><a href="/projects.html">projects</a></li>
  32 + <li><a href="/about.html">about</a></li>
  33 + <li><a href="/archive.html">archive</a></li>
33 34 </ul>
34 35 </div>
35 36 </div>
2  _layouts/post.html
@@ -2,7 +2,7 @@
2 2 layout: base
3 3 ---
4 4 <h1>{{page.title}}</h1>
5   -<span id="date">Posted {{ page.date | date_to_string }} and has <a href="{{ page.url }}#disqus_thread">Comments</a></span>
  5 +<span id="date">Posted {{ page.date | date_to_string }}{% include tags.markdown %}and has <a href="{{ page.url }}#disqus_thread">Comments</a></span>
6 6 {{ content }}
7 7 <div id="disqus_thread"></div>
8 8 <script type="text/javascript">
1  _posts/2010-10-27-config-template-class.markdown
Source Rendered
... ... @@ -1,6 +1,7 @@
1 1 ---
2 2 layout: post
3 3 title: Generating Config Files Per Environment
  4 +categories: [linux, sysadmin, ruby]
4 5 ---
5 6 Lately I've been writing scripts to automate the deployment of a [Hadoop](http://hadoop.apache.org) cluster at [LivingSocial](http://livingsocial.com).
6 7 One of the problems I've run into is that there are many, many config files which often contain some of the same values in others and which need
1  _posts/2010-10-29-mod_auth_openid-moved-to-github.markdown
Source Rendered
... ... @@ -1,6 +1,7 @@
1 1 ---
2 2 layout: post
3 3 title: mod_auth_openid Moved to Github
  4 +category: [mod_auth_openid]
4 5 ---
5 6 I've now moved the whole mod_auth_openid to git and Github. All project info can now be found at
6 7 [http://findingscience.com/mod_auth_openid](http://findingscience.com/mod_auth_openid). Now to
1  _posts/2010-10-30-march-to-keep-fear-alive-highlights.markdown
Source Rendered
... ... @@ -1,6 +1,7 @@
1 1 ---
2 2 layout: post
3 3 title: March to Keep Fear Alive Highlights
  4 +categories: [photos]
4 5 ---
5 6 I went to the [March to Keep Fear Alive](http://www.keepfearalive.com) today and took some great shots of some of
6 7 the fellow marchers. The highlights are below, and all the pictures can be found [on flickr](http://www.flickr.com/photos/bmuller/tags/keepfearalive/).
1  _posts/2010-11-28-no-more-durian.markdown
Source Rendered
... ... @@ -1,6 +1,7 @@
1 1 ---
2 2 layout: post
3 3 title: No More Durian
  4 +categories: [photos]
4 5 ---
5 6 <div class="floatleft">
6 7 <img src="http://farm5.static.flickr.com/4091/5216272876_69387a8c2b_m.jpg" alt="durian" />
1  _posts/2010-11-28-os-x-say-command-on-linux.markdown
Source Rendered
... ... @@ -1,6 +1,7 @@
1 1 ---
2 2 layout: post
3 3 title: OS X Say Command on Linux
  4 +categories: [linux, os_x]
4 5 ---
5 6 So all the cool cats on Macs think they're the only ones who can make their computers talk with the
6 7 [say command](http://guides.macrumors.com/say). Now, Linux users too can have this power using an unpublished
1  _posts/2010-12-02-naive-bayes-classification-in-ruby-using-hadoop-and-hbase.markdown
Source Rendered
... ... @@ -1,6 +1,7 @@
1 1 ---
2 2 layout: post
3 3 title: Naive Bayes Classification in Ruby using Hadoop and HBase
  4 +categories: [ankusa, hbase, hadoop, ruby]
4 5 ---
5 6 One of the problems I've run into recently at work is that we have quite a bit of text that needs to be classified. My first thought was to use one of the simplest classification methods, a [naive bayes classifier](http://en.wikipedia.org/wiki/Naive_Bayes_classifier). I couldn't find anything that could possibly handle many terabytes of data, though. Most Ruby implementations, like [the classifier gem](https://github.com/cardmagic/classifier), have only a simplistic implementation (for instance, the classifier gem doesn't actually provide a true naive bayes implementation in that it ignores [prior probabilities](http://en.wikipedia.org/wiki/Prior_probability)). I decided to create a better naive bayes implementation (for instance, using a [Laplacian smoother](http://en.wikipedia.org/wiki/Laplacian_smoothing)) that could also handle up to many terabytes of corpus data.
6 7
1  _posts/2010-12-10-kl-divergence-classification-with-ankusa-on-hadoop-hbase.markdown
Source Rendered
... ... @@ -1,6 +1,7 @@
1 1 ---
2 2 layout: post
3 3 title: KL Divergence Classification with Ankusa on Hadoop/HBase
  4 +categories: [ankusa, hadoop, hbase]
4 5 ---
5 6 I [recently posted](/2010/12/02/naive-bayes-classification-in-ruby-using-hadoop-and-hbase.html) a description of a new text classification project called [ankusa](https://github.com/livingsocial/ankusa). I decided to add a new classification method in addition to the [naive bayes classifier](http://en.wikipedia.org/wiki/Naive_Bayes_classifier) to provide an alternative method of differentiation. I've used it before for determining [semantic distance](http://en.wikipedia.org/wiki/Semantic_similarity) between different categories of text and thought it could be useful here, especially under the right conditions.
6 7
24 _posts/2010-12-11-command-line-posting-to-identi.ca.markdown
Source Rendered
... ... @@ -0,0 +1,24 @@
  1 +---
  2 +layout: post
  3 +title: Command Line Posting to Identi.ca
  4 +categories: [identi.ca]
  5 +date: 2010-12-11 14:31
  6 +---
  7 +I looked around for a simple command line program to post to [identi.ca](http://identi.ca) but I couldn't find one that:
  8 + 1. worked
  9 + 1. auto-shortened URL's
  10 + 1. was executable and not a giant overkill library
  11 +
  12 +Naturally, I then threw something simple together in Python (script below). The script will auto-shorten URL's (using [ur.ly](http://ur.ly), which seemed to have the simplest API) and doesn't require quoting your post. After putting your username/password at the top of the file:
  13 +
  14 +{% highlight bash %}
  15 +$> ./status This is an example post with a url in it http://google.com
  16 +Posted: This is an example post with a url in it http://ur.ly/Q
  17 +{% endhighlight %}
  18 +
  19 +## The Code
  20 +<script src="https://gist.github.com/737553.js">
  21 +</script>
  22 +
  23 +
  24 +
2  _posts/2010-12-11-version-0.6-of-apache-mod_auth_openid-released.markdown
Source Rendered
... ... @@ -1,6 +1,8 @@
1 1 ---
2 2 layout: post
3 3 title: Version 0.6 of Apache mod_auth_openid Released
  4 +date: 2010-12-11 12:00
  5 +categories: [apache, mod_auth_openid]
4 6 ---
5 7 Just made another release of the [mod_auth_openid](http://findingscience.com/mod_auth_openid) Apache module. There are a number of changes in this release, notably the fact that it is now an actual authentication module (using the ap_hook_check_user_id hook). This means that rather than using the old ghetto syntax of explicitly enabling the module with a configuration option, you can now just specify that you want an authentication type of openid:
6 8 {% highlight apache %}
0  about/index.html → about.html
File renamed without changes
6 archive/index.markdown → archive.markdown
Source Rendered
@@ -3,8 +3,10 @@ layout: base
3 3 title: findingscience.com
4 4 ---
5 5 # Archived Posts
6   -{% for post in site.posts offset: 0 limit: 5 %}
7   - * {{ post.date | date_to_string }} [{{post.title}}]({{post.id}}.html)
  6 +<ul>
  7 +{% for post in site.posts offset: 0 %}
  8 +{% include postitem.markdown %}
8 9 {% endfor %}
  10 +</ul>
9 11
10 12 Older stuff can be found on the [old archive site](/blog/archives.html).
2  css/stylesheet.css
@@ -80,7 +80,7 @@ div#content, div#footer
80 80 color: #333;
81 81 }
82 82
83   -div#content span#date {
  83 +div#content span#date, div#content span#tags {
84 84 font-size: 0.8em;
85 85 margin-left: 5px;
86 86 color: #aaa;
2  index.markdown
Source Rendered
@@ -10,7 +10,7 @@ title: "FindingScience.com : a blog about startup tech and gallimaufry"
10 10
11 11 {% for post in site.posts offset: 0 limit: 5 %}
12 12 # [{{post.title}}]({{post.id}}.html)
13   -<span id="date">Posted {{ post.date | date_to_string }} and has <a href="{{ post.id }}.html#disqus_thread">Comments</a></span>
  13 +<span id="date">Posted {{ post.date | date_to_string }}{% include tags.markdown %}and has <a href="{{ post.id }}.html#disqus_thread">Comments</a></span>
14 14 {{ post.content }}
15 15 <span class="padding"></span>
16 16 {% endfor %}
1  newpost.sh
@@ -3,5 +3,6 @@ FILE=./_posts/$(date +%F)-$(echo $1 | tr [A-Z] [a-z] | sed -e 's/ /-/g' | sed -e
3 3 echo "---" > $FILE
4 4 echo "layout: post" >> $FILE
5 5 echo "title: $1" >> $FILE
  6 +echo "date: $(date +"%F %H:%M")" >> $FILE
6 7 echo "---" >> $FILE
7 8 emacs -nw $FILE
0  projects/index.markdown → projects.markdown
File renamed without changes
17 tags.markdown
Source Rendered
... ... @@ -0,0 +1,17 @@
  1 +---
  2 +layout: base
  3 +title: "FindingScience.com : categories"
  4 +---
  5 +# Posts by Tag
  6 +{% for cat in site.categories | sort %}
  7 +{% capture tag %}{{ cat | first }}{% endcapture %}
  8 +<a name="{{ tag }}">
  9 +</a>
  10 +## {{ tag | replace:'_',' ' }}
  11 +<ul>
  12 +{% for post in site.categories[tag] %}
  13 +{% include postitem.markdown %}
  14 +{% endfor %}
  15 +</ul>
  16 +{% endfor %}
  17 +

0 comments on commit e8acc14

Please sign in to comment.
Something went wrong with that request. Please try again.