Skip to content

Commit

Permalink
Jekyll.
Browse files Browse the repository at this point in the history
  • Loading branch information
ku1ik committed Sep 17, 2011
1 parent 5358eb2 commit 0b0e3ca
Show file tree
Hide file tree
Showing 91 changed files with 642 additions and 656 deletions.
4 changes: 1 addition & 3 deletions .gitignore
@@ -1,3 +1 @@
tmp
*.swp
.bundle
_site/*
1 change: 0 additions & 1 deletion .rvmrc

This file was deleted.

4 changes: 0 additions & 4 deletions Capfile

This file was deleted.

11 changes: 0 additions & 11 deletions Gemfile

This file was deleted.

40 changes: 0 additions & 40 deletions Gemfile.lock

This file was deleted.

5 changes: 5 additions & 0 deletions _config.yml
@@ -0,0 +1,5 @@
url: http://ku1ik.com
title: Odes of the Occult
author: Marcin Kulik
markdown: rdiscount
download_prefix: "http://dl.dropbox.com/u/12119988/blog"
File renamed without changes.
13 changes: 13 additions & 0 deletions _includes/disqus.html
@@ -0,0 +1,13 @@
<div id="disqus_thread"></div>
<script type="text/javascript">
/**
* var disqus_identifier; [Optional but recommended: Define a unique identifier (e.g. post id or slug) for this thread]
*/
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'http://sickill.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript=sickill">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">blog comments powered by <span class="logo-disqus">Disqus</span></a>
15 changes: 15 additions & 0 deletions _includes/head.html
@@ -0,0 +1,15 @@
<title>{% if page.title %}{{ page.title }} - {% endif %}Odes of the Occult</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="description" content="{% if page.id %}{{ page.title }}{% else %}Personal blog of Marcin Kulik, curious software developer and open-source addict{% endif %}" />
<meta name="keywords" content="marcin kulik, mkulik, sickill, blog, programming, ruby, {{ page.tags | join:', '}}" />
<link rel="alternate" type="application/atom+xml" title="Atom" href="http://feeds.feedburner.com/SickillNet" />
<link rel="stylesheet" href="/stylesheets/reset.css" type="text/css" />
<link rel="stylesheet" href="/stylesheets/main.css" type="text/css" />
<link rel="stylesheet" href="/stylesheets/jquery.lightbox-0.5.css" type="text/css" />
<link rel="shortcut icon" href="/favicon.ico">
<link rel="openid.server" href="http://www.myopenid.com/server" />
<link rel="openid.delegate" href="http://sickill.myopenid.com/" />
<meta http-equiv="X-XRDS-Location" content="http://www.myopenid.com/xrds?username=sickill.myopenid.com" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="/javascripts/sickill.js"></script>
<script type="text/javascript" src="/javascripts/jquery.lightbox-0.5.pack.js"></script>
4 changes: 4 additions & 0 deletions _includes/post_link.html
@@ -0,0 +1,4 @@
<li>
<a href="{{ post.url }}">{{ post.title }}</a>
[{{ post.date | date:'%Y/%m/%d' }}]
</li>
6 changes: 6 additions & 0 deletions _includes/post_tags.html
@@ -0,0 +1,6 @@
{% unless page.tags == empty %}
<div class="tags">
Read more about
{{ page.tags | sort | collect: '<a href="/topics/[item]">[item]</a>' | join: ', ' }}.
</div>
{% endunless %}
1 change: 1 addition & 0 deletions _includes/post_years.html
@@ -0,0 +1 @@
{{ site.posts | map:'date' | map:'year' | uniq | sort | collect: '<a href="/[item]/">[item]</a> ' }}
36 changes: 36 additions & 0 deletions _layouts/default.html
@@ -0,0 +1,36 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
{% include head.html %}
</head>
<body {% if page.id %}class="post"{% endif %}>
<div id="container" class="centered">

<div id="header">
{% if page.url != '/index.html' %}
<a href="/" class="home" title="Go home!">&#x21E7;</a>
{% endif %}
<div class="logo"> <a href="/me" title="Who's Marcin?">MARCIN KULIK</a>'S: </div>
</div>

<div id="content">
{{ content }}
</div>

</div>

{% if page.id %}
<div id="lower">
<div class="comments centered">
{% include disqus.html %}
</div>
</div>
{% endif %}

<div id="footer" class="centered">
Browse through archives: {% include post_years.html %}
</div>

{% include analytics.html %}
</body>
</html>
17 changes: 17 additions & 0 deletions _layouts/post.html
@@ -0,0 +1,17 @@
---
layout: default
---

<div class="post">
<div class="header">
<h2>"{{ page.title }}"</h2>
<p class="date">{{ page.date | date:'%B %d, %Y' }}</p>
{% if page.img %}
<img src="{{ page.img | replace:'\_','_' }}" />
{% endif %}
</div>
<div class="body">
{{ content }}
</div>
{% include post_tags.html %}
</div>
15 changes: 15 additions & 0 deletions _layouts/post_list.html
@@ -0,0 +1,15 @@
---
layout: default
---

<h2>{{ page.header }}</h2>

<ul class="post-list">
{{ content }}
</ul>

{% if page.url == '/index.html' %}
<p class="rss-feed">
<a href="http://feeds.feedburner.com/SickillNet" class="feed">Subscribe via RSS</a>
</p>
{% endif %}
10 changes: 10 additions & 0 deletions _layouts/tag_index.html
@@ -0,0 +1,10 @@
---
layout: post_list
header: writings on <em>{{subject}}</em>
---

{% for post in site.posts %}
{% if post.tags contains page.subject %}
{% include post_link.html %}
{% endif %}
{% endfor %}
10 changes: 10 additions & 0 deletions _layouts/year_index.html
@@ -0,0 +1,10 @@
---
layout: post_list
header: Year <em>{{subject}}</em>
---

{% for post in site.posts %}
{% if page.subject == post.date_year %}
{% include post_link.html %}
{% endif %}
{% endfor %}
23 changes: 23 additions & 0 deletions _plugins/ext.rb
@@ -0,0 +1,23 @@
module Jekyll

# monkey-patched to add date_year

class Post
# Convert this post into a Hash for use in Liquid templates.
#
# Returns <Hash>
def to_liquid
self.data.deep_merge({
"title" => self.data["title"] || self.slug.split('-').select {|w| w.capitalize! || w }.join(' '),
"url" => self.url,
"date" => self.date,
"date_year" => self.date.year,
"id" => self.id,
"categories" => self.categories,
"next" => self.next,
"previous" => self.previous,
"tags" => self.tags,
"content" => self.content })
end
end
end
16 changes: 16 additions & 0 deletions _plugins/filters.rb
@@ -0,0 +1,16 @@
module Sickill
module Filters

def uniq(arg)
arg.uniq
end

def collect(items, pattern)
[*items].map do |item|
pattern.gsub('[item]', item.to_s)
end
end
end
end

Liquid::Template.register_filter(Sickill::Filters)
43 changes: 43 additions & 0 deletions _plugins/index_generators.rb
@@ -0,0 +1,43 @@
module Jekyll

class IndexGenerator < Generator
safe true

def generate(site)
if site.layouts.key? 'year_index'
site.posts.map { |p| p.date.year }.uniq.each do |year|
write_index(site, year.to_s, year, 'year_index.html')
end
end

if site.layouts.key? 'tag_index'
site.tags.keys.each do |tag|
write_index(site, File.join('topics', tag.to_s), tag, 'tag_index.html')
end
end
end

def write_index(site, dir, subject, template_name)
index = IndexPage.new(site, site.source, dir, subject, template_name)
index.render(site.layouts, site.site_payload)
index.write(site.dest)
site.pages << index
end

class IndexPage < Page
def initialize(site, base, dir, subject, template_name)
@site = site
@base = base
@dir = dir
@name = 'index.html'

self.process(@name)
self.read_yaml(File.join(base, '_layouts'), template_name)
self.data['header'].gsub!('{{subject}}', subject.to_s) if data['header']
self.data['subject'] = subject
self.data['title'] = subject
end
end
end

end
@@ -1,6 +1,12 @@
---
title: Textmate to JEdit Colour Theme Converter
date: 2009-01-20 20:48
tags: jedit, ruby, textmate, tm2jed
layout: post
tags:
- jedit
- ruby
- textmate
- tm2jed
---

"JEdit":http://www.jedit.org/ was my favourite code editor for a long time and I was polishing its configuration constantly to make it perfect. It has lots of great plugins which make it rather feature complete for me. As I'm working with the code 8+ hours a day I also need some nice colour scheme for my code. "EditorScheme":http://www.rutherfurd.net/jedit/plugins/editorscheme/index.html plugin adds support for changing schemes in JEdit and it's bundled with several schemes. Unfortunately I couldn't find a scheme which suits me...

Expand All @@ -11,7 +17,7 @@ Following screenshots show how JEdit look with Twilight, Glow, Plastic Code Wrap
<p class="images"><a href="http://farm4.static.flickr.com/3336/3212716915_6e4428123c_o.png" title="jedit with twilight theme"><img src="http://farm4.static.flickr.com/3336/3212716915_6f07a215ae_m.jpg" width="240" height="168" alt="jedit with twilight theme" class="left" /></a><a href="http://farm4.static.flickr.com/3528/3212715259_010a3e0952_o.png" title="jedit with glow theme"><img src="http://farm4.static.flickr.com/3528/3212715259_d78b494e99_m.jpg" width="240" height="168" alt="jedit with glow theme" class="left" /></a><a href="http://farm4.static.flickr.com/3421/3212716391_b82ce1e231_o.png" title="jedit with plastic-code-wrap theme"><img src="http://farm4.static.flickr.com/3421/3212716391_ba897a3bd5_m.jpg" width="240" height="168" alt="jedit with plastic-code-wrap theme" class="left" /></a><a href="http://farm4.static.flickr.com/3476/3213562148_299d3808b2_o.png" title="jedit with glitter-bomb theme"><img src="http://farm4.static.flickr.com/3476/3213562148_1d8401bf5b_m.jpg" width="240" height="168" alt="jedit with glitter-bomb theme" class="left" /></a></p>
<!-- <div class="clear"></div> -->

You can get tm2jed <%= download_link "here", "tm2jed.zip" %> (as zip archive). Alternatively you can get it from "github":http://github.com/sickill/tm2jed/tree/master.
You can get tm2jed "here":https://github.com/downloads/sickill/tm2jed/tm2jed.zip (as zip archive). Alternatively you can get it from "github":http://github.com/sickill/tm2jed/tree/master.

Once you have it, run:

Expand All @@ -21,4 +27,4 @@ It will save converted theme as <em>some_textmate_theme.jedit-scheme</em> which

Conversion is not perfect as JEdit and Textmate implement theming in different way but for most cases it works fine.

I've converted 16 Textmate themes so if you don't want to mess with tm2jed you can grab them <%= download_link "here", "jedit-sickill-themes.zip" %> in one zip file. It contains Cool Glow, Monokai, Starlight, Texari, idleFingers, Glitter Bomb, Plastic Code Wrap, Succulent, Twilight, Monoindustrial, Glow, RubyBlue, Sunburst, Vibrant Ink, IR_Black, Spectacular, Tango and Choco themes.
I've converted 16 Textmate themes so if you don't want to mess with tm2jed you can grab them "here":https://github.com/downloads/sickill/tm2jed/jedit-sickill-themes.zip in one zip file. It contains Cool Glow, Monokai, Starlight, Texari, idleFingers, Glitter Bomb, Plastic Code Wrap, Succulent, Twilight, Monoindustrial, Glow, RubyBlue, Sunburst, Vibrant Ink, IR_Black, Spectacular, Tango and Choco themes.
@@ -1,6 +1,11 @@
---
title: Open File Fast - Netbeans plugin for quick opening project files
date: 2009-02-26 23:36
tags: netbeans, off, textmate
layout: post
tags:
- netbeans
- 'off'
- textmate
---

Textmate has nice feature which is a real timesaver. It's quick open file dialog. You can type only several characters of filename you are searching for and you get list of all files matching your pattern. When you are looking for FooBar.java you can type _fbj_ and you will find it. It really helps navigating through the project (especially bigger ones).

Expand Down Expand Up @@ -47,7 +52,7 @@ Open File Fast can be set up to your own preferences and to match your own workf

<p class="images"><%= image("http://farm4.static.flickr.com/3567/3311489750_d487b3da51_m.jpg", "http://farm4.static.flickr.com/3567/3311489750_306e760e2e_o.png") %></p>

Grab it here: <%= download_link "off-netbeans-0.9.3.nbm" %>. If you want to help or just look into sources they're on "github":http://github.com/sickill/off-plugin/tree/master .
Grab it here: "off-netbeans-0.9.3.nbm":https://github.com/downloads/sickill/off-plugin/off-netbeans-0.9.3.nbm". If you want to help or just look into sources they're on "github":http://github.com/sickill/off-plugin/tree/master .
This is the first public version of this plugin so it could have some bugs, however we've been using it for a while now with my workmates and nothing exploded yet :)

*Update:* for most recent version of plugin go to "OFF project page":/projects/off .
@@ -1,9 +1,13 @@
---
title: Open File Fast 0.9.1
date: 2009-03-10 21:34
tags: netbeans, off
layout: post
tags:
- netbeans
- 'off'
---

Here is a quick update for Open File Fast plugin.

I've noticed (and also got some feedback about it in anouncement comments) that switching projects when OFF is installed is slower than without plugin and Joe Rafaniello who is using it noticed some problems when using OFF with big projects. After a little investigation (with Joe's help) it appeared that events about project switching which OFF uses for reindexing project files are being sent by Netbeans in the UI thread and this was the cause of the slowdown.

I've moved indexing into separate thread and this solved the problem. So here is improved OFF: <%= download_link "off-netbeans-0.9.1.nbm" %>.
I've moved indexing into separate thread and this solved the problem. So here is improved OFF: "off-netbeans-0.9.1.nbm":https://github.com/downloads/sickill/off-plugin/off-netbeans-0.9.1.nbm".
@@ -1,6 +1,12 @@
---
title: Colorizing console output with Rainbow ruby gem
date: 2009-03-24 22:20:50
tags: console, gem, rainbow, ruby
layout: post
tags:
- console
- gem
- rainbow
- ruby
---

If you're working on some cool ruby console-based application or just want to add a little style to your script here is a nice gem for you. It's called *Rainbow* and it extends ruby String class adding methods to wrap the string with "ANSI escape codes":http://en.wikipedia.org/wiki/ANSI_escape_code.

Expand Down

0 comments on commit 0b0e3ca

Please sign in to comment.