WPMU Recent Posts Widget

Posted in Development on April 8th, 2009 by Angelo – 10 Comments

Update:  Another developer has created an updated version of this plugin.

First of all, let me preface this posting by saying there are a lot of versions of a “sitewide” plugin to show recent posts.  There are however, no widgetized versions that I could find, so I made a simple one.

Download WPMU Recent Posts Widget

Latest version 1.1

http://wordpress.org/extend/plugins/network-latest-posts/

Sending Money to China

Posted in Finance on March 1st, 2009 by rsgerard – Be the first to comment

Just wanted to clarify what is happening…

1. There are X amount of dollars circulating in the US (called M2).
2. We pay 30% of our money to the gov’t.
3. The gov’t “spends” our taxes on the U.S. and the money ends up back into the system plus the deficit (borrowed money in the form of Treasury Securities).
4. Since we have so much debt, a lot of the money created goes  to paying off interest to other gov’ts and never ends up back in our economy so the amount of money in the US stays pretty much the same, but each year the gov’t gives more and more money to other countries as Treasuries.
5. The “Rich” think that they deserve the money they have extracted from the system but, it is because of them “gaming the system” that we have to produce more money each year.

I found this when I was trying to figure out how much of our money China has.
http://news.bbc.co.uk/1/hi/business/6106280.stm

Basically, if China put it’s surplus into the system it would cause significant inflation as suddenly there is a lot more money circulating. It’s like we sold them money that they can’t use and only holds it’s value if they don’t get rid of it.

Look at that chart on the bottom. So, you better learn Chinese.

I’m Not a Blogger, Really – The Secret About Blogs

Posted in Default on February 10th, 2009 by Angelo – 3 Comments

I’m not a blogger really–if you didn’t already guess by my posting infrequency.  But I do own and use a lot of what people call blogs.  I just don’t like to see them that way.

You see, I’ve been making web pages since 1995, and had a personal home page (remember those?) since 1996.  My first page was rather minimalist, and in a sense, a rebellion against what I’m doing here–writing a dialog with you in typical “blog post” fashion.  Back then I felt that no one really went online to know more about a complete stranger.  I still think I was right about that at the time (although things have changed).  At least I sure never cared about what most people put on their home pages at that time.  My page was utilitarian:  find resources related to gaming, programming, music, or whatever else I happened to be interested in.  More accurately, it was useful to me, a place I could store and show off a few things, including a rather cool photo album for the times.

So I had web pages.  I knew HTML.  The web got more complicated.  Sites like fortunecity or geocities offered free web space, and had “web page builder” software.  The web got even more complicated.  Not only did the web page builders fall short of meeting expectations, but writing a web page by hand got more and more tedious as the HTML and CSS spec started to demand higher quality pages.  And then came blogs, or web logs.  I thought they were retarded.  It was a throwback to the old personal home page days (and actually I was kind of right about that too), where people would narcissistically post things about what they did in their everyday lives as if we were interested in reading their personal diary.  I really didn’t like the word “blog” either.

But eventually I started looking for ways to not have to write all that HTML, CSS, and PHP code anymore.  (Honestly, I guess with PHP included headers and footers, I probably spent less time creating websites back then than I do with upgrading WordPress and installing plugins now.)  WordPress was pretty nice, but I didn’t have any use for an online “diary.”  My first “blog” was just a simple web log that I kept as notes on Linux configuration that I had done to the server I was running.  So all the entries looked roughly like this:

New IMAP Certificate

Generated new IMAP certificate:

openssl req -new -x509 -nodes -out /etc/ssl/certs/imapd.pem -keyout /etc/ssl/certs/imapd.pem -days 365

Yeah, that’s it sparky.  But at least I had found some use for blog software.  And the great thing about it was, I could quickly post new content without having to fuss with making a web page.  And that is the secret about blogs. They reduce the complexity of making web pages that even the page builders couldn’t do because the page builders tried to let you do too much.  In other words:

Blog software provides the structure for your content, making it consistent and easy to both post and navigate.

Forget about diaries.  Your “blog” is just a web page, if you want it to be.  This is true especially with WordPress.

My next blog was “Angelo’s Notepad” and I appropriately selected the Rubrick Theme which had been pretty popular at that time and fit the blog title pretty well.  Angelo’s Notepad was really just a place for me to throw up things I didn’t have time to format and put up more “formally” on my websites.  But then, WordPress did the best thing it could have done for people like me:  it created wonderful support for “pages” as well as “posts” and allowed you to set a page to be the front page.  This is all you need to create a website.

So I use WordPress to build websites.  Does that make me a blogger?

Using your 401(k) before you retire

Posted in Finance on January 21st, 2009 by Angelo – Be the first to comment

Summary

The bottomline is a 401(k) loan to yourself makes sense in the following situation:

  • You need to take out a loan anyway.
  • Your only other options have an interest rate of over 3%
  • The amount you can take is sufficient to cover the loan
  • You can pay back the loan within the time limit

Did you know that you can use your 401(k) as an account to take a loan from?  It’s true.  When I first found out I did a little investigation, to see if there were any catches.  Although some people advise against using your 401(k) this way, I think it’s better than taking out a loan and paying someone else a higher interest rate.  So let’s take the list of pros and cons from MSN Money with my own comments:

Advantages

  1. There is no credit check. You don’t have to apply for the loan, and you can make plans knowing that you will get the loan.
    The point here is you’re using your own money.  I’m a big fan of using your own money first instead of borrowing from someone else.
  2. There is a low interest rate. You pay the rate set by the plan, usually a couple of percentage points above the prime rate.
    I’m not sure how this interest rate is decided.  I know in my case, the company that manages my 401(k) has a set interest rate.  Is this a legal mandate?  What if I just created a personal “loan company” that would lend to me at 0% interest, issued myself shares which I bought with my 401(k) instead?  Shouldn’t I be able to choose my interest rate since I’m really just “investing” my money in another vehicle?
  3. It provides a great return. If your money market account is earning 3% and you pay yourself back at 6% or 7%, it looks like a good deal.
    Wrong.  This is not an advantage.  Paying yourself back an interest rate (all of which must be after-tax) is really no advantage at all.  The advantage you get is that you didn’t take out the loan and pay someone else interest.
  4. The interest is tax-sheltered. You don’t have to pay taxes on the interest until retirement, when you take money out of the plan.
    Again, see above.  You already paid taxes on the interest because you’re using after-tax money.  You will be taxed on the interest twice. You will be paying an extra 20 – 30% in double taxes on the interest you are putting back in!  So if you are borrowing at 6% from your 401(k), it could be equivalent to borrowing from a bank at 2% because that amount will eventually go to taxes one day.
  5. It’s convenient. Some plans only require you to make a phone call, while others require a short loan form.
    Yes, it’s convenient to use your own money.  Just make sure you really want to take out the loan.

Disadvantages

  1. About that credit check: Of course there isn’t one. You’re not borrowing anything. You’re spending your own money.
    I really don’t see how this is a disadvantage.  If you need to take out a loan, using your own money is better than using someone else’s and paying them interest.
  2. You’re losing interest. The net effect is that you have less money to invest and to earn interest. The money you borrow — or take out — of your retirement plan no longer appreciates in value from interest, dividends and/or capital gains in conjunction with the rest of your investment portfolio. Remember that you aren’t really borrowing. All you are doing is using money from one account, such as your checking or savings account, to repay the money you borrowed from your 401(k). And when you take money out of that checking or savings account, that money loses interest, too.
    Yes, you’re losing interest on the money by virtue that you’re using it for something.  Again though, this can be better than paying the interest to someone else, depending on how the market is doing.  If you’re making 8% interest on your 401(k), you could be losing up to 10% effectively.  So if someone else will loan you the money for 8%, it’s better to take out the loan instead.
  3. It’s not tax-sheltered money anymore. Whether you repay the 401(k) loan out of your salary or from a bank account, those payments are all made back into the 401(k) with after-tax dollars. So, let’s say your monthly interest payment is $300 and you’re in the 28% tax bracket. You’ll have to make $416 in gross earnings to make the $300 payment. Then, when you retire and take withdrawals, you pay taxes yet again.
    This is neither here nor there.  The money you get from the loan is pre-tax anyway, so paying it back is equivalent, even if you’re paying it back with post-tax money.  Get it?  The only money you get double taxed on is the interest.
  4. Unless you repay the loan, it is considered a premature distribution. You would owe federal and state income taxes as well as that 10% penalty if you are under age 59 1/2.
    Yes, you better make sure you pay back this loan on time or it’s a horrible deal.
  5. The loan isn’t tax deductible. It’s considered a consumer loan, so there is no tax advantage.
    Ok, but why is this a disadvantage?  All things being equal, why should we expect our loans to be tax deductible?
  6. It affects your psychology toward retirement saving. If possible, your retirement money should sit untouched until you retire. It’s too easy to get in the habit of dipping into your 401(k) instead of saving for things you need along the way. Keep your 401(k) in a loan free zone.
    Yes, so basically if you can “do without” the loan to begin with that would be best.  It is good to pretend that your savings aren’t there for use.

So overall the biggest disadvantage I can see (to those of us who know how to control our spending) is the loss of potential interest in whatever investments you have in your 401(k).  That means the current economic conditions it wouldn’t be such a bad move.

Dragonskin WordPress Theme

Posted in Development on October 17th, 2008 by Angelo – 54 Comments

Wrap your blog in the skin of a dragon! This is a dark theme that has a nice look for RPG and gaming sites. I originally developed this theme to go along with my D&D fan site. It features CSS-drive drop-down menus, support for multiple authors, and fluid width for flexible resolutions. (See below for full list of features and details.)

Download Dragonskin 3.0

dragonskin screenshot

Example Site Using Dragonskin

If you like this theme please rate it at WordPress!

Downloads

Features

  • Author profile pages that feature the authors as well as their posts.
  • Navigation bar with drop-down menus
  • Support for multiple colors
  • Header image support for site logos

Integrated Support for Plugins

Image Credits

If you like this theme please rate it at WordPress!

CD/DVD Filesystem Snapshot

Posted in Systems on August 21st, 2008 by Angelo – Be the first to comment

This will work with other filesystems, not just ext2, so you may want to choose a filesystem that is similar to what you currently run (if you care). The idea is that instead of creating an ISO image that is very flexible (can be read by Windows), you create a filesystem image and burn it to disc. The advantage of this is that you can preserve filesystem properties such as permissions, ownership, etc. The disadvantage is that the straightforward approach (everything on one disk) only gives you about 4.5 G of space to work with (depending on the media size).

(1) Create a 2 GB image:
sudo dd if=/dev/zero of=snapshot.img bs=1024k count=2000 &
You can create a larger image size if you need it, and your burnable media can handle it.

(2) Format it using ext2
sudo mke2fs -m 0 -q -F -b 2048 snapshot.img 1>&2
Honestly, I can’t remember why I was redirecting output to stderr. Maybe I had a good reason for that. But suffice it to say, you simply want to use the file you created to make a file system. For example, instead of the above, you can use something like `mkfs -t xfs snapshot.img`

(3) Mount the image
sudo mount -t ext2 -o loop snapshot.img /mnt/snapshot
For the mount, you want to make sure to use whatever filesystem type you created the image with.

(4) Copy the data, preserving information
sudo rsync -avH --numeric-ids --progress --stats --delete --exclude /proc/ \
--exclude /sys/ --exclude /tmp/ --exclude /var/run/ --exclude /var/tmp/ \
--exclude /mnt/snapshot/ / /mnt/snapshot/

This is an example of copying the entire system (if it’s small enough to fit). In this example, you want to make sure you exclude the mount point for the snapshot, because otherwise you’ll have a recursive rsync that will go on forever. It’s definitely good to make sure you exclude /proc/ and /sys/ too. You could exclude /dev/ since today’s Linux just regenerates it on boot anyway. (If you were porting to other hardware you may want to do this to be “safe” but usually it’s safer to just keep a copy of it.) –progress and –stats are extraneous options, and if you’re a neat freak, you can use –delete-excluded too to make sure those directories are cleared out in case you accidentally copied things over.

(5) Unmount and burn using cdrecord
sudo umount /mnt/snapshot
sudo cdrecord -v -eject dev=/dev/cdrom snapshot.img

You can alternatively use any burning software to apply the image directly to burnable media.

Now keep in mind, that when you want to mount this CD/DVD you will need to mount it by hand, as root, using the filesystem type you burned it with. It’s a good idea to write the fs type on the CD along with whatever else you’re going to call it so you know how to mount it later.


rsync --verbose --progress --stats --compress -a --delete -H --numeric-ids --exclude "#*#" --exclude "*~" --exclude "/proc/*" --exclude "/dev/*" --exclude "/var/cache/*" --exclude "/tmp/*" --exclude "/var/tmp/*" descartes:/ /mnt/backup/rsync/descartes/

Windows Hosts File

Posted in Systems on August 10th, 2008 by Angelo – Be the first to comment

Did you know that Windows also has equivalent to /etc/hosts where you can set IP addresses for domain names? It’s a plain text file in the same format, and it’s typically found in one of these two places:

  • C:\winnt\system32\drivers\etc\hosts
  • C:\windows\system32\drivers\etc\hosts

Notice how they kept the etc/ directory? Hmmmmm ;)