Github textmate bundle

1 Nov

I only discovered the github TextMate bundle a few days ago.

It’s great. I particularly like the “Show in Github” feature, which makes it quick and easy to see what was the original version of this file you’re editing.

And while we’re on the topic of git, git log -p <path> is really handy to show you what changed with which commits in a given file. Helps you understand why a certain change was made, or why a line is there.

Rails tip: Get AckMate to search .scss files

9 Oct

I love AckMate, but to my horror, it doesn’t search through .scss or .css.scss files, which is used in Rails 3.1.

The fix is easy: Add this to your ~/.ackrc:

–type-add=css=.scss

That does the trick.

Cheers.

Recording live calls

20 Sep

I usually do live calls using GoToWebinar (which I hate, but it’s the best product I’ve found, unfortunately – web 2.0, where are you, when will you catch up??) and then record them using WireTap Studio.

But as of OS X Lion, WireTap Studio can’t record the audio from applications anymore. Which sucks.

Recording my own voice is the easy part. The hard part is recording the voices of other people on the call when they’re asking questions and engaging in dialogue.

Thankfully, it turns out that Screenflow can. So you can record the audio using Screenflow (both audio from microphone + computer audio – the last one is the trick), and then you can export it to an AIFF file (Lossless – Audio only), which you can then convert to MP3.

It’s not pretty, but it works.

Why GoToWebinar doesn’t offer to record the audio server-side, and let me download a simple MP3 file of the recording is beyond me.

New payment service Stripe looks amazing

9 Sep

Just got access to Stripe, a simple Javascript API-based payment service.

You encrypt the credit card info and submit it to their servers via Javascript, and get back a token which you can use to charge against that card later.

Simple and beautifully executed.

Now can we get to use it in Denmark, please? And with a Dankort?

Linking two input fields

6 Sep

When you send emails from zenbilling, you get to choose a separate sender email and reply-to address. Usually they’re one and the same, but sometimes you want them to be different.

The way I did this is to have two input fields, one for each, but to have them linked, so when you make changes to sender email, reply-to is automatically updated with the same change. Unless reply-to has been changed to be different from sender email, in which case we leave reply-to alone.

Today I needed this pattern somewhere else, and so I wrote a handy little jQuery function for it, which you can find here.

Enjoy!

Using Glyphicons with Rails

5 Sep

I love Glyphicons – they’re pretty, versatile, stylish, clean, well executed, well priced, and there’s lots of them.

So I’ve created a Rails helper that makes it easier to work with them. It lets you do things like this:

link_to_glyphicon(:edit, edit_admin_product_coupon_path(@product, coupon))
 
glyphicon(:move, :class => 'drag_handle', :title => "Drag to reorder", :variant => :halfling)

If you’re interested, you can find the code here.

Patches are graciously accepted.

Rails tip of the day: Rails + OS X Lion + rvm + nokogiri

6 Aug

I followed this guide, but still had trouble getting nokogiri to install.

Nokogiri complained about libiconv, but the culprit wasn’t libiconv. It was libxml2 and libxlst.

Here’s the output from trying to install nokogiri:

✗ gem install nokogiri -v 1.4.4
Fetching: nokogiri-1.4.4.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing nokogiri:
	ERROR: Failed to build gem native extension.
 
        /Users/lars/.rvm/rubies/ree-1.8.7-2011.03/bin/ruby extconf.rb
checking for libxml/parser.h... yes
checking for libxslt/xslt.h... yes
checking for libexslt/exslt.h... yes
checking for iconv_open() in iconv.h... no
checking for iconv_open() in -liconv... no
-----
libiconv is missing.  please visit http://nokogiri.org/tutorials/installing_nokogiri.html for help with installing dependencies.
-----

In other instances, I did manage to get it installed somehow, but when I tried to run “rails c”, I’d get this error:

/Users/lars/.rvm/gems/ree-1.8.7-2011.03/gems/nokogiri-1.4.4/lib/nokogiri/nokogiri.bundle: [BUG] Segmentation fault

Ultimately, the answer was this gist, which I resisted for a long time, because I thought it wasn’t libxml2/libxslt that was missing, but libiconv. I was wrong.

I did have to change the last line to refer to version 2.7.8 of libxml2 rather than 2.7.7. Minor change.

I hope this blog post will save you the hour or two that I wasted wrestling with this stupid issue :)

I’ve got too many websites…

11 Jul

Pinds.com, Coach TV, Conscious Startups, Larspind.com.

Is that normal? :)

Seriously, though, while I’m totally committed to the concept I’m getting going with Conscious Startups, I’m considering whether I should just host it all right here on pinds.com, and have my personal brand be the umbrella for everything.

What are your thoughts?

Forgiveness

16 Apr

Andre Agassi:

I feel an overpowering urge to forgive, because I realize that my father can’t help himself. My father is what he is, and always will be. And though he can’t tell the difference between loving me and loving tennis, it’s love all the same. Few of us are granted the grace to know ourselves, and until we do, maybe the best we can do is be consistent. My father is nothing, if not consistent.

Fearless Entrepreneurs TV tomorrow

7 Apr

Hey, if you’re following me here, but not over at Fearless Entrepreneurs, I just wanted to say that:

* You should – grab the RSS feed, and even better, subscribe and Like on Facebook.

* And you should come join us for the live broadcast tomorrow Friday April 8th 2011 at 10.30am PST.

Cheers!

//Lars