I have this really, really bad habit; I spend a lot of time searching and trying out new tools for my tool box.  Some times to such extent I never get around to actually using the tools to build something, and that is just silly.

On the positive side is have given me a lot of exposure to the many, many options available to us, but on the negative side I think I use it as a form of procrastination.  If I am looking for for something, than I don’t actually have to ‘work’ on something.  How convenient.

The toughest part, is that I really enjoy checking out different applications.  Experiencing what so many are putting their hard work into.

So I have started a list, it is by no means complete, nor do I really plan on making it complete.  Though it will give you a pretty good idea on all the different things I have checked out and played around with.

I back at it and nothing is safe this year.  I can’t take the clutter, it’s just too much for one person to bear.  If my wife gets in my way she may be surprised when ‘stuff’ just starts vanishing.  Hey, you don’t want to clean, than I am making a decision on that ‘thing’ that has been on the dining room floor for two years.

In boxes, empty; receipt stacks,  gone; toys, age appropriate only otherwise, GONE.  We could open our own toy store, I swear.  Actually we will be, in the form of a garage sale this Summer.  Come one by and buy our stuff, we don’t want it anymore.

PURGE

I feel better already.

For the record, I started the humongo pile in the corner of the office tonight.  Already have my first bag of trash for the landfill.

If you actually read this far you are probably thinking I am crazy, and you are half right, but you really need to try this, it is such great therapy.  Try this for size; you open your most used email client and there are zero emails in the inbox.  Everything you need is in a folder, everything else is GONE.  Honestly, how many times do you look at those 2312 emails in your inbox now, really?  Probably only the first time you read it.

I will let you in on a little secret for all those emails that you can’t get rid of.  You can’t leave them in your inbox, that’s just clutter and stressful.  Create one folder named archive and stick all that clutter email that you just can’t do without in there.  That simple move can clear up any email you ‘just not sure about deleting.’

Everything else DELETE!

If you are more anal, like I am , create a few folders and organize your emails more.  Google nailed on the head when they went with the search model of Gmail.  Absolute brilliance.

Another little tip.  If you are replying to an email with a question and the original doesn’t really matter, then DELETE it.  Why keep it, you will get it back with your next round of emails.

PURGE

Can’t wait to start in the freak’n garage.  I want my garage back!

Yeah the tax season is almost done for 2010.  What excites me about this the most is that our house will go back to some normalcy.  My wife is a tax professional (or something like that) for one of those big named tax houses (A meat market for tax personnel).  Its seasonal work and she is done on April 15th.

I just realized something about the date today, 02/10/2010.

Today is two-ten, two-ten.

Interesting

Okay, so it’s actually two-ten, twenty-10.  Perhaps my dyslexia kicked in when I first saw this.

I have wondered for some time how to keep footers at the bottom of the page.  I have tried different methods of minimum heights, etc., but it only ever looked just “OK”.

On Stackoverflow today, the a question was asked about sticky footers and a method being used to achieve them.  I thought the solutions interesting so I wanted to post them so I might be able to find this later.

Stackoverflow entry:
http://stackoverflow.com/questions/2239780/css-why-does-height-seem-to-be-set-when-its-not

The method referenced by the question’s author:
http://ryanfait.com/sticky-footer/

A suggestion made by someone else:
http://matthewjamestaylor.com/blog/keeping-footers-at-the-bottom-of-the-page

Yeah, winters back.  Besides the really short days of sunlight I am really psyched.

I like to thank wordpress for the falling snow option to help all get in the spirit of the fun white fluffy stuff.

Sledding anyone?

Unicode Characters converted to ASCII string

I hacking together a report today and discovered the Unicode text I received was actually in Unicode not ASCII.

Basically I have this:  こんにちは

And I want this:  

By using AscW(Char) you can convert a Unicode character into an integer value.  Add some delimiters to encode the string and you have a Unicode HTML Entity Reference.  It isn’t perfect, as AscW(Char) sometimes returns a negative number, which isn’t allowed, though this is an easy work around explained here.  It is used below.

Public Function UnicodeToAscii(sText As String) As String
  Dim x As Long, sAscii As String, ascval As Long

  If Len(sText) = 0 Then
    Exit Function
  End If

  sAscii = ""
  For x = 1 To Len(sText)
    ascval = AscW(Mid(sText, x, 1))
    If (ascval < 0) Then
      ascval = 65536 + ascval ' http://support.microsoft.com/kb/272138
    End If
    sAscii = sAscii & "&#" & ascval & ";"
  Next
  UnicodeToAscii = sAscii
End Function

Now lets go the other way: ASCII string to Unicode

Now I have this:  

And I want this:  こんにちは

I remembered that ChrW(int) will convert character codes to their associated character.  I really wasn’t in the mood to write parsing logic and test it, but luckily I came across a class which does this.  I ripped out the method I needed and it worked great in all it’s simplicity.  I have included this function below:

Public Function AsciiToUnicode(sText As String) As String
  Dim saText() As String, sChar As String
  Dim sFinal As String, saFinal() As String
  Dim x As Long, lPos As Long

  If Len(sText) = 0 Then
    Exit Function
  End If

  saText = Split(sText, ";") 'Unicode Chars are semicolon separated

  If UBound(saText) = 0 And InStr(1, sText, "&#") = 0 Then
    AsciiToUnicode = sText
    Exit Function
  End If

  ReDim saFinal(UBound(saText))

  For x = 0 To UBound(saText)
    lPos = InStr(1, saText(x), "&#", vbTextCompare)

    If lPos > 0 Then
      sChar = Mid$(saText(x), lPos + 2, Len(saText(x)) - (lPos + 1))

      If IsNumeric(sChar) Then
        If CLng(sChar) > 255 Then
          sChar = ChrW$(sChar)
        Else
          sChar = Chr$(sChar)
        End If
      End If

      saFinal(x) = Left$(saText(x), lPos - 1) & sChar
    ElseIf x < UBound(saText) Then
      saFinal(x) = saText(x) & ";" 'This Semicolon wasn't a Unicode Character
    Else
      saFinal(x) = saText(x)
    End If
  Next

  sFinal = Join(saFinal, "")
  AsciiToUnicode = sFinal

  Erase saText
  Erase saFinal
End Function

I didn’t always understand why you wouldn’t just want to work with the Unicode characters themselves.  Well is seems that not all applications treat Unicode the same way and the characters may be changed.  If you are storing and passing around a text representation of the characters there is no way for them to be misinterpreted.

One of the neatest things I like about this is that I can just put the text represented Unicode in a web page and the browser will automatically convert it to Unicode characters.  This is the reason I needed to use an image above to show what the text represented Unicode looks like.  If I just put the string there, it is converted by the browser when displayed.

If you have been to this post in the past, you have probably noticed that it has changed a bit.  That is because I had it all backwards! Yeah well it happens.  I said I want wanted to change Unicode characters to Ascii string, but the code actually was for the other way around.  Well I finally got around to fixing this and made sure that code worked before displaying it.  I hope this helps someone out there.

This has driven me crazy for weeks, I just haven’t been able to access web_dav I setup at dreamhost.com.

I found a perfect article on how to do it at Geek Boy’s Blog.  It’s so simple,…

Make sure you add the port number to the url you provide for the network place.

E.g. http://www.mydomain.com:80/foo

Once I did that, I connected instantly.  No more need for third party apps, I can just access it. 🙂

The goal of this document is to walk through the installation of a MoinMoin wiki without getting bogged down in any details.  We’ll go through requirements, decisions, and steps to complete, that’s all.  (OK, I did end up indicating what directories are added; I can’t stand when stuff is added I don’t know about.)   I will follow up this post with the details for those who are interested. Once you have completed the steps herein you will have a working MoinMoin wiki on your Dreamhost.com shared hosting account.  By no way is this the only way to set up MoinMoin on an account, or even the best way, but I tested it and it will work.  Lets get to it!

Requirements

  • Dreamhost shared hosting account.
  • A domain setup as fully hosted
  • Shell and FTP access to the domain account

Assumptions

  • Dreamhost running python version 2.4
  • MoinMoin version 1.8.5
  • Understanding of editing files from Linux shell
  • acctname is the accout name you used to access your domain account through ssh and FTPS.
  • ~/ = $HOME = /home/acctname/

Decisions

  • URL to run wiki from (we use sub directory) [We will use: http://hosteddomain/wiki]
  • Private name for the wiki’s instance name [We will use: dhwiki]

Steps

  1. Download MoinMoin wiki tarball from http://moinmo.in/MoinMoinDownload (moin-1.8.5.tar.gz) to your local workstation.
  2. From FTP: upload file to Dreamhost into folder ~/files [/home/acctname/files]
    ** All commands from now on are from your shell access **
  3. cd ~/files
  4. tar -xvzf ~/files/moin-1.8.5.tar.gz [new directory is created: ~/files/moin-1.8.5
  5. cd ~/files/moin-1.8.5
  6. python setup.py --quiet install --prefix=$HOME --record=install.log

    [two directories created: ~/share/moin; ~/lib/python2.4/site-packages/MoinMoin]

  7. Setup environment variables
    1. export PREFIX=$HOME
    2. export SHARE=$PREFIX/share/moin
    3. export WIKILOC=$SHARE
    4. export INSTANCE=dhwiki
  8. cd $WIKILOC
  9. mkdir $INSTANCE
  10. cp -R $SHARE/data $INSTANCE
  11. cp -R $SHARE/underlay $INSTANCE
  12. cp $SHARE/config/wikiconfig.py $INSTANCE
  13. chmod -R o+rwX $INSTANCE
  14. Edit file $INSTANCE/wikiconfig.py
    Find and change the follwing lines:

    1. sitename = u’Your Wiki Title
    2. logo_string = u'<img src=”/wiki/common/moinmoin.png” alt=”MoinMoin Logo”>’
    3. Remove hash (#) in front of: page_front_page = u”FrontPage”
    4. data_dir = ‘/home/acctname/share/moin/dhwiki/data/’
    5. data_underlay_dir = ‘/home/acctname/share/moin/dhwiki/underlay/’
    6. url_prefix_static = ‘/wiki’   [(remove # from line)]
    7. mail_smarhost = “dreamhost smtp server
  15. cd ~/hosteddomain
  16. cp -R $SHARE/htdocs wiki
  17. chmod -R a+rX wiki
  18. cd wiki
  19. mkdir ./cgi-bin
  20. cp $SHARE/server/moin.cgi ./cgi-bin
  21. chmod -R a+rx ./cgi-bin
  22. cd ./cgi-bin
  23. Edit file moin.cgi
    Find and change the following lines.  Please remove the # if they exist on THESE lines:

    1. sys.path.insert(0, ‘home/acctname/lib/python2.4/site-packages’)
    2. sys.path.insert(0, ‘/home/acctname/share/moin/dhwiki)
  24. cd ..
  25. Edit file index.html
    Find and change the following lines:

    1. <meta http-equiv=”refresh” content=”0; URL=cgi-bin/moin.cgi/”>
    2. Click <a href=”cgi-bin/moin.cgi”>here</a> to get to the FrontPage
  26. Go to your favorite browser and enter your wiki’s domain: Http://hosteddomain/wiki

Use these instructions at your own risk.  I extend no warranties or guarantees about the accuracy or safety of your data or website.

These instructions where tested by building the following wiki: http://MMonDH.brettski.com/wiki

All comments are welcome

References Used

Revision Information

  • 11/21/2009
    • Initial post after successfully building a wiki following exact steps
Is this a negotiation, or are you just not interested? I am spending about 40k a month right now on consultants, so I have plenty of money to spend. Culture, to me it’s directly impacted by budget and resources. At the time that we spoke my budget isn’t nearly as high as it is right now. If you are talking about working evenings you do that already.
11/20/2009 8:11:16 PM [email protected] (E-mail address not verified) Brettski *red+u When we first spoke, I was under the impression you no longer available after 6:00. You underpromised, so you could over deliver. I found out later that you were one of the hardest working guys that I know.
11/20/2009 8:13:30 PM [email protected] (E-mail address not verified) Brettski *red+u Maybe you don’t want to work that hard which is why it became an issue for you when I was pressing it. When I interview people, I always try and understand where their comfort levels are so I understand their boundries. The way I saw it is you wanted to have dinner with your family and got back on the computer later. Here is what I would ask for you to do.
11/20/2009 8:15:12 PM [email protected] (E-mail address not verified) Brettski *red+u Look at your last month, and figure how many hours you really worked. Was it 40-50? 50-55? or +55 hours per week? I am interested in knowing because I am guessing your somewhere between 50-55.
11/20/2009 8:18:46 PM [email protected] (E-mail address not verified) Brettski *red+u When we were in our discussions, you were giving me the perception that it could cause a problem for you at home if you were hoing to have to put in over 45 hours. What I really think is if you could make $110,000 in a 50 hour work week, or you could make $150,000 in a 60 hour work week I think you would probibly work 60. And then figure how you could get it down to 55… and then 52…
11/20/2009 8:21:25 PM [email protected] (E-mail address not verified) Brettski *red+u And at the same time you were doing that, you would get me from 65 to 58, and 58 to 52, and so on. So at the end of the day, it really comes down to how much my time is worth as well as your time. Which is something you might not be taking into consiteration when you limit your opportunities and not discussing this further.
11/20/2009 8:23:43 PM [email protected] (E-mail address not verified) Brettski *red+u Currently, I have 3 consultants I am paying 170,000 and they are not as smart as you are. They are down the street and you were down the block. At a certain point, I am sure you can understand that I can only afford to spend so much time in IT. I am ready to discuss dollars if you are. I am willing to discuss the boundries, or we can not discuss it at all.
11/20/2009 8:24:56 PM [email protected] (E-mail address not verified) Brettski *red+u Hopefully you at least know where I am comming from. Bottom line, I am sitting here writing big checks saying to myself. Would I be writing checks this big and having to invest the time if Brett were here?
11/20/2009 8:27:22 PM [email protected] (E-mail address not verified) Brettski *red+u I don’t mind writing the checks, what I mind is when I have ot write the checks and still put in the time. You asked me what my commitment to you would be. If we were to do something, I told you I would give you a year of 60 hours a week of helping you acclimate yourself to our company. Thats a big investment of my time. I apprechiated the question because no one had ever asked me before.
11/20/2009 8:29:59 PM [email protected] (E-mail address not verified) Brettski *red+u So here is what you have to ask yourself… Do I want to pass on the biggest financial opportunity of my life without going to see this man? The question I would ask you, is why would you want to limit your opportunities?
11/20/2009 8:34:35 PM [email protected] (E-mail address not verified) Brettski *red+u The only thing I can think of is that you would be affraid of the industry, maybe that you were getting dragged into the deep end of the pool, giving up a job that I like that I am currently doing. Also, I did hire a senior level programmer for more money than you were asking for when you were interviewing and I am willing to pay him. Because I see how much value he brings me.
11/20/2009 8:35:27 PM [email protected] (E-mail address not verified) Brettski *red+u I guess the question I would ask you is would you be willing to work with a programmer that makes more money that you did if he had the tallent?
11/20/2009 8:38:26 PM [email protected] (E-mail address not verified) Brettski *red+u We have an aggressive agenda, I am looking to bring in top guys to make my life easier. I think you would be a good fit. Tallent costs money, I realize that. Something to consider, the banks are looking to change the comp plans for the Loan Officers and cut what they pay the Loan Officers by 50% of what they pay now. They are doing this as a result of the pressure they are getting from the gov
11/20/2009 8:39:50 PM [email protected] (E-mail address not verified) Brettski *red+u The insurance companies that own mortgage companies are following suit. Which means that we have hundreds of people who are looking at our company as a result of massive pay cuts across the industry, which we are not participating in doing.
11/20/2009 8:41:18 PM [email protected] (E-mail address not verified) Brettski *red+u I know you have been looking for that 1 opportunity that you could capitalize on. Maybe this is it? Is it really that far from the relm of possibility?

Twitter has always been a big question mark in my head.  I must admit, I do use it more and more as businesses use it to send alerts, super sales, and general status updates.  And I suppose I wouldn’t of been able to deal with all of this information if it wasn’t for Tweetdeck.  What a good way to organize all the noise.  Personally I have setup a Loud group, for all those tweeters like Elijah Manor (@ElijahManor) and Jeff Atwood (@CodingHorror).  Then there is the main group, for most of the other stuff except for the ones in the last group, alerts.  Alerts are for my ISP and other providers who post system and service update via twitter.   I actually really like this functionality aspect of twitter, as I am watching one feed to get all my information.  In the past (and I guess I still do) I would have to subscribe to many, many rss or atom feeds.

Twitter in one respect is becoming  a bunch of bots following each others tweets.  There are so many apps out there which auto-follow based on keywords or when someone follows them, that you get these clusters of drones passing data to each other.  We should be careful you never know if this may become some AI cognitive network!