Great Link: Email Tool

I found this great link to help open email attachments:

Encryptomatic’s Free Online Email Viewer

It doesn’t happen often, but every once in a while, someone will send me an email attachment.  It is either a file that ends with “.eml” or a winmail.dat file.  GMail can’t open those attachments; it has a “View” link but that just shows the raw text that can be very hard to read.  Now, I can use this tool.

Email Attachments

The tool says that you can “Upload and View a .EML, .MSG or winmail.dat message”.  I haven’t used it a lot, but it has worked for me so far.  The only problem that I have had is that I haven’t gotten winmail.dat files to work yet:

Trying to upload winmail.dat

Time to Clean Up: Out of Space for New Kernels

This past update, I started getting a new error.  My /boot mount was full.  The problem was that I had 6 or 7 previous kernels still in the mount taking up space.

Boot Mount Full Message

I was able to fix it with a command written by Linerd.  He did a very nice job explaining it, so I would recommend that you follow through and read his post.

To make a long story short, I first ran the trial command:


dpkg -l linux-* | awk '/^ii/{ print $2}' | grep -v -e `uname -r | cut -f1,2 -d"-"` | grep -e [0-9] | xargs sudo apt-get --dry-run remove

Then, I ran the full command (without the –dry-run):


dpkg -l linux-* | awk '/^ii/{ print $2}' | grep -v -e `uname -r | cut -f1,2 -d"-"` | grep -e [0-9] | xargs sudo apt-get -y purge

Now, I am good to go!  Thanks Linerd.

Resources

Too Many Inodes

I recently switched to Host Gator, and they have policy about the number of inodes.  I just noticed that my account moved to “Not Backed Up” just recently.  So, I thought I would blog a few of the things I learned while exploring…

Determining the Number of Inodes in a Directory

I found this command would do the trick:

find . -printf "%i\n" | sort -u | wc -l

One of the advantages of Host Gator is that they provide SSH access.  I was able to login quickly and run the command in the different directories.  If you have a host that doesn’t offer SSH access, may I suggest PHP Shell?

Git Repositories

I had a rough guess that my git repositories might be part of the culprit.  If it’s based on the number of files, I guessed that git uses a bunch to track changes.  So, I did a little tinkering.

Sure enough, most of the inodes in my project are in the .git directory:


$ find . -printf "%i\n" | sort -u | wc -l
2050
$ find .git -printf "%i\n" | sort -u | wc -l
1195

I found a few options to try.  First, I tried the fsck command, but that didn’t seem to make a difference in the inodes:


$ git fsck --full
Checking object directories: 100% (256/256), done.
dangling commit 9e18c6e42e3f62127776bdd2f52608f904991e08
$ find .git -printf "%i\n" | sort -u | wc -l
1195

Next, I tried the gc command, and that seemed to make all the difference in the world:

# git gc --prune=today --aggressive
Counting objects: 912, done.
Delta compression using up to 16 threads.
Compressing objects: 100% (900/900), done.
Writing objects: 100% (912/912), done.
Total 912 (delta 525), reused 0 (delta 0)
$ find .git -printf "%i\n" | sort -u | wc -l
37

The repack didn’t do much:

# git repack
Nothing new to pack.
$ find .git -printf "%i\n" | sort -u | wc -l
37

WordPress Cache

My next culprit is the WordPress Cache.  For example, on one of my blogs, the cache accounts for 76% of the inode count.


$ find . -printf "%i\n" | sort -u | wc -l
23323
$ find wp-content/cache/ -printf "%i\n" | sort -u | wc -l
17766

Well, that is another task for another day.  This is where I will start though.  If you have any ideas, please comment.

Resources

Great Link: CDN for Angular, Bootstrap, etc.

I was looking for a CDN to use with Bootstrap and Angular, and I found a great resource.  CDNjs.com ended up doing the trick.  I also learned that you can discover many great Javascript libraries and projects by going through the offerings of different CDNs.  So, with that being said, here is a list of the CDNs that  I discovered:

Just to give you an idea of what I ended up with, here’s part of the <head> of my project.  I used the head javascript library for most of the javascript:

<head>
	<link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-combined.min.css" rel="stylesheet">
	<link href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/3.0.2/css/font-awesome.min.css" rel="stylesheet">
	
	<script src="//cdnjs.cloudflare.com/ajax/libs/headjs/0.99/head.min.js"></script>
	<link type="text/css" href="css/devtools.css" rel="stylesheet" />	
	
	<script>
		head.js(
			//  https://groups.google.com/forum/?fromgroups=#!topic/ace-discuss/rNckG17-7ac
			//  http://stackoverflow.com/questions/5733275/chrome-uncaught-syntax-error-unexpected-token-illegal
			"//d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js",
			"//cdnjs.cloudflare.com/ajax/libs/jquery/1.9.1/jquery.min.js", 
			"//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/js/bootstrap.min.js", 
			"//cdnjs.cloudflare.com/ajax/libs/angular.js/1.1.1/angular.min.js",
			"js/app.js",
			function() {
				/* My initialization ... */
			}
		);
	</script>

If you know of a CDN that I missed, please comment below!

Resources

Google Voice Voicemail Rings

I have really enjoyed using the Google Voice option for voicemail on my cell phone.  The cool part is that it sends me an email with the voicemail message.  The message is attached in sound form and it also makes an attempt to do voice recognition.  The one disadvantage is that it rings way too many times.  Some people give up on leaving a message because it rings so many times.  Well, thanks to Evan Wondrasek, I found a fix!

Here’s the original article:

Techorator: How to Prevent Extra Rings using Google Voice as Voicemail

Read More

Troubleshooting: Playing DRM Videos from Amazon

This is the second time this has happened.  I keep getting:

Sorry we were unable to stream this video.  This is likely because your flash player could not be updated.

I had just reinstalled my media laptop with Linux Lite OS (a flavor of Ubuntu), and I was trying to watch a video from Amazon.  It was one of the Prime Instant Videos.

To fix the issue, I followed McDougall’s instructions.  Basically, it was just installing the “hal” package and deleting the .adobe and .macromedia settings directories:

sudo apt-get install hal
rm -r ~/.adobe ~/.macromedia

Finally, I rebooted and retried.  It all worked fine after that.

Resources

Fixing Super Tux Kart

Super Tux Kart is a fun game that my son and I have gotten into.  It has recently improved quite a lot, and we have enjoyed playing it.

But, just recently, I found that it crashes a lot.  It’s not predicable, it will either freeze the X display or it will just close in the middle of a race.

So, I decided to do a quick Google search to see if there was a solution out.  I can’t find the article now, but something suggested that maybe it was a bug that was already fixed.  I found I had version 0.7, and version 0.8 was available.

On the download page, it suggested a repository.  So, I installed this repository:

sudo add-apt-repository http://ppa.launchpad.net/stk/dev/ubuntu

To get it to install, I ran the regular apt-get update…

sudo apt-get update
sudo apt-get upgrade

After that, I had the 0.8 version.  In addition, the crashes seem to have gone away, so far.

Fixing NAT for Virtual Box on Ubuntu

For some reason, NAT quit working for me in Virtual Box.  Everything works fine, but the machines won’t connect to the Internet unless I change them to bind to a particular adapter.  The problem is that I use different adapters based on my location.  At the office, I have a docking station and the network goes through the USB connector.  At home, I use wireless.  So, when I bind, I have to remember to change the adapter for it to work.  If I use NAT, it doesn’t matter.

So, here’s how I found I could fix NAT to work again.

Read More

Serverless Download

I have a little time-tracking tool that I have been using to track my billable time.  The program stores everything in the local storage within the browser.  The challenge comes when I want to export or backup the information stored in the browser.  I don’t want to force the user to send the data to my website just so it can turn around and download it back to the user’s hard drive.

Here’s the solution that I came up with:

Read More