Author Archive

Lonestar WordPress Theme (Style for simpleX)

Posted in Development on November 21st, 2010 by Angelo – Be the first to comment

My site, BitFreedom, uses the simpleX theme.  This theme is nice and simple, and best of all designed to be customizable.  It really saved me the trouble of creating the “Lonestar Theme” from scratch.  I also started using it for other sites, and it quickly became obvious that with a few simple modifications I could easily just drop a CSS file into the directory and have simpleX automatically pick it up.

Some time ago (July 2010) I emailed the author with my changes so he could put them into the next version of the theme.  However since the next version seems to be a long time coming, I’ve decided to post my changes here.

So here it is, my simpleX patch (along with the Lonestar style):

Lonestar Screenshot

Example of the Lonestar Theme

Installation

  1. Copy the functions.php file over to the simplex theme directory (overwrite).

    functions.php.orig is a copy of the original (version 1.3.3)
    functions.php.patch is a diff between the two

  2. Copy the contents of the css/ directory over to the simplex/css/
    directory.

    This directory contains an example of a custom theme.

Customized Bash Prompt

Posted in Systems on July 12th, 2010 by Angelo – Be the first to comment

The following sites inspired me to explore creating a customized prompt (for bash):

So here is mine:

PS1="\$(if [[ \$? != "0" ]]; then echo \[\e[31m\]; fi)\n\$(date)\n\\[\e[1m\\]\[\$(dirs)\]\n\\[\e[m\\]"
PS2=""

Features:

  • Color change on error return code
  • The current date
  • The current directory stack (I use pushd and popd)
  • Commands start on their own line

And that’s it!  I really don’t need the prompt to tell me what my username is or the hostname of the machine (duh!).

Rsync Speed-up

Posted in Systems on May 25th, 2010 by Angelo – Be the first to comment

Online docs say that rsync sends only the differences and “information about structure” but my experience seems to indicate otherwise. So I ran a little test too on a file where I just changed the timestamp without changing the file contents:

$ cp -a testfile-100M destfile

$ rsync -av testfile-100M destfile
sending incremental file list

sent 56 bytes received 12 bytes 8.00 bytes/sec
total size is 104857600 speedup is 1542023.53

$ touch testfile-100M

$ rsync -av testfile-100M destfile sending incremental file list
testfile-100M

sent 104870495 bytes received 31 bytes 113804.15 bytes/sec
total size is 104857600 speedup is 1.00

I didn’t time it, but the initial cp easily took 1/3rd the time the final rsync did–I would estimate more like 1/4th or 1/5th the time. I’ve always read “speedup is 1.00″ as “this is equivalent to having copied the whole file.” Meaning I gained no speedup over just transmitting the file regularly, as calculated by the algorithm.

I think what might be going on is that when rsync sees the timestamp has changed it transfers the file. But in doing so, it does a diff on the contents which is slower than just copying a file.

8 Guidelines for a Successful Site

Posted in Default on May 25th, 2010 by Angelo – Be the first to comment

#1 Care about what you’re writing
You will be way more successful if you have a passion about what you’re writing.  You should also care about how the site looks, the ease of getting to information, and the quality of the content.

#2 Provide something useful or at least purposeful
Define your site.  What is the purpose of your site?  Would readers want to visit more than once?  What makes your site unique from other sites?  Your goal is to try to add value to the web and to the community.

#3 Don’t build a site that embarrasses you
If you can’t comfortably put your name on the site and let people know who you are, then you probably shouldn’t build it.  It’s not that people who build junk sites don’t make money, but it’s a lot easier to advertise for a site when you’re willing to tell people what it is.

#4 Don’t get greedy
Don’t cash in too soon and make sure ads are subtle and don’t detract from content.  Putting ads on your site too early can kill your site or make it look like web spam.  A site must give people a sense of an established presence before it can get away with advertising.  Nothing kills a new site faster than tacky ads.  Offer your content graciously.

#5 Plug your site whenever you can
Your return label on regular mail can have your website.  Your email signature can contain a link to your site.  Same goes for forums.  Just remember the previous rule:  don’t embarrass yourself–if you need to hide your real identity, it’s probably overdoing it.

#6 Focus on traffic, not search engines
Search engines should be trying to optimize themselves to find good sites.  Make your site good–a good site has a lot of people that want to visit.

#7 Seed your site
If you’re planning on running a site that has community-driven content, start by trying to seed the content you have to get things started.  You need to have something there to attract the first people.

#8 Find a niche
The less competition the better.  Try to have a site that is focused towards a particular audience that is being less serviced than it ought to.  Better to be the master of one specific area, than a jack of all trades.

DOS Disk/Flash BIOS

Posted in Systems on April 12th, 2010 by Angelo – Be the first to comment

These are some notes on making a DOS disk using FreeDOS for those of us with Linux needing to do things like flash our BIOS.


wget -c http://fdos.org/bootdisks/autogen/FDOEM.144.gz
gunzip FDOEM.144.gz
mount -t vfat -o loop FDOEM.144 /mnt/floppy

Put the driver files on the floppy (stay within the space limit)

umount /mnt/floppy
mkisofs -o bootcd.iso -b FDOEM.144 FDOEM.144

Is WordPress Becoming Bloated?

Posted in Default on April 2nd, 2010 by Angelo – Be the first to comment

I like WordPress–a lot. It’s been my saving grace for constructing websites without having to write the code from scratch. But it’s gotten very, very bloated. I took a look at version 3.0 and the upcoming changes. It looks ok, but it worries me for the future. Now users actually expect updates and new features on a regular and frequent basis.  Whatever happened to just wanting something that worked well, and was patched for bugs and security?  I’m also worried about backward compatibility of things like themes and plugins.

Part of the reason I like WordPress is because it’s written very well compared to most open source LAMP products that came before it.  It has a plugin and theme API which is relatively simple to learn.  I would prefer WordPress to focus on improving the robustness of the API, rather than adding new features.

Overall I’m fairly confident in WordPress’ developers to keep things straight.  I just hope they’re not making changes just to keep themselves relevant.

Dragonskin Child Themes

Posted in Development on January 20th, 2010 by Angelo – 10 Comments

Latest News: As of November, 2010, these child themes are no longer necessary.  Instead, Dragonskin version 2.1 and later supports selecting a preset color from the WordPress admin area.

The Dragonskin Theme now also had child themes to give your site the skin of a different colored dragon. The child themes should be included in the download for the theme, and are simply used to modify the color scheme. You select them just as any other theme.

Note: The WordPress repository did not support child themes when I uploaded version 1.5.  Therefore, they will not be included in that package.  Please download them from this page below (added).  My intention for the next version is to include all of them in one package with an switching tool on the admin menu to select the one to use.

Dragonskin Gold

Dragonskin Gold Screenshot

Dragonskin Gold

Download Dragonskin Gold 1.5

Dragonskin Green

Dragonskin Green Screenshot

Dragonskin Green

Download Dragonskin Green 1.5