Watch Star Wars Episode 4 in ASCII

For an incredibly awesome way to spend some time geeking out, watch Star Wars Episode 4 – A New Hope – all in ASCII text

Someone put in some time and effort to recreate the first released Star Wars movie A New Hope all in ASCII text.  It isn’t complete yet, but there are about 20 minutes of fun just waiting to change your life.

This will require telnet, so swing over to your terminal.

Once you are in your terminal, follow these steps:

Type
telnet

At the telnet prompt, type
o towel.blinkenlights.nl 23

Sit back and watch awesome happen before your very eyes!

starwarsepisode4_ascii

Dealing with mystery characters in excel

It is common to extract data from a database into an excel spreadsheet.  It is also common for the results to have funky characters, lead and trailing spaces and other such nonsense that mess up the formatting.  We can pull out our hair trying to guess what these characters are and it is not fun dealing with them so our formulas work.

Here is a step-by-step process to identify these characters and remove them.

  1. Copy the cell containing the mystery character.
  2. Switch to Word and choose paste special/non-formatted text – this will paste the funky characters as well as the cell content.
  3. Display paragraph marks in Word.
  4. Place the cursor just to the right of the mystery character and press ALT-X.
  5. The mystery character will change to the Unicode representation.
  6. The Unicode character can be found in this table and the resultant Ascii character code can be referenced by clicking on the Unicode for your mystery character.
  7. With the Ascii code # in hand, you can now do a global find/replace command.
  8. Select the column, row or whole spreadsheet according to where you want to find and replace.
  9. In the Find box, hold down the ALT key and type the four character code – notice that this has to be a four character code, so if your Unicode was 00A0 with resultant Ascii of 160, you hold down ALT and type 0160.  So add leading zeros to get to four characters.  Also, for entering codes on the mac, see this page.
  10. Make sure the Replace with: box is blank, which will just remove the mystery characters with nothing.

Done!

Download youtube videos for offline viewing

A nice utility to download youtube videos for offline viewing is available and is set up similarly for both mac and linux.  The following shows that utility setup and use.

To download a youtube video for offline viewing using youtube-dl, follow these steps.

  1. For mac, start a terminal session by searching ‘terminal’ in the spotlight and selecting the terminal application

spotlight terminal search

  1. For linux, start a terminal session by right-clicking on the desktop and selecting terminal from the option menu that pops up
  1. In the terminal do the following:
sudo curl https://yt-dl.org/downloads/2014.05.19/youtube-dl -o /usr/bin/youtube-dl
sudo chmod a+x /usr/bin/youtube-dl
youtube-dl -U
mkdir youtubevids
cd youtubevids
  1. Now you are ready to download a youtube video.  Find the link for the youtube video you want to download and build your command as so:

youtube-dl -citk –max-quality FORMAT <youtube link goes here>

You can find a youtube link by opening the video to watch it and copy the content of the URL address.

youtube video address

Example command:

youtube-dl -citk --max-quality FORMAT http://www.youtube.com/watch?v=j_mCQn0lLgI

I did this on my mac, and the end result in my directory is an mp4 file that can be moved to my iPad, iPhone or other compatible device.

Also

You can download a whole playlist by getting the playlist URL and substituting this for the video link.

Warning

Downloading a playlist will download all the videos in the playlist. Make sure you have enough hard drive space at the location where you created the directory in step 2 above.

I just received an email indicating that my PayPal account had recently been limited for some reason.  The email is below and you notice that it provides a link for me to log in and see the reason and resolve the limitation.

This is a scam, and we can talk about why

If you receive an email like the one below, do not fall for the scam!

Notice several questionable issues with the email.

Screen shot of actual email I received

Screen shot of actual email I received

PayPal has been known to put limitations on accounts. HOWEVER, NEVER log in to a website from a link provided in an email.  PayPal won’t do this and neither should you.

Go to the website directly www.paypal.com and log in.

I did this and also clicked the link (in another browser) and found several differences between the two results.

First, take a look at what I found with the website that the email link brought me to.

paypalscam2_20140402

bogus paypal scam link

The actual PayPal website login screen

Legitimate PayPal website login screen

Legitimate PayPal website login screen

Nerd first, Music aficionado next!

Yes, this describes me in reality…

Screen Shot 2013-11-20 at 8.50.47 PM

Map your network

Well, the totally free linux approach is this command: (it does require sudo)

sudo nmap -sP 192.168.1.0/24

This will give you a list of all the hosts on your local network.

If you want a prettier report, you can use fingbox.  Fingbox has a great app for iPhone and Android but also has desktop apps for linux, mac, windows and even Rapsberry Pi.

Since I am working in a terminal using ssh, I downloaded the 32bit debian version of the file with the following command:

wget http://www.overlooksoft.com/packages/linux32/overlook-fing-2.2.deb

Their website has download links if you prefer to click a link.

Install as follows:

sudo dpkg -i overlook-fing-2.2.deb

Then scan your network with your new tool.

sudo fing

rsync – best cp tool

I recently had to move a bunch of stuff off one external drive to another.  After considering all my options, I settled on rsync.

Now, rsync will work both on mac and linux. Though it is not native to Windows.  See notes at the bottom regarding a Windows solution for rsync.

I am using a mac, and have found the following command to be adequate:

sudo rsync -a /Volumes/tosh1TB /Volumes/FreeAgent\ GoFlex\ Drive/

The sudo is for getting around the permission differences between files and directories. You will not need this if all the files and directories you are copying are owned by you.

The -a option will give you a recursive archive that maintains ownership and other file specifics that I didn’t want to lose.

For a Windows friendly rsync solution, my friends over at The Geek Stuff, have written up a nice article on DeltaCopy here.

Show directory size on mac

Sometimes I want to see how large a directory is prior to copying or to see what has changed.

The first and most basic way is with the du command.

du -h --max-depth=1 .

The command above will list all the subdirectories and their sizes for the current directory up to one level.

What’s my current directory? Well, that command is like so:

pwd

Here is an easy terminal command to show the current directory size:

find . -type f -exec ls -l {} \; | awk '{sum += $5} END {print sum}'

This will give a total count in bytes without listing pages of directories or files first.

If your directory has subdirectories that span multiple user permissions, proceed with sudo to avoid Permission denied errors.

After more work with directories, I put together a string that I am happy with. This will list size of  directories within a given directory up to your specified levels of directory.

du -h -d 2 /Volumes/yourdrive/Users/ | sort -nr

So for the above command, I list all the directories up to 2 levels inside the Users directory with size in human readable format and sorted by size descending.

This lists each users directories so I can see what is using the most hard drive space.

Of course it is Music and Movies, who would have guessed it?

Oh, and check this crazy talk out… when stuck using windows