Export from OpenOffice to clean HTML

OpenOffice’s export to HTML feature produces very crufty HTML because it attempts to make the outputted document appear as similar as possible to the original document. Most of the time, I just want clean HTML. Here’s one way to get it:

  1. Export your OpenOffice document to HTML (I used the XHTML strict option)
  2. Install Ruby and the Sanitize gem
  3. Download this handy script
  4. Run like so:
    ruby sanitize_oo_html.rb < unwashed.html > pretty.html

The script contains a custom Sanitize filter that’s very simple, and it may not meet your needs. If not, feel free to tweak it. The Sanitize docs should help with that.

Share and Enjoy:
  • Facebook
  • StumbleUpon
  • Twitter

Deploy a subversion repository to a server without subversion

The problem

You have a website, stored in a subversion repository. The server you’d like to deploy to has shell access (ssh) but subversion is not installed, and you can’t install it. You want to be able to deploy changes to your website quickly and easily.

The solution

  1. Download this ruby script and place it in the parent directory of your working copy of the site.
  2. Edit the script and change the “src” parameter to the name of the directory containing your website.
  3. Determine the SVN revisions you’d like to deploy. This might be something like “128:132″.
  4. Run the script, like so: ruby deploy.rb 128:132
    Insert your own revisions as the command line parameter.
  5. The script will generate a file deploy-128-132.tgz. Copy this to your server.
  6. From within the production directory, untar the deploy-128-132.tgz file. This will overwrite the files that are to be modified in this update. It will also untar a delete script: delete-128-132.sh.
  7. Run the delete script: . delete-128-132.sh
  8. Remove the delete script: rm delete-128-132.sh
  9. Party!

Has this been useful? Drop me a line in the comments!

Share and Enjoy:
  • Facebook
  • StumbleUpon
  • Twitter

Twitter Wasssssup?

Here’s a greasemonkey script to give Twitter a bit more attitude:

Twitter Wasssssup?

Share and Enjoy:
  • Facebook
  • StumbleUpon
  • Twitter

Patterns

Your life follows patterns.

If you’re employed, a large part of this comes from your job.
If you’re self-employed, you have to make up your own patterns.
If you’re an entrepreneur, your occupation is to make up patterns.

Patterns for yourself. Patterns for your employees. Patterns for the people your business serves.

Patterns that improve their lives. Patterns that improve your life.

This is how you change the world.

Share and Enjoy:
  • Facebook
  • StumbleUpon
  • Twitter

Are you awake or are you dreaming?

Are you awake or are you dreaming? When I seriously consider that I might be in a dream right now, I become intently aware of my experience. I wake up a bit. If this is a dream right now, that’s really interesting! Particularly to be aware that I’m dreaming while I’m dreaming. I don’t experience many lucid dreams at all. I wonder what strange things I could try out that I couldn’t do normally?

If this isn’t a dream, what is it? What is it really? How does it work? I think I know what’s going on, but maybe I’m blundering through it half asleep?

The point of this question is not to determine whether you are in the middle of a lucid dream or not (though it’s awesome if it can do that for you). The deeper purpose is to look more closely at reality and question it. Not in a philosophical way, but in a concrete, right-here-and-now kind of way. What is this that I’m experiencing right now and how does it all work?

Share and Enjoy:
  • Facebook
  • StumbleUpon
  • Twitter

The Path With A Heart

Anything is one of a million paths. Therefore you must always keep in mind that a path is only a path; if you feel you should not follow it, you must not stay with it under any conditions. To have such clarity you must lead a disciplined life. Only then will you know that any path is only a path, and there is not affront, to oneself or to others, in dropping it if that is what your heart tells you to do. But your decision to keep on the path or to leave it must be free of fear or ambition.

I warn you. Look at every path closely and deliberately. Try it as many times as you think necessary. Then ask yourself, and yourself alone, one question. This question is one that only a very old person asks. My benefactor told me about it once when I was young, and my blood was too vigorous for me to understand it. Now I do understand it.

I will tell you what it is: Does this path have a heart?

All paths are the same, they lead nowhere. They are paths going through the bush, or into the bush. In my own life I could say I have traversed long, long paths, but I am not anywhere. My benefactor’s question has meaning now. “Does this path have a heart?” One makes you strong; the other weakens you.

The trouble is nobody asks the question: and when a person finally realizes that they have taken a path without heart, the path is ready to kill them. At that point very few people stop to deliberate and leave the path.

A path without a heart is never enjoyable. You have to work hard even to take it. On the other hand, a path with heart is easy; it does not make you work at liking it.

For my part there is only the traveling on paths that have heart, on any path that may have heart. There I travel, and the only worthwhile challenge is to traverse its full length.

And there I travel looking, looking, breathlessly.

- Don Juan
Apprentice to a Yaqui Sorcerer
Sourced from http://www.whale.to/a/path_with_a_heart.html

Share and Enjoy:
  • Facebook
  • StumbleUpon
  • Twitter

Spontaneously manifesting whiteboards

Yesterday I imagined having an enormous whiteboard in my room. I could write up clouds of notes for different blog post ideas, leave the ideas up there for a few days and jot down more thoughts as I came up with them. I’d have space to have a few ideas going at once because the whiteboard would be huge. So I wrote on Twitter:

Dear universe: I would like an entire wall of my room to be a whiteboard. Thank-you!

Within a few minutes, the universe (twitterverse?) answered. First @maadonna suggested whiteboard paint, and also a great place to buy huge whiteboards. Then @brendam told me of a scheme to create huge whiteboards with cheap shower wall panels from Bunnings. At first I was sceptical of actually fitting a whiteboard in my room (it’s tiny) and finding a way to mount it on my wall (I’m renting), but the idea of blutacking a lightweight piece of plastic to my wall sounds like it just might work.

I’m amazed at how quickly a solution came. When I wrote the original tweet, I was only half serious, and I didn’t think I could really do it. Once the suggestions came, I soon has a feasible way to make it happen. Without even trying!

I do believe a trip to Bunnings is in order.

Share and Enjoy:
  • Facebook
  • StumbleUpon
  • Twitter

My favourite lunch

The following is an adaptation of the recipe for Sue’s Super Soup found in Karen Knowler’s 50 Quick, Easy, Healthy & Delicious Raw Food Recipes ebook.

Ingredients:

  • One avocado
  • Two tomatoes
  • Juice of one orange
  • Two tablespoons flaxseed oil (or olive oil. Flaxseed oil contains omega 3 for those of us who don’t eat fish.)
  • Four tablespoons sultanas (try more or less if it’s too sweet or not sweet enough)
  • A dash of tamari OR soy sauce OR a pinch of salt (just a little bit!)
  • Some red or green capsicum, finely sliced

Directions:

  1. Place everything except the capsicum in a blender.
  2. Blend to a smooth consistency.
  3. Pour into a soup bowl, garnish with capsicum. This adds a bit of texture to the soup.
  4. Serve with crunchy toast for dipping, or flax crackers if you’d like to keep the meal entirely raw.

Serves one. Enjoy! :)

Share and Enjoy:
  • Facebook
  • StumbleUpon
  • Twitter

Weekly check-in #8

Just a short check-in this week. It’s even a short intro. Let’s get to it!

The hard stuff

Random stress

Couldn’t I just accept that things are not too bad right now and enjoy the stuff that’s working out well? Seems not, at least not all the time. Note to self: Life Is Pretty Okay. Don’t stress!

The good stuff

Development!

Last week, I wrote about setting goals centered around character development instead of around producing an external result. I picked out persistence as the attribute I wanted to develop, so I decided to spend an hour per day for a week working on a project. The project I picked was to develop a little web app to help me review my new followers on Twitter.

I finished the week successfully (yay!) and the application’s taking shape. The whole thing’s been quite fun, and the hardest part has been coming up with a name for it. My eternal gratitude to anyone who has a suggestion!

As I get further into it, I see that I could take the idea further than I originally anticipated, and I’m coming up with lots of ways to make the project more interesting and to make some money on the side as I go. I have to credit my initial intention for this. My definition of success on this project is to persist – to keep putting in the time even when obstacles come up. If I were purely aiming to make money, I would have been put off as soon as I realised I had competitors.

And all this aside, dev work is fun. I like coding, figuring out how to do new and interesting things. So horray for interesting projects!

That’s it!

Catch you next week! And feel free to join me in the comments. What was the hard and the good in your week?

Share and Enjoy:
  • Facebook
  • StumbleUpon
  • Twitter

Setting meaningful goals

The day before yesterday I found a new way of looking at goal achievement. It’s a perspective shift that makes prioritising the journey to the goal over the achievement of the goal a lot easier. This is kinda cool (horray for new ways of looking at things!), so let’s do a compare-and-contrast of the normal mindset (desire achievement) and the new mindset (strength building).

Method 1: Desire achievement

This is the stock-standard way of thinking about setting and achieving goals. How does it go? You tune in to a desire, define the outcome you want, then try to achieve it. Maybe you succeed and you get what you want (yay!) or maybe you fail and fall on your face (doh).

If you’re doing it this way, your happiness depends on your success or failure. Enjoying the journey doesn’t really come into it. You might try to make your goals fun to work on, but mostly you’re trying to get the enjoyment that comes from achieving the goal.

Method 2: Strength building

A new perspective! With this one, you can discard the contents of the goal as unimportant. Doesn’t matter. Instead, shift your focus from producing external changes (“This is this thing I want to make happen”) to producing internal development (“I want to become stronger”).

This time we don’t even start with an external goal. Instead, we start with an internal characteristic that we’d like to develop and then pick a fun goal that will help us to do so. The contents of the goal is almost meaningless. It doesn’t matter. Just pick something fun (it’s more fun that way ;) ).

This is like weightlifting. You don’t care about the result (the weight is lifted), you care about the muscle growth. But in the same way that you can get just as fit going for a run outside as you can running on a treadmill, some times there is a more fun way to go about it. ;)

What I’m doing

I’m going to experiment with using the strength building method of setting and pursuing goals. The main thing that’s been messing up my business attempts over the past few years is a lack of persistence, so that’s where I’ll start. I’m aiming to build my persistence by tackling progressively longer goals, starting with just an hour’s work per day on a project for a period of 7 days. My focus (doing many hours of uninterrupted work in a day) also sucks, as does my decisiveness (making and sticking to decisions), so I’ll be working on those at some point too. In, of course, the most enjoyable way I can come up with. :)

What about contribution?

With this mindset, contribution (helping others through the achievement of your goals) is one way to make the process of achieving the goal more fun and meaningful. Contribution isn’t the primary aim of the goal setting and achievement exercise.

I’ve previously held this attitude and I found it disempowering. I got caught up in feeling obligated to contribute and had difficulty setting goals that I enjoyed. As a consequence, I didn’t follow through with them. No contribution, and I wouldn’t even achieve the goal for myself.

Contribution does fit into this model. I suspect that if you keep setting and pursuing goals this way contribution will become a major part of every goal you set, simply because it’s fun to do it that way, not because you feel you have to.

Where does this way of thinking come from?

The mindset of strength building through goal achievement comes from thinking of reality as a training ground. A safe playground in which we can practice developing these things (non-physical attributes) without fear of permanently messing anything up. Physical reality is impermanent, so although we’ll get negative feedback if we stuff up, it won’t last, things will change, and we’ll get another chance (unless you die, but some would argue that you’ll still get a second chance ;) ).

The stuff we do in physical reality (manifesting our desires) is play. The important part is happening behind the scenes, as we become stronger in the process.

High-five to Steve Pavlina, who I’m sure somewhere along the way planted the seeds that lead to this post.

Share and Enjoy:
  • Facebook
  • StumbleUpon
  • Twitter