Incredible video of saving a humpback whale trapped in a fishing net.
This is the best description of JavaScript I’ve ever read.
These are just fantastic pictures. I particularly like the one in front of the soda bottles. And he’s very hard to find in the tractor one.
Found on stellar.io. Let me know if you need an invite.
Growing up this was always one of my favorite cartoons. This stop-motion homage is fantastic.
The Apple logo is filled with fibonacci numbers and conforms to the golden ratio. Is anyone surprised by this?
Recently I wrote about pagination issues I was having on my site. It turns out they were entirely my fault. The process of updating the Octopress framework that my sites rests upon has three steps, and in the most recently update I performed I only completed one of those steps.
Whoops.
The first step is to pull the latest changes from the ur-Octopress repository via a git pull command:
$ git pull octopress masterThis updates the core components of Octopress but does not update the SASS theme files or the source files that you may have altered in creating your site. In order to safely allow for updates to the theme and the source files that use the theme, there are two rake commands you must run. Each makes a copy of the existing SASS or source files so that you can reapply any modifications you may have made.
$ rake update_source
$ rake update_styleWhen I only ran the git pull I introduced a new version of the pagination code. Code that required the HTML source be updated as well. Since I didn’t run the update_source command, my site was still using the previous pagination HTML. Once I completed a full update cycle, my site’s pagination was working properly.
The moral of the story is, understand the consequences of not following all the directions.
Update September 11, 2011 As interesting as figuring out all of the ins and outs of pagination in Octopress was, the real issue that caused my problems was an incomplete update cycle. When you update Octopress you first pull changes from Octopress and then there are two rake commands to run, one to update styles and one to update source templates. I neglected to do the rake commands after a pull and as a result I got plugin changes without the necessary source and styling changes to make them work properly. For a complete look at updating Octopress see the Updating Octopress section of the documentation.
One of the risks when changing how your site is published is breaking links. Links from external sources and links internally from post to post. Toward that end I’ve been making great use of Mint and it’s many Peppers to track visitors and any errors they may be experiencing.
After a recent source code update from Octopress I started seeing some errors referencing URLs that looked like “page/#/”. Last night I discovered pagination on my site was well and truly broken. Whoops.
Pagination is the process of taken all my many posts (1793 counting this one) and spliting them up into pages containing 10 or fewer posts. Since weblogs are published in reverse chronological order, each new posting causes a ripple through all the pages of a site. In my case there are 180 pages of prior posts to re-create. Each one linked to it’s nearest siblings via “older” and “newer” links.
There are many ways to structure a website. In my case I’ve choosen to have my primary page at the root of my domain. Others choose to house their site in a /blog subdirectory. By default Octopress assumes you fall into the later cateory, and want all your postings to live in a /blogs subdirectory. Since I don’t want that I’ve had to tinker with settings in the _config.yml file and also with the Liquid tags that render the primary index page.
By default the primary index page for an Octopress site wants to build an archives link that leads you to /blogs/page/#. It was easy enough to remove the /blogs portion of that link. The same piece of code was also creating pagination links that were incorrect, by embedding an extra /page in each and by adding an extraneous / at the end of the URL. After some debugging and testing on my site this morning, I produced the following code, which renders the three pagination links properly for my site structure.
{% raw %}
<nav role="pagination">
<div>
{% if paginator.next_page %}
<a class="prev" href="{{paginator.next_page}}">← Older</a>
{% endif %}
<a href="/archives">Blog Archives</a>
{% if paginator.previous_page and paginator.page > 1 %}
<a class="next" href="{{paginator.previous_page}}">Newer →</a>
{% elsif paginator.previous_page %}
<a class="next" href="/">Newer →</a>
{% endif %}
</div>
</nav>
{% endraw %}This code also addresses a Liquid error I was seeing where the “Newer” pagination link wasn’t getting rendered at all. The original code was testing paginator.previous_page to see if it was greater than 1 and causing a “comparison of String with 1” error to be thrown. By changing the code to use paginator.page the comparison works properly.
Want! I have always loved Frank Lloyd Wright houses, and this masterpiece of Prairie style architecture is no exception. Plus I’ve never had Legos to play with.