Archive | Uncategorized RSS feed for this section

Gasping and talking and sharing

2 Feb

Seth Godin over at The Domino Project:

But the most important thing an author can do is write a breakthrough book, one that makes readers gasp and talk and share. And the second most important thing an author can do is build a tribe, a significant connection with a growing number of people.

Smart, patient and confident

1 Feb

PandoDaily on Mark Zuckerberg in the light of today’s Facebook S-1 filing:

Zuckerberg didn’t just wait. He obsessively learned what being a CEO was about. He surrounded himself by people who had strengths he didn’t and absorbed from them like a sponge. Unlike nearly every other Internet wunderkind who came before him, he didn’t hire the grown-up to run the company. He became the grown-up to run the company.

Smart, patient, confident, knows what he doesn’t know. Something to learn from.

Here’s to the crazy ones – Spiritual Entrepreneurship North America Tour 2012

17 Jan

Four and a half years ago, I started my “spiritual path”, with the help of a teacher who had worked closely with Eckhart Tolle.

During that process, I had the big realization that the things I learned about life through that spiritual work was directly relevant to my life as an entrepreneur. And thus, my concept of spiriutal entrepreneurship was born.

So what does “spiritual entrepreneurship” even mean?

To me, it means several things.

It means to actively let your intuition as a guide to discover who you are and what you want to do. Thing such as what business to build, the values to build it on, the vision for what it is and wants to be, the products you create, and so on.

What I’ve found is that this isn’t something that you just make up as you go, it’s not something you can merely copy from someone else. It’s more like there’s a hard, non-negotiable kernel of truth inside you, sort-of like the Manhattan schist buried, underneath all the things that civilization has thrown on top, and your job is to uncover and honor that as the foundation of everything you do.

It means realizing that we entrepreneurs are artists and craftsmen, and our business is our expression our work of art. We’re not merely technocrats fulfilling a role.

It also means recognizing that we’re not on this eaarth to merely survive and build monuments to our mortality. We’re here to fulfill our soul’s mission, and the business or social movement or whatever it is you’re entrepreneuring, is a direct expression of that mission. We want to make put our footprint on the world, not for ego gratification, but because it is why we’re here.

It means realizing that a big part of our mission – if not _the_ biggest part – is the work within. Our own personal growth. We need to not only discover our true selves, but our egos need to grow along with our soul’s demands, or it will actively sabotage us and prevent us from doing the work.

It means looking inside for the answers. You can use others as sounding boards, to get ideas, strategies, input, feedback. But at the end of the day, you’re the only person who knows what you need to do. The final authority lies with you. In the words of Sting: “Let your soul be your pilot.”

It means actively striving for inner peace and presence in the moment, through meditation, relaxation, breathing, a good night’s sleep, massage, exercise, sex, a warm bath, or whatever works for you. Your body is the vessel through which you materialize your vision, so you need to take good care of it through exercise, sleep, and the food you stuff it with.

It means working with your conditioning, all the beliefs and thoughts that are crammed into your unconscious mind, guiding your life every minute of every day. All the things you were taught by grown-ups and peers, that you absorbed, but that aren’t actually true for you. If you don’t rid yourself of those things, your children, or your co-workers or your family or others around you have to bear the burden. It is your responsibility to work through it.

It means basing all your work on the knowledge that at a soul level, you are already perfect and perfectly safe. There is nothing that you need to do or become or accomplish or prove in order to be okay, acceptable and accepted, lovable and loved, safe, and happy. Everything already is exactly the way it is supposed to be, right now, and the world doesn’t need you to change it.

But, as it turns out, operating from the place where you absolutely know this to be true, is the exact best way to actually have the impact you so desire.

So this is the interest that I’ve been pursuing for close to four years now. And it can come as no surprise that Steve Jobs has been a great inspiration for me for a long time.

Right now, my beautiful and wise wife and I are touring the US, looking to meet people who do work in this area – tech entrepreneurs, social entrepreneurs, investors, yoga teachers, spiritual teachers, writers, thinkers, doers – people doing creative, crazy, caring, crass things, things that inspire, things that change the world.

If you are one – or you have suggestions, leads or contacts for us – on people working at this intersection that you think we should meet, please let me know at lars@pinds.com.

Thanks!

//Lars

Flying

13 Jan

About a year ago (a year minus three days to be exact), I boarded a plane from Denmark to the US. Right now, I’m sitting on a plane, making the same trip.

Back a year ago, I left my wife and two kids to make a new life for myself in the US. Not that I wanted to leave my kids. I still don”t.

About ten years ago, I lived in the US for a two and a half years with my then girlfriend, now ex-wife, and the mother of my kids. We had a great time. Initially it was just for a year, but that year passed quickly, and we decided to stay for at least another year. After two and a half years we were at a crossroads, where both of our visas had expired, and we needed to figure out what to do now.

We decided that we both definitely wanted to live in the US again, but that we didn’t want to cut our ties to Denmark completely at this point, so we’d move back home for 2-3 years and then move back to the US. And so we moved back, but the time frame for our return move to the US kept being the friedman unit $$$.

So nine years passed, we got kids and a house and a mortgage, and the day never came.

I have always felt like an american at heart. My dad brought computers and computer books home to me from his trips to the US when I was a kid. He took my brother and I on two trips to the US when I was around 10 years old. I taught myself how to read and write and speak English before we had it in school, because I needed it to be able to understand what the computers said.

When I first set foot in the US as an adult, in New York City in May of 1999, I felt like I’d arrived home. I felt connected to the place, the people, the energy. I felt like like a native.

In the nine years that passed between my move to Denmark at the end of 2001 and my return to the US in January of 2011, I never really got integrated into Danish culture. In the first several years my employees were Swedish, American, German, Croat. My customer were Dutch, Canadian, American, German. The only TV show I watched was The Daily Show. The only news I read were US news on the web. The only magazines I read were Wired, FastCompany, Inc., You get the picture: I felt and lived like an expat in Denmark.

So last year, after three years of therapy and trying to salvage the relationship, I left and bought a plane ticket to New York, and then on to San Francisco. Started to set up a business there and apply for a visa.

But things didn’t quite work out as smoothly as I’d hoped, Turned our there was a lot of processing to do. Breaking up with your wife after 14 years together, and with two small kids, and breaking with your father at the same time, lots of friends falling by the wayside, mid-life crisis. There was a lot of work to be done.

I still don’t have a visa, and so I ended up spending the second half of 2011 in Denmark. That turned out to be great for many things – my relationship with my kids, my relationship with my ex-wife, my zenbilling businesss which currently only has customers in Denmark. But it wasn’t the dream. The dream was to move to the US and establish a business there.

So now, after almost 6 months in Denmark, I’m on a plane back to the US. Second try. Let’s hope it works out this time. (If not, I’m going to keep trying. I’m not giving up.)

My new wife is by my side. A new business plan. A new visa strategy. A new immigration lawyer. A new lease on life.

And yet, my emotions are pretty mixed. I miss my kids already. I’m scared. Already I feel alone in a big, big, merciless country. What if I get everything I’d hoped for, and I’m still not happy? For so many years, I’ve been longing and longing to move back to the US, pretending I didn’t really live in Denmark. It’s a lot of hope and expectation to have riding on this small aluminum tube in the sky.

Also, the past several months in Denmark have been so much about survival. Making things work with kids that have to be in school by 7.55am when we live across town, living with my mom and in various sublets, financial struggles, and all kinds of stuff.

Lots of things have been postponed due to the day-to-day survival mode. “Let’s figure this out when we’re back in the US, or on the plane.” Well, that time is now. Now is the time to figure those things out. And that, as it happens, is scary.

What if I can’t figure them out? What if the ideas aren’t coming? I’m really really tired. It feels like I’m collapsing after all of the holding myself up I’ve been doing for the past few months, and in the collapsing, some of the feelings that were repressed are coming up to visit.

I know it’s all bullshit, of course. But the thoughts are there, rummaging around in my subconscious mind. And thoughts create emotions, whether we’re aware of them or not.

That’s why it’s so important that we become more and more aware of our subconscious thoughts and beliefs so we can choose to change them.

Continually shedding light on what’s going on in our subconscious mind remains one of the most important and powerful things we can do in our lives.

Find all ruby files with special characters that don’t yet have the # encoding magic comment set

8 Dec

I’m playing with upgrading zenbilling to Ruby 1.9.3, and need to add the magic encoding comment to the source files that need it.

Here’s my poor man’s way of doing it in the shell:

grep "[ÆØÅæøå]" `grep -rL "^# encoding" ./**/*.rb`

It’s searching for the presence of one of the Danish characters in any ruby file that doesn’t have the # encoding magic comment. I guess I could’ve also just added the comment to all files. I didn’t.

Anyway, the command is here in case you need it.

Fixing IE gradients with Rails 3.1 and SCSS

30 Nov

I kept getting my CSS gradients in IE 9 messed up by the Rails 3.1 Asset Pipeline. The symptom was that the colors were off – way off! Like purple instead of white or gray.

It took me several hours to get this to work, so I figured I’d share the solution.

The colors were off because IE’s progid:DXImageTransform.Microsoft.gradient filter doesn’t understand normal CSS colors like ‘white’ or ‘#fff’. It needs to have them fed just so.

At first I thought it was the YUI compressor that changed the value, but YUI actually has special handling of IE filters. SCSS is supposed to have the same, but it didn’t work for me.

Compass has a solution, which includes a custom helper method, ie-hex-str.

So I imported that, and changed my filter to use it.

But getting my own custom SCSS helper function to work and be called too quite a bit of tweaking. Most of the time it was just being ignored, and I saw ie-hex-str(xxx) in my output.

The result is this SASS helper file, dropped into config/initializers:

and this mixin.css.scss

See the entire gist here.

Enjoy!

Show error traces in production in Rails 3.1

30 Nov

I wanted to be able to see error traces in the browser when I’m the one visiting.

Here’s my hack, dropped into config/initalizers/

1
2
3
4
5
6
7
if Rails.env == 'production'
  class ActionDispatch::Request
   def local?
     App.developer_ips.include?(remote_ip)
   end
  end
end

App.developer_ips is an array of IP addresses that I typically work from.

Logging in production with Rails

22 Nov

I use the Rails server logs primarily to dig through a user’s interaction with the site across requests to track down intricate bugs, like how did the user manage to get the system into this state which it shouldn’t be in.

But using the default Rails logs to do this piece of detective work is horrible.

I’m using the Hodel3000CompliantLogger, which prefixes each log line with the process id, which makes it possible to trace through each individual request.

But I haven’t found any tools that help me dig through those large log files yet.

I discovered Loggly today, and I briefly got my hopes up, but it does nothing like what I’m looking for. Or if it is, I haven’t noticed. All I can see that it does for me, is aggregate log files from various servers. I only have one server. There’s some searching, but it still just shows me the plain old log file.

What I want to see is a list of each request served by Rails, along with the IP address, the user agent, the parameters, info from the session such as logged in user ID, the response code, the redirected to URL if redirected, perhaps processing time, and memory consumption.

Then I want to be able to filter by IP address, so I can follow just one user’s path through the system, looking at each request, one by one.

Then I want to be able to dig into each request, one by one, seeing everything my app logged, which includes database statements and my own debugging statements and such.

I think having such a tool would help me tremendously.

Does any such tool exist already?

Possibly a customized Rails logger along with a web-based interface that lets me search and browse my logs.

I really thought Loggly was it, but I can’t see that it does the job for me :(

Your insight is greatly appreciated.

Thanks!
//Lars

How to set a default form builder in Rails 3.1 while letting it be autoloaded

8 Nov

Took me a couple hours to figure this out.

When you do config.action_view.default_form_builder = MyFormBuilder in your appliaction.rb, it doesn’t get autoloaded (ie. reloaded when you change something in development – which is really handy).

But, despite what this page says, changing it to say ActionView::Base.default_form_builder = MyFormBuilder in an initializer does squat to make my formbuilder get auto-reloaded.

It seems that the problem is that the class is never invoked by name, and so the autoloader doesn’t kick in. If instead you say :builder => MyFormBuilder on the form_for tag, it does get reloaded.

If you insert the code <% MyFormBuilder %> at the top of your erb page, the class actually does get reloaded, but the form builder still uses the old version. A Class is actually an Object, and ActionView::Base.default_form_builder still has a pointer to the old Class object, even though the constant MyFormBuilder now points to the new class. At least that’s what I think happens.

What ended up working for me was putting this code in config/initializers/set_default_form_builder.rb, which defines new form_for and fields_for  tags, which sets the :builder option to the builder I want, invoked by name. NOW my formbuilder gets reloaded with each change, AND I don’t have to specify it on each form.

Here’s the complete code I’m using:

Ahh, much easier to develop it now.

Enjoy!

Fast index creation in MySQL with InnoDB

1 Nov

I hunted around the web for hours and hours and hours trying to figure this out.

I have a table with 1.4M rows, and I need to add some indices to it, and to drop one that was created wrong. (It started with the primary key – bad idea!)

One my laptop, creating the index took a few seconds. On the server, it took over 20 minutes, then I killed it. Couldn’t afford to take zenbilling down for that long.

When doing a “show processlist”, it told me it was doing a “Copy to tmp table”, which took forever. I searched for “copy to tmp table innodb create index” and permutations of that, and came up with nothing but other people’s frustrations.

I looked at every single variable in “show variables” and compared them, tweaked them on the server, but nothing changed.

Only when I googled “fast index creation innodb” did I come up with this.

Turns out that the server was running MySQL 5.0 and I was running 5.5 locally.

If you install MySQL 5.1 (the latest available in debian) and install the InnoDB plugin, then you can create indices in a snap.

Don’t forget to configure MySQL to use the InnoDB plugin instead of the built-in version.