For Cyberduck SFTP == SCP

March 2nd, 2010 No comments

If you need to copy files from your Mac to a Linux Host using SCP, Cyberduck will let you do that, even though SCP is not listed in the protocol list. Just select SFTP from the protocol list, and your regular Linux login credentials (or public key file) and you should get in.

Categories: Uncategorized Tags: ,

Use 7-Zip to play ISO files in Windows Media Center, sorta.

February 8th, 2010 No comments

Apparently, when using the DVD Library feature of Windows Media Center, the software would much rather have each DVD in a separate folder, with the VIDEO_TS and AUDIO_TS subdirectories in that folder. I’ve had precious little success getting Media Center to read ISO format files.

So, if you have an ISO file Can you play it in Windows Media Center? Well, sure, kinda.

It turns out that your little friend 7-Zip, the free, open source archive manager, understands .iso format files as compressed archives.

So, simply open the .iso file in 7-Zip, and extract the VIDEO_TS and AUDIO_TS folders to a folder in your library, and you’re off to the races.
Something like:

+Videos
+---My Movie
+-------- VIDEO_TS
|-------- AUDIO_TS
|-------- folder.jpg

Adding an image, explicitly named “folder.jpg” will add that as the “box cover” to your display in Media Center.

Best of luck.

Categories: Uncategorized Tags:

How to stop and Start MySQL

November 11th, 2009 No comments


Install MySQL:

sudo apt-get install mysql-server

Start:

/etc/init.d/mysql start

Stop:

/etc/init.d/mysql stop

Restart:

/etc/init.d/mysql restart

Check the status of MySql server:

/etc/init.d/mysql status

Categories: Uncategorized Tags:

HOW TO: Link to a specific page in a PDF document

November 10th, 2009 No comments

Did you know that you can link to a specific page in a PDF document? Here is an expert from the Adobe Knowledge base that explans how:

When you open a PDF file within a web browser, the first page of the PDF file will be shown by default. You can add a string into the HTML link so a PDF file opens and jumps to a specified page or set destination. To use either of these two methods, do the following:

Open a PDF file to a specific page

To target an HTML link to a specific page in a PDF file, add #page=[page number] to the end of the link’s URL.

For example, this HTML tag opens page 4 of a PDF file named myfile.pdf:

<A HREF=”http://www.example.com/myfile.pdf#page=4″>

Categories: Uncategorized Tags:

Grooveshark: Easy, legal music sharing

September 30th, 2009 1 comment

I’ve become a big fan of Grooveshark for discovering new music. It is a great way to legally find and share music. Interestingly, you can upload your own files into Grooveshark to make them available to everyone, and a portion of the revenues go back to the artist in royalties — however that works.

Each file, or playlist you create can be converted into an embeddable widget for your blog. For example, give the Glitch Mob a listen. :

Categories: Music, Uncategorized Tags:

Zoomify: Upload and View Huge Images in Wordpress.

September 25th, 2009 1 comment

The first idea that came to mind for Zoomify was encouraging Real Estate agents to use Zoomify in creating Virtual tours of thier properties for sale. If you have great images of a property with lots of detail, use Zoomify to really draw your visitors into the property.


Navigate through this image just like you would a Google Map

Using Zoomify, you can upload and view extra large images, and see all the detail using a Google Maps-like pan and zoom navigation.

So, how does this work? It’s pretty easy, once you get past the initial configuration….Steps 1,2,3 below only have to be done the first time, of course.

  1. Go and download Zoomify Express, a small client you download that will chop up your image into something that is pan-and-zoom able. This gets installed (unzipped actually) on your PC.
  2. Zoomify your image by dragging it onto the Zoomify Converter.exe You can get detailed directions on the Zoomify site.
  3. Install the YD-Zoomify plugin by Yann Dubois. If you don’t know how to install plugins on Wordpress, read Installing plugins on the Wordpress site. (if you install from the Wordpress auto-installer, you’ll want to replace the zoomifyViewer.swf file that comes with that version to the new version that came with your zoomify software install. FTP is your friend here. )
  4. Upload your Zoomified image folder to Wordpress. Zoomify creates a folder named the same as your image, which contains an xml file, and one or more subfolders with a ton of images. I used FTP to upload these files to [wordpressInstallDirectory]/wp-content/uploads/[imagefoldername] — substitute the items in brackets with values from your own system.
  5. Place the Zoomify command in your post. You’ll need to enter a code into your post where you want the Zoomified image to appear. You do this as follows:
    • Enter <!-- YDZOOM( 'fullURLToTheUploadedFolderOfImages', widthInPixels, heightInPixels, 'uniqeNameForThisZoomify') --> where:
    • fullURLToTheUploadedFolderOfImages, which goes in single quotes, is the full URL, including http:// to the location of this folder. something line ‘http://www.example.com/wp-content/uploads/myiamge’
    • widthInPixels, not in quotes, is the width of the area where you want to place the Zoomified image.
    • heightInPixels, not in quotes, same as width, only height.
    • uniqueNameForThisZoomify, in quotes, is and arbitrary name for this Zoomified image, make sure it starts with a letter. Each Zoomify instance you add to your post needs its own name.

A word of caution because it bit me…. The domain name you use for referencing the folder must match exactly the domain in your browser (for example http://example.com) otherwise you’ll get an “error loading” message. So if your browser says “http://example.com” but your fullURL entry above says “http://www.example.com” you’ll get an error because they don’t match. Make them match, or go learn about crossdomain.xml files and Flash.

Good Luck Zoomifying your images.

Categories: Photo Sharing, Quick Tips, wordpress Tags:

Linux Noob: An introduction to shell scripting

September 25th, 2009 No comments

Using the command line in Linux can be one of the most daunting tasks to a regular Windows User. The Linux command line, or “Shell” is vastly more powerful that the command line you might be used to in windows. On Linux, you can create shell scripts (like a Windows Batch file, but on fists full of steroids).

If you want to learn more about
An Introduction to Shell Scripting

It’s a work in progress, but has a lot of great information for someone getting started.

Categories: linux, noob Tags:

Use Cygwin to count the lines in a text file on Windows.

September 24th, 2009 No comments

You can quickly count the lines in text file on a Linux (or other *nix based system) with this command

wc -l < filename

(Of course, you need to substitute the filename with your filename.

Need to do this on a WIndows system? Download cygwin and you can issue the same command from the cygwin command line.  The only trick to cygwin is to remember that your root directory (C:\ on most Windows systems) is /cygdrive/c. Then the directory structure is the same from there.

Categories: linux Tags: , ,

Vista: Editing your hosts file.

September 21st, 2009 No comments

Vista has odd permissions when editing files, especially if the file is in a location that Windows thinks is sensititve.

If you try to modify your hosts file in Vista, it will not let you save it. It tells you that you don’t have permission, probably telling you the file is read only, even if the read-only bit is not set. To successfully modify the hosts file, run notepad.exe as an administrator and open the file.

  • Browse to Start -> All Programs -> Accessories
  • Right click “Notepad” and select “Run as administrator”
  • Click “Continue” on the UAC prompt
  • Click File -> Open
  • Browse to “C:\Windows\System32\Drivers\etc”
  • Change the file filter drop down box from “Text Documents (*.txt)” to “All Files (*.*)” Select “hosts” and click “Open”
  • Make the needed changes and close Notepad. Save when prompted.

(Via)

Categories: Uncategorized Tags:

Create Histogram data in mySQL

September 15th, 2009 No comments

Here is the easiest way I know to create the data for a histogram chart.

Consider the following query.
"select count(price - (price mod 10)) as freq, price - (price mod 10) as label
from sales
where 1
group by price - (price mod 10)
order byprice - (price mod 10) ASC")

In this query, we are creating a histogram of items according to their list price. We will be able to see the distribution of products , in this case, in strata of 10. In this case the price of products would be distributed over prices between, say 0 and 2 or 3 hundred. You can set a MOD value that would create strata in reasonable segments for your data.

What we are doing here, is using the MOD function to round down the individual sales to increments set by the MOD value. MOD is a type of division that only returns the remainder.

For example if you have sales of
10
11
23
24
45
56

MOD 10 of each of those values would return:

0
1
3
4
5
6

We then subtract the remainder from the price, resulting in

10
10
20
20
40
50

Rather than just outputting that list, we count each of those values to get a distribution:


+---------------+
| freq | label |
+---------------+
| 2 | 10 |
| 2 | 20 |
| 1 | 40 |
| 1 | 50 |
+---------------+

Finally, since we use the COUNT() function, we need to group, and we put them in order by the label so that the segments are in order.

You can then feed those values to your favorite graphing engine, to make handsome charts of your resulting data.

Categories: charts and graphs, mysql Tags: