Double Shot #982

It's a Red Queen's Race out there.

  • TzMagic - Rails engine to determine user timezone by running javascript in their browser.
  • Divergence - Project to hook your staging server up to git to let multiple developers test different branches at the same time.

Double Shot #981

Recovering from one Scout meeting, preparing for another. That's my life away from code these days.

Double Shot #979

I'm going to mostly ignore Rails Rumble entries till we see which (if any) stick.

  • Rubytune - Sharp guys who will help you troubleshoot performance in your Rails application.
  • Capistrano-Mailgun - Send deployment notifications via Mailgun API.
  • newrelic-rake released - Gem to add New Relic instrumentation to rake tasks.
  • HTTPS Everywhere - Firefox/Chrome addon from EFF devoted to making sure you get as much benefit from secure connections as possible.

Double Shot #978

Camping time again, and not a moment too soon.

Double Shot #977

Buried. Just buried.

  • browserver - Turn your browser into a web server proxied to the full internet by browserver.org. Wacky (and potentially dangerous) tech.
  • letter_opener - Automatically preview mail sent by your application in the browser when you're in development mode.
  • Future of Thunderbird - Rumors of Thunderbird's death are greatly exaggerated.

What's New in Edge Rails #41

Week of October 1 - October 7, 2012

The latest Rails performance brainstorm is turbolinks, which makes reloading just the page body the default for intra-application links. I'm skeptical, but it'll probably work out fine except for annoying and hard to track down edge-case breakage.

  • e35d8b18 turns turbolinks on by default for all new applications.
  • There's a new ActiveSupport::KeyGenerator that wraps PBKDF2 for use in making more secure keys. The merge is in 0a507925.
  • Action and Page caching have been extracted to separate gems; see c82cf81f for details.
  • rack-cache is no longer installed by default, though as ab4c0795 shows you can turn it on easily.

Double Shot #972

Parking cars isn't glamorous, but it sure brings in a bundle of money for our Boy Scout troop.

Thinking About Tent

Like some other people, I'm getting increasingly leery of Twitter as it becomes increasingly obvious that their mission in life is to deliver eyeballs to advertisers by locking people into a corporate-approved walled garden. I'm not all that interested in being part of the product, given that I have many other places to publish thoughts where I end up owning my own words.

On the other hand, the community and socialization in Twitter is nice. So I've had my eye out for viable alternative places to hang out. Certainly there's no shortage on the Internet: forums, IRC, Diaspora, ostatus/rstatus, App.net…but none of them have felt right to me. Now there's a new one that warrants keeping an eye out: Tent.is.

I almost hate to link directly to that site, because right away people will look at the global feed and say "oh, it's an attempt to imitate Twitter, only it has fewer features and no one is saying anything interesting, this sucks."

Well, no.

Tent.is is just the visible part of the Tent protocol. As a protocol, tent opens up a vast number of possibilities. Yes, you can host a microblogging service on top of it, and that's what Tent.is is doing as a proof-of-concept. But that's not all you can do with Tent. People who get the impression that Tent is a Twitter wannabe are making the same mistake as the blind man who decided that an elephant was very much like a piece of rope because he had grasped its tail.

Part of the idea of Tent is to learn from the wider internet. It's designed to be a protocol for "open, decentralized social networking." The most basic concept is that you own your own social network: your profile, your relationships, the information you post. All of this lives on your own Tent server. The protocol provides a way for your server to talk to other servers. Other users on those other servers can interact with you, via the pair of Tent servers and the Tent protocol that links them together.

One of the important things about the protocol is that it defines multiple post types. In addition to microblogging status posts, the current documentation defines post types for photos, albums, and essays. Post types are extensible, so expect this list to grow in the future.

That brings us back to Tent.is. This is a public Tent server that hosts users (for free or with a paid plan) and also understands the status post type. It does this by running a trio of open source applications: the tentd server, the tentd-admin server admin UI, and the tent-status microblogging application.

Right now I've got my own Tent identity hosted on Tent.is, but there's no reason that it has to remain there (and it probably won't in the long run). Whenever I want, I can spin up my own copy of tentd and move my identity there - and the rest of my personal social network travels with it. You can think of it sort of like email: you can change email addresses and servers at any time, but you need not give up the ability to communicate with people or your past history. But beware, seeing Tent as email-plus is just another blind man pulling on the elephant's trunk and declaring it is like unto a hose.

What I like most about Tent is the sense of possibility that I get from it. If it succeeds in building an infrastructure for passing JSON messages around between entitites, with appropriate privacy controls, there are a lot of potential uses. Consider a dedicated status type for code reviews, or a bridge to X10 to put you in a private social network with your home automation, or a Tent-based way for your deployed applications to report errors.

Tent is in its infancy at the moment. If you don't like to live at the bleeding edge, it's probably not for you yet. The core team is pretty small, and they know they face substantial challenges in scaling and security and elsewhere. But if you're excited by the possibilities and want to get involved, there are a bunch of ways:

  • Sign up for your own account at Tent.is
  • Set up your own Tent server
  • Join the #tent channel on IRC Freenode
  • Send an email to tent.dev@librelist.com to join the developer mailing list

Perhaps I'll see you there!

Double Shot #970

Nice to see the uptick in tent.is signups yesterday. Now to watch people try to figure out what it is (hint: see tent.io).

  • App.net pricing changes - $36/year instead of $50/year for this non-advertiser-supported Twitter alternative.
  • JOSNiq - "XQuery for JSON".
  • Sidekiq Pro - "Advanced functionality for Sidekiq", an attempt to layer a paying product on top of an open source one. Features batches, notifications, and metrics.
  • TypeScript - Missing CoffeeScript in your Microsoft toolchain? Now there's an alternative.
  • CIBox - Combination code-sharing and continuous integration service.
  • sidekiq-failures - Adds a tab to the Sidekiq Web UI to keep explicit track of failed jobs.
  • Tres - Mobile web development framework based on backbone.js.

What's New in Edge Rails #40

Week of September 24 - September 30, 2012

  • Various tweaks to Rails logging & log tagging went in this week, including automatic tagging of the test log with the current test class and test case in 86ebe0bd.
  • 7e0cf563 makes Mailer.deliver_foo(*args) a synonym for Mailer.foo(*args).deliver. Yay for easier tests.

Double Shot #969

It was another busy weekend. Time to clean out the browser.

Double Shot #968

Thoroughly ready to send this week to the dustbin of history.

Thumbnailing PDFs with MiniMagick

Maybe this was already out there somewhere, but my search fu failed. So, for the benefit of anyone else using MiniMagick instead of RMagick and needing thumbnails of PDF files:


image=MiniMagick::Image.open("some.pdf")
image.format("png", 1)
image.resize("200x200")
image.write("some_thumbnail.png")

Or in CarrierWave:


class PdfAssetUploader < CarrierWave::Uploader::Base
  include CarrierWave::MiniMagick

  version :web_thumb do
    process :thumbnail_pdf
  end

  def thumbnail_pdf
    manipulate! do |img|
      img.format("png", 1)
      img.resize("150x150")
      img = yield(img) if block_given?
      img
    end
  end

end

subscribe via RSS