I always find these commands handy when working with apache.

Part of any VirtualHost config involves making the right directories and you can make your job easier by using curly braces. I suppose you could call it regular expressions. I don’t actually know the technical terms for it. I know it works in bash which is what I use on a daily basis.

Learn how to create directories without having to issue multiple mkdir commands. This is a pretty simple one.

mkdir -p /path/to/some/vhost/docs

This is fairly straight forward. Make the parent directories if they don’t exist. So if /path/to/some/vhost/docs is what you want, and /path or any of it’s children don’t exist, then it will get created. It’s a fairly safe command because it intelligently checks before creating directories.

This example is a bit more complicated but it’s awesomeness will blow you away. I used this when I was making virtualhosts for multiple domains or even sub domains of the same parent.

mkdir -p {sub1,sub2,sub3}.domain.com/{docs,logs,cgi-bin}

or

mkdir -p www.{domain1,domain2,domain3}.com/{docs,logs,cgi-bin}

that command will create all your directories in the appropriate hierarchy so that you don’t need to issue multiple mkdir commands. It will create the parent directories for you as well. Here is what it does.

$ find .
.
./www.domain1.com
./www.domain1.com/cgi-bin
./www.domain1.com/docs
./www.domain1.com/logs
./www.domain2.com
./www.domain2.com/cgi-bin
./www.domain2.com/docs
./www.domain2.com/logs
./www.domain3.com
./www.domain3.com/cgi-bin
./www.domain3.com/docs
./www.domain3.com/logs

You can also do that with ls.

$ ls -d www.domain{1,2}*
www.domain1.com    www.domain2.com

Or even with rm

$ rm -vr www.domain{1,3}*
www.domain1.com/cgi-bin
www.domain1.com/docs
www.domain1.com/logs
www.domain1.com
www.domain3.com/cgi-bin
www.domain3.com/docs
www.domain3.com/logs
www.domain3.com

Enjoy!

October 10th, 2009Tweeps4WP

It’s my very first WordPress plugin!

Tweeps4WP is a very simple WP widget that connects to twitter using your credentials and then gets the list of people that follow you or that you’re following I think they’re called tweeps. So spruce up your side bar with something a bit more unique.

It can display this list as “mini” profile images or as “normal” profile images. It also provides a link to the full list of whatever group you’ve chosen to display along with a link to your twitter home page. You can customize the title to fit your needs.

Unfortunately for those of you who are super security crazy, you’ll probably not like this little tid bit.

Tweeps4WP requires you to provide your twitter account password.

It stores in in the wordpress options table as clear text. It’s never displayed on the screen. Not even in the configuration panel in the dashboard so it can’t be copied out of the browser once it’s been saved. Hopefully that will ease your concerns a little bit.

I am considering changing the behavior by allowing an option that will let you provide the user whose tweeps should be displayed so you’re not storing your super secure twitter creds in a database.

You can see it in action (doing nothing) on the right side of this page. Twitters limitation is that it will only give you 100 tweeps at a time. That’s fine by me considering tweeps are listed reverse chronologically. People will see the most recent ones at the top.

I don’t know why i used that name. In retrospect, I should have called it something else.

Download

The download link is not active yet as it’s not officially released. I still have a few more kinks to work out if they can be worked out.

Changelog

Version 0.0.5
-bug in 0.0.4. Found immediately. normal images were no longer displaying correctly. Fixed it so mini resizes to 24×24 and normal to 48×48.

Version 0.0.4
-mini images from twitter aren’t always mini. They’re called mini but sometimes they’re normal. This update ensures that all images are resized to 24×24 just like twitter.com does.

Version 0.0.3
- got rid of the ugly error messages that appear when you provide a bad password. Just displays a message instead of broken code errors.

Version 0.0.2
– Fixed issue with justification of photos. Tested in Firefox, IE7, Safari, and Opera. Particular themes may decide to display this widget differently.
– Theme jQ does some goofy stuff with CSS which breaks the way that Tweeps are displayed. I will try to fix this in 0.1.0.

Version 0.0.1
– Initial release.

 

I don’t even know who called but here it is…

I think it’s Chinese (not even sure if it’s Mandarin or Cantonese) but I love the transcription from Google Voice.

Gimme some mo!


© 2007 wp | anoopdotnet | iKon Wordpress Theme by Windows Vista Administration | Powered by Wordpress