Blog

Install and Use LESS on Dreamhost

I am working on a few websites and recently started using LESS CSS for creating my CSS. Anyways, I am using a Dreamhost shared server for not only my website, but other projects I am working on. Unfortunately with a shared server account, you don’t have access to sudo, so you can’t install applications. I got tired of editing my LESS files on the server, copying them locally or doing the git push and pull boogie, running a make file to build the css, and then pushing the css back to the server. I searched and searched for the answer and never found out. However, I did remember that I used to do a lot of Debian and Ubuntu packaging not all that long ago and figured I could just download all the files I need from the Ubuntu archive, extract them, and put them in their proper place. After doing all of this manually and testing it that everything worked just how I needed, I decided to write a script to do all the work. That way there I didn’t have to use this blog to provide step-by-step instructions.

Getting the script

You can either use git to grab the file or you can simply grab the script only.

With git:

git clone git://github.com/nixternal/dreamhost_less_compiler_install_script.git

If you grab the script from the above link, you will need to make it executable:

chmod +x dh_less_inst.sh

Running the script

Here comes the easy part:

./dh_less_inst.sh

What does the script do?

The script simply downloads the necessary packages from the Ubuntu archive, or a tarball if it isn’t in the archive. The following is a list of everything that gets downloaded and installed as well as where it gets placed: NOTE: $PREFIX defaults to ~/.local/usr

  • lesscss – git clone of the lesscss source. bin/lessc and lib/less moved to $PREFIX
  • libev – tarball configured, built, and installed to $PREFIX
  • node.js – deb file extracted. bin/node moved to $PREFIX
  • libc-ares, libssl, libicu, and libv8 – deb file extracted. lib/ moved to $PREFIX

What you need to add to make it work

You just need to add 2 lines to your shell’s rc file. In my case I added them to ~/.zshrc, but by default Dreamhost shared servers use ~/.bash_profile. Here are the 2 lines to add:

export PATH=$PATH:$HOME/.local/usr/bin
export LD_LIBRARY_PATH="$HOME/.local/usr/lib"

Source the edited file or log out and back in for everything to work.

Conclusion

If you have any problems, please leave a comment below.

Posted in Development | Tagged , , | 1 Response

Mom Finally Using Linux

Just not on the desktop yet. She went out almost 2 weeks ago now and purchased an iPhone 4 because everyone said it was the best smart phone for new users. I even recommended due to word of mouth from new users and iPhone fanatics worldwide. Boy were we wrong! Where is this amazing usability I keep hearing about with Apple products? I played with the phone for a couple of hours and my conclusion, and opinion, is it sucked! Hardware wise, screen wise, and usability wise, it flat-out sucked! Oh, and mom couldn’t agree more with me on that

So today she took the iPhone back, headed over to Costco, and got hooked up with a free Droid and a complete accessory pack. Her total was $15 which was just the taxes on the value of the phone. She now has a way bigger screen, 2 cores of 1.2GHz of love, twice the storage of the 16GB iPhone, and more apps at her fingers than she knows what to do with. One thing I noticed when she had the iPhone, is that she wasn’t intrigued, or really interested in messing with it. With the new Droid, she hasn’t put it down. The only thing she is missing is some silly graphical waste of phone case now. One mistake I made though, is I didn’t transfer her contacts or pictures off of the iPhone before she returned it. Luckily we have her old phone she upgraded to the iPhone from. It is as dead as one could get, but luckily I was able to snag her contacts off of the SD card and import them in her new GMail account in seconds. She hadn’t realized I did that until I heard her say, “Oh, there are my contacts, hrmm!” She thought they just magically appeared ๐Ÿ™‚ The photos are a loss unfortunately, or fortunately for many. You see, mom was damn near on her death-bed this summer, and while on it, she received really nasty bruises from all the needles injected. Well, she thought it was a good idea to take pictures of them to show to people. Now people will not have to hold back throwing up all over the place, so I guess I kind of won there ๐Ÿ™‚

Also on the Android front, I got a Kindle Fire free in December. A stock Fire sucks the big one. Luckily a few hackers are creating an ICS ROM for it over at XDA Developer Forums. I put it on the other day and finally the Kindle is worth the $199. There are still a few minor bugs, but I can use it and be happy I am not looking at the garbage that Amazon created. If I were Google, I would make Amazon stop telling people it is Android.

Posted in Linux | Tagged , | 5 Responses

Keep The Lights On

OK, as I am sure you are all aware, the SOPA Blackout crap is upon us. Yes, I called it crap. Sites like Google and Wikipedia are planning on blacking out, but they are going to do so in a non-disruptive kind of way. They aren’t going to just blackout their website with a bunch of SOPA garbage and links. Also, if you aren’t a large website that is useful to millions, blacking out your website is doing nothing more than trying to make you look cool. That’s right, if you have 7 visitors a day to your blog, don’t black out. That is just plain silly. If you think you need to look cool and black out, at least do it correctly with a 503 Redirect, or just blacking out words longer than 5 characters. Don’t know what I am talking about? THEN DON’T BLACKOUT YOUR WEBSITE! But, if you still have to try to look cool, Google how to 503 or blackout certain words before midnight.

Right now, support in the house is about 50/50 on SOPA and PIPA. If it does pass the house, I am certain it won’t make it out of the senate. The senate realizes everyone in the house are idiots and takes their bills with a grain of salt, or the speaker just ignores it like in recent times. Say for instance the senate gets a wild hair in their ear and they pass it, now it is up to Obama. Now, whether you like him or not, his plan is to veto it. He knows it is BS as well as many others in the senate know.

So, if you aren’t a huge website and your panties are still in a bind…AHH WHO AM I KIDDING, YOU WANT TO BE COOL. WELL, YOU AREN’T COOL, SO KEEP THE LIGHTS ON, DON’T BLACKOUT BECAUSE GOOGLE AND WIKIPEDIA ARE DOING IT!

As you can see, blacking out your website or parts of it doesn’t make you look cool, it is actually annoying.

EDIT: You Ubuntu & Open Sourcers, this isn’t meant for you! I expect you all to blackout ๐Ÿ™‚ This is for my non-techie friends who think that blacking out their Blogspot/Blogger site will save their iTunes and porn.

Posted in Personal | Tagged , , | 2 Responses
  • Archives


semidetached
semidetached
semidetached
semidetached