Skip to content

Commit 54d66f9

Browse files
committed
remove more boilerplate
1 parent 52d91f9 commit 54d66f9

File tree

353 files changed

+32
-1042
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

353 files changed

+32
-1042
lines changed

README.md

-4
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,9 @@ the naming scheme `YYYY-MM-DD-title.{html,md}` with the appropriate
4646
```markdown
4747
---
4848
categories: [example]
49-
category: archives
50-
layout: post
5149
tags: [example]
5250
title: Minimal post example
5351
---
54-
{% include JB/setup %}
55-
5652
This is a minimal post.
5753
```
5854

_config.yml

+14-41
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,35 @@
1-
# This is the default format.
2-
# For more see: https://github.com/mojombo/jekyll/wiki/Permalinks
31
permalink: /:categories/:year/:month/:day/:title
42

53
exclude: ["README.md"]
64

75
# Themes are encouraged to use these universal variables
86
# so be sure to set them if your theme uses them.
97
#
10-
title : bob.ippoli.to
8+
title: bob.ippoli.to
119
tagline: "Bob Ippolito (@etrepum) on Haskell, Python, Erlang, JavaScript, etc."
12-
author :
13-
name : Bob Ippolito
14-
15-
github : etrepum
16-
twitter : etrepum
10+
author:
11+
name: Bob Ippolito
12+
13+
github: etrepum
14+
twitter: etrepum
1715
services:
1816
google_analytics: 'UA-30504730-1'
1917
disqus: 'fromfutureimport'
18+
defaults:
19+
- scope:
20+
path: ""
21+
type: "post"
22+
values:
23+
layout: "post"
24+
category: 'archives'
2025

21-
# The production_url is only used when full-domain names are needed
22-
# such as sitemap.txt
23-
# Most places will/should use BASE_PATH to make the urls
24-
#
25-
# If you have set a CNAME (pages.github.com) set your custom domain here.
26-
# Else if you are pushing to username.github.com, replace with your username.
27-
# Finally if you are pushing to a GitHub project page, include the project name at the end.
28-
#
29-
production_url : http://bob.ippoli.to
26+
production_url: http://bob.ippoli.to
3027

3128
# All Jekyll-Bootstrap specific configurations are namespaced into this hash
3229
#
3330
JB :
3431
version : 0.2.13
3532

36-
# All links will be namespaced by BASE_PATH if defined.
37-
# Links in your website should always be prefixed with {{BASE_PATH}}
38-
# however this value will be dynamically changed depending on your deployment situation.
39-
#
40-
# CNAME (http://yourcustomdomain.com)
41-
# DO NOT SET BASE_PATH
42-
# (urls will be prefixed with "/" and work relatively)
43-
#
44-
# GitHub Pages (http://username.github.com)
45-
# DO NOT SET BASE_PATH
46-
# (urls will be prefixed with "/" and work relatively)
47-
#
48-
# GitHub Project Pages (http://username.github.com/project-name)
49-
#
50-
# A GitHub Project site exists in the `gh-pages` branch of one of your repositories.
51-
# REQUIRED! Set BASE_PATH to: http://username.github.com/project-name
52-
#
53-
# CAUTION:
54-
# - When in Localhost, your site will run from root "/" regardless of BASE_PATH
55-
# - Only the following values are falsy: ["", null, false]
56-
# - When setting BASE_PATH it must be a valid url.
57-
# This means always setting the protocol (http|https) or prefixing with "/"
58-
BASE_PATH : false
59-
6033
# By default, the asset_path is automatically defined relative to BASE_PATH plus the enabled theme.
6134
# ex: [BASE_PATH]/assets/themes/[THEME-NAME]
6235
#

_includes/JB/pages_list

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ Usage:
2727
{% if node.title != null %}
2828
{% if group == null or group == node.group %}
2929
{% if page.url == node.url %}
30-
<li class="active"><a href="{{ BASE_PATH }}{{node.url}}" class="active">{{node.title}}</a></li>
30+
<li class="active"><a href="{{node.url}}" class="active">{{node.title}}</a></li>
3131
{% else %}
32-
<li><a href="{{ BASE_PATH }}{{node.url}}">{{node.title}}</a></li>
32+
<li><a href="{{node.url}}">{{node.title}}</a></li>
3333
{% endif %}
3434
{% endif %}
3535
{% endif %}

_includes/JB/posts_collate

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Usage:
3232
<ul>
3333
{% endif %}
3434

35-
<li><span>{{ post.date | date: "%B %e, %Y" }}</span> &raquo; <a href="{{ BASE_PATH }}{{ post.url }}">{{ post.title }}</a></li>
35+
<li><span>{{ post.date | date: "%B %e, %Y" }}</span> &raquo; <a href="{{ post.url }}">{{ post.title }}</a></li>
3636

3737
{% if forloop.last %}
3838
</ul>

_includes/JB/setup

+4-16
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,9 @@
22
<!--
33
- Dynamically set liquid variables for working with URLs/paths
44
-->
5-
{% if site.JB.setup.provider == "custom" %}
6-
{% include custom/setup %}
5+
{% if site.JB.ASSET_PATH %}
6+
{% assign ASSET_PATH = site.JB.ASSET_PATH %}
77
{% else %}
8-
{% if site.safe and site.JB.BASE_PATH and site.JB.BASE_PATH != '' %}
9-
{% assign BASE_PATH = site.JB.BASE_PATH %}
10-
{% assign HOME_PATH = site.JB.BASE_PATH %}
11-
{% else %}
12-
{% assign BASE_PATH = nil %}
13-
{% assign HOME_PATH = "/" %}
14-
{% endif %}
15-
16-
{% if site.JB.ASSET_PATH %}
17-
{% assign ASSET_PATH = site.JB.ASSET_PATH %}
18-
{% else %}
19-
{% capture ASSET_PATH %}{{ BASE_PATH }}/assets/themes/{{ page.theme.name }}{% endcapture %}
20-
{% endif %}
21-
{% endif %}
8+
{% capture ASSET_PATH %}/assets/themes/{{ page.theme.name }}{% endcapture %}
9+
{% endif %}
2210
{% endcapture %}{% assign jbcache = nil %}

_includes/JB/tags_list

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ Usage:
2222
{% else %}
2323
{% if tags_list.first[0] == null %}
2424
{% for tag in tags_list %}
25-
<li><a href="{{ BASE_PATH }}{{ site.JB.tags_path }}#{{ tag | cgi_escape }}-ref">{{ tag }} <span>{{ site.tags[tag].size }}</span></a></li>
25+
<li><a href="{{ site.JB.tags_path }}#{{ tag | cgi_escape }}-ref">{{ tag }} <span>{{ site.tags[tag].size }}</span></a></li>
2626
{% endfor %}
2727
{% else %}
2828
{% for tag in tags_list %}
29-
<li><a href="{{ BASE_PATH }}{{ site.JB.tags_path }}#{{ tag[0] | cgi_escape }}-ref">{{ tag[0] }} <span>{{ tag[1].size }}</span></a></li>
29+
<li><a href="{{ site.JB.tags_path }}#{{ tag[0] | cgi_escape }}-ref">{{ tag[0] }} <span>{{ tag[1].size }}</span></a></li>
3030
{% endfor %}
3131
{% endif %}
3232
{% endif %}

_includes/themes/ostrich/default.html

+6-9
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,9 @@
1212
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
1313
<![endif]-->
1414

15-
<link href="{{ BASE_PATH }}/feed.atom" rel="alternate" type="application/atom+xml">
16-
<!--
17-
<link href="{{ BASE_PATH }}/rss.xml" rel="alternate" type="application/rss+xml">
18-
-->
19-
<link href="{{ ASSET_PATH }}/css/style.css" rel="stylesheet" type="text/css" media="all">
20-
<link href="{{ ASSET_PATH }}/css/shCoreMochi.css" rel="stylesheet" type="text/css" media="all">
15+
<link href="/feed.atom" rel="alternate" type="application/atom+xml">
16+
<link href="/assets/css/style.css" rel="stylesheet" type="text/css" media="all">
17+
<link href="/assets/css/shCoreMochi.css" rel="stylesheet" type="text/css" media="all">
2118

2219
<!-- Le fav and touch icons -->
2320
<!-- Update these with your own images
@@ -31,7 +28,7 @@
3128
<body>
3229
<header class="site">
3330
<div class="centered-container">
34-
<div class="brand"><a class="brand" href="{{ HOME_PATH }}">{{ site.title }}</a></div>
31+
<div class="brand"><a class="brand" href="/">{{ site.title }}</a></div>
3532
<div class="tagline"><span class="tagline">Bob Ippolito (<a href="http://twitter.com/etrepum" target="_blank" title="etrepum">@etrepum</a>) on Haskell, Python, Erlang, JavaScript, etc.</span></div>
3633
</div><!-- .centered-container -->
3734
</header>
@@ -62,7 +59,7 @@
6259
</footer>
6360

6461
{% include services/google_analytics.html %}
65-
<script src="{{ ASSET_PATH }}/js/jquery-1.7.2.min.js"></script>
66-
<script src="{{ ASSET_PATH }}/js/main.js"></script>
62+
<script src="/assets/js/jquery-1.7.2.min.js"></script>
63+
<script src="/assets/js/main.js"></script>
6764
</body>
6865
</html>

_includes/themes/ostrich/post.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<article>
2-
<a href="{{ BASE_PATH }}{{ page.url }}" title="{{ page.title }}" class="permalink">
2+
<a href="{{ page.url }}" title="{{ page.title }}" class="permalink">
33
# <time datetime="{{ page.date | date_to_xmlschema }}">{{ page.date | date_to_long_string }}</time>
44
</a>
55
<div class="hide"> « </div><!-- wrapper to make content look better on FB -->
@@ -19,10 +19,10 @@ <h1>{{ page.title }}</h1>
1919
<nav class="pagination">
2020
<ul>
2121
{% if page.previous %}
22-
<li class="prev"><a href="{{ BASE_PATH }}{{ page.previous.url }}" title="{{ page.previous.title }}">&larr; Previous</a></li>
22+
<li class="prev"><a href="{{ page.previous.url }}" title="{{ page.previous.title }}">&larr; Previous</a></li>
2323
{% endif %}
2424
{% if page.next %}
25-
<li class="next"><a href="{{ BASE_PATH }}{{ page.next.url }}" title="{{ page.next.title }}">Next &rarr;</a></li>
25+
<li class="next"><a href="{{ page.next.url }}" title="{{ page.next.title }}">Next &rarr;</a></li>
2626
{% endif %}
2727
</ul>
2828
</nav>

_layouts/default.html

-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@
22
theme :
33
name : ostrich
44
---
5-
{% include JB/setup %}
65
{% include themes/ostrich/default.html %}

_layouts/page.html

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
---
22
layout: default
33
---
4-
{% include JB/setup %}
54
{% include themes/ostrich/page.html %}

_layouts/post.html

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
---
22
layout: default
33
---
4-
{% include JB/setup %}
54
{% include themes/ostrich/post.html %}

_posts/2003-11-08-yet-another-line-ending-conversion-program.html

-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
---
22
categories: [python]
3-
category: archives
4-
layout: post
53
tags: [python]
64
title: Yet Another Line Ending Conversion Program
75
---
8-
{% include JB/setup %}
9-
106
<!-- -*- mode: rst -*- -->
117
<!-- original id: P4 -->
128
<p>This is what I've been using.. it's really simple, and should convert Win32, Mac, or Unix line endings to whatever your native line ending is. A possible future optimization would be to use temp files instead, but they're annoying.</p>

_posts/2003-11-10-making-docutils-do-python-syntax-highlighting-for-html-output.html

-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
---
22
categories: [python, docutils]
3-
category: archives
4-
layout: post
53
tags: [docutils, python]
64
title: Making docutils do python syntax highlighting (for HTML output)
75
---
8-
{% include JB/setup %}
9-
106
<!-- -*- mode: rst -*- -->
117
<!-- original id: P7 -->
128
<p><a class="reference external" href="http://undefined.org/python/docpytils-0.0.tgz">http://undefined.org/python/docpytils-0.0.tgz</a> is a simple docutils directive that does simple python syntax highlighting in ReST.. basically, after importing docpytils, you can do something like this:</p>

_posts/2003-11-10-more-packagemanager-fun.html

-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
---
22
categories: [python, packman]
3-
category: archives
4-
layout: post
53
tags: [packman, python]
64
title: More PackageManager fun
75
---
8-
{% include JB/setup %}
9-
106
<!-- -*- mode: rst -*- -->
117
<!-- original id: P8 -->
128
<dl class="docutils">
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
---
22
categories: [python]
3-
category: archives
4-
layout: post
53
tags: [python]
64
title: High Performance Computing for OS X
75
---
8-
{% include JB/setup %}
9-
106
<!-- -*- mode: rst -*- -->
117
<!-- original id: P9 -->
128
<p><a class="reference external" href="http://hpc.sf.net/">High Performance Computing for OS X</a>, a site by Gaurav Khanna, offers precompiled binaries, links and reviews of many open source and commercial compilers, libraries, and software related to heavy duty numerical work on OS X. It is a must see if you're looking for a Fortran compiler, BLAST, MPI, Octave, etc.</p>

_posts/2003-11-12-using-aeve-to-make-itunes-talk-to-ichat.html

-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
---
22
categories: [python, aeve]
3-
category: archives
4-
layout: post
53
tags: [aeve, python]
64
title: Using aeve to make iTunes talk to iChat
75
---
8-
{% include JB/setup %}
9-
106
<!-- -*- mode: rst -*- -->
117
<!-- original id: P10 -->
128
<p>I was originally going to write a little bit about the <a class="reference external" href="http://www.python.org/doc/current/lib/module-unicodedata.html">unicodedata module</a>, but google tells me that <a class="reference external" href="http://www.asiatica.org/~ludo/archive/2003/10/Python_unicodedata.html">Ludoo already did</a>. So instead, here's a quick <a class="reference external" href="http://pythonmac.org/wiki/aeve">aeve</a> script that will set your iChat status message to the current track in iTunes (make sure to <a class="reference external" href="http://pythonmac.org/wiki/FAQ#head-3d33c488ad44d45fb3fffae5119fe74441982b7d">run with pythonw</a>, it needs WindowManager access).</p>

_posts/2003-11-14-stupid-vim-tricks.html

-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
---
22
categories: [python, vim]
3-
category: archives
4-
layout: post
53
tags: [python, vim]
64
title: Stupid vim tricks
75
---
8-
{% include JB/setup %}
9-
106
<!-- -*- mode: rst -*- -->
117
<!-- original id: P11 -->
128
<dl class="docutils">

_posts/2003-11-19-comparing-iterables.html

-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
---
22
categories: [python]
3-
category: archives
4-
layout: post
53
tags: [python]
64
title: Comparing iterables
75
---
8-
{% include JB/setup %}
9-
106
<!-- -*- mode: rst -*- -->
117
<!-- original id: P13 -->
128
<p>Python doesn't have a way to compare arbitrary iterables (without converting them to a tuple or list). It's also easy to get it wrong if you try and do it with itertools (since imap and izip will consume an extra element from the first sequence if it's longer). Here's how to do it right:</p>

_posts/2003-11-24-for-loops-and-empty-iterables.html

-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
---
22
categories: [python]
3-
category: archives
4-
layout: post
53
tags: [python]
64
title: for loops and empty iterables
75
---
8-
{% include JB/setup %}
9-
106
<!-- -*- mode: rst -*- -->
117
<!-- original id: P14 -->
128
<p><a class="reference external" href="http://pythonmac.org/wiki/JustVanRossum">Just van Rossum</a> and I were discussing the <a class="reference external" href="http://python.org/doc/current/ref/for.html">for:else:</a>, <a class="reference external" href="http://python.org/doc/current/ref/while.html">while:else:</a> and <a class="reference external" href="http://python.org/doc/current/ref/try.html">try:else:</a> syntax on the <a class="reference external" href="http://pythonmac.org/wiki/MacPythonChannel">MacPythonChannel</a> this morning (morning for me, at least). I'm not sure if this is sufficiently covered elsewhere, but here is the pattern I use to check for empty iterables:</p>

_posts/2003-12-01-metainstance-method-descriptor.html

-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
---
22
categories: [python]
3-
category: archives
4-
layout: post
53
tags: [python]
64
title: meta/instance method descriptor
75
---
8-
{% include JB/setup %}
9-
106
<!-- -*- mode: rst -*- -->
117
<!-- original id: P15 -->
128
<p>This is odd, but I ran into a situation where I wanted to have a method be callable from both the class (as a metamethod) and the instance (as a normal instance method). The only decent way I could think of was to use a descriptor, here's an example:</p>

_posts/2003-12-08-why-having-multiple-installed-pythons-is-a-problem-on-os-x.html

-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
---
22
categories: [python]
3-
category: archives
4-
layout: post
53
tags: [python]
64
title: Why having multiple installed Pythons is a problem on OS X
75
---
8-
{% include JB/setup %}
9-
106
<!-- -*- mode: rst -*- -->
117
<!-- original id: P16 -->
128
<p>Jack nailed down the reason that extension modules fail to link properly on 10.3 if you have a separate Python installed. The -framework search path on OS X for linking (compile and runtime) hits /System last, and the Makefile for the system Python does not override the search path with -F.</p>

_posts/2003-12-16-pure-python-structseq-factory.html

-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
---
22
categories: [python, aeve]
3-
category: archives
4-
layout: post
53
tags: [aeve, python]
64
title: Pure python &quot;structseq&quot; factory
75
---
8-
{% include JB/setup %}
9-
106
<!-- -*- mode: rst -*- -->
117
<!-- original id: P18 -->
128
<p>This is a pattern I've been playing with lately (to be used in the next version of <a class="reference external" href="http://undefined.org/python/#aeve">aeve</a>, in the aeut/aete decoder). Basically it's a factory for &quot;tuples with a little metadata that can be used a little bit like dicts too&quot;. Yeah I know that dict-like methods will stomp on names if there's a clash, but I don't have any use cases where that happens so my implementation doesn't consider that.</p>

_posts/2003-12-30-im-back-darwin-bumped-to-720-music-management-software-notes.html

-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
---
22
categories: [python, PyObjC, aeve]
3-
category: archives
4-
layout: post
53
tags: [aeve, pyobjc, python]
64
title: I'm back, Darwin bumped to 7.2.0, music management software notes
75
---
8-
{% include JB/setup %}
9-
106
<!-- -*- mode: rst -*- -->
117
<!-- original id: P19 -->
128
<p>I just got back yesterday morning from my ~2.5 week stint in Tokyo. I didn't really do any coding (open source or otherwise) while I was away, but I'm pretty sure I still remember how ;)</p>

_posts/2004-01-02-accessing-environment-information-from-bundlesdylibs-os-x.html

-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
---
22
categories: [python]
3-
category: archives
4-
layout: post
53
tags: [python]
64
title: Accessing environment information from bundles/dylibs (OS X)
75
---
8-
{% include JB/setup %}
9-
106
<!-- -*- mode: rst -*- -->
117
<!-- original id: P20 -->
128
<p>The way that dylib works on OS X prevents you from directly referencing things defined in the executable from an external library (there are <a class="reference external" href="http://www.hmug.org/man/1/ld.html">kludge linker flags</a>, but I don't recommend their usage).</p>

0 commit comments

Comments
 (0)