Posts Tagged ‘Apps’

Adobe Air MP3 Shaker (Shuffle)

Sunday, February 7th, 2010

I like iTunes, it’s a good media player. But I got some MP3s that are not part of my iTunes library, an old backup. I don’t want ALL of them to be automatically imported into my iTunes library just so I can listen to them. And There is a lot, over 1000. I wanted to select the directory, and hit play and have it go through so I can listen. If any that caught my attention and were not already in my library I could import it. On Windows, I would just use WINAMP. But I could not find a Mac version of WINAMP. I wanted something light, simple, just to play a directory of MP3s.

A few years ago, my first Adobe AIR project was an MP3 player. It was pretty much full featured: volume control, track progress, skinning, etc. I wanted something a little simpler, cleaner. I had a free Saturday, and I made a new one. Based it off of the Apple iPod Shuffle, 2nd generation. It is very simple to use. When it opens, select a directory of MP3s (it only plays MP3s), and be patient if its a directory with thousands of MP3s it will take a moment to load. A window will come up with a list of all the MP3s, double click one to play, or hit the play button, or next. You can close the windows and just have the player up, it shows the name of the song if ID3 tags are available. The reason I call it “MP3 Shaker”: if you shake it (drag it left and right really fast) it will shuffle to another song (just like the new iPods). Click the green light on the top right to close.

As always, its open source. Right click anywhere on the player and select view source. Enjoy!

Please upgrade your Flash Player This is the content that would be shown if the user does not have Flash Player 9.0.115 or higher installed.

Simple Linux Bash WordPress Upgrade Script

Friday, July 10th, 2009

There are lots of automatic WordPress upgrade plugins, but do to some server restrictions I couldn’t get them to work correctly. So I made a simple bash file to upgrade this WordPress site for me. The script only backs up the current web site directory, and does not do any DB backups. I used this script to upgrade from 2.7.1 to 2.8 and just today from 2.8 to 2.8.1 and the blog is still up, so I guess it works OK!

Variable definitions:

  • WORDPRESS_DOWNLOAD_URL – the URL of the latest WordPress version to download
  • WORDPRESS_LATEST – the file name of the downloaded WordPress version
  • WORDPRESS_EXTRACT – the directory the WordPress files are extracted when the download file is uncompressed
  • WORDPRESS_DIR – the web root directory where the WordPress files will be copied to, and where your wp-config and wp-content files will be copied to (your blogs web root)

To use, create a new file, say wordpress_upgrade.txt, copy and paste the code below, and make wordpress_upgrade.txt executable (chmod 755 wordpress_upgrade.txt). Run via ./wordpress_upgrade.txt and when its done, sign into your blog to run any DB upgrades. I run this script from my home directory, and “public_html” is where my WordPress files reside. This script can be run from any location, as long as the paths are setup correctly and accessible.

Note: this script does not perform a database backup!

#!/bin/bash
# Upgrading WordPress steps
# From home directory

WORDPRESS_DOWNLOAD_URL="http://wordpress.org/latest.tar.gz"
WORDPRESS_LATEST="latest.tar.gz"
WORDPRESS_EXTRACT="wordpress"
WORDPRESS_DIR="public_html"

echo "Removing current latest.tar.gz"
rm latest.tar.gz

echo "Backing up current WordPress"
tar -cf wordpress-backup.tar $WORDPRESS_DIR
#get wp-config.php and wp-content/ out of wordrpess directory
echo "Grabbing wp-config.php and wp-content/ and putting them in ~/mywordpressfi
les."
cp $WORDPRESS_DIR/wp-config.php mywordpressfiles
cp -r $WORDPRESS_DIR/wp-content/ mywordpressfiles
echo "Downloading latest WordPress form $WORDPRESS_DOWNLOAD_URL"
wget $WORDPRESS_DOWNLOAD_URL
echo "Extracting $WORDPRESS_LATEST..."
tar -zxf $WORDPRESS_LATEST
echo "Copying $WORDPRESS_EXTRACT to $WORDPRESS_DIR."
cp -r $WORDPRESS_EXTRACT/* $WORDPRESS_DIR
echo "Copying wp-config.php and wp-content/ files back to $WORDPRESS_DIR."
cp mywordpressfiles/wp-config.php $WORDPRESS_DIR
cp -r $WORDPRESS_EXTRACT/wp-content/* $WORDPRESS_DIR/wp-content
echo "Should be done, now go to WordPress Admin to upgrade!"

BreakTimer v2.0 – Update

Wednesday, May 13th, 2009

I made some major updates to BreakTimer. It now minimizes to the dock/system tray, with a nice icon that counts down. Also has icon menu options so BreakTimer can be started, or stopped from the dock/system tray, and well as toggle the repeat. O, I added a stop feature so you can stop the timer rather than close the application. I don’t see a point in pause, since if you pause it, you are most likely taking a break so just restart it.

Also fixed a few bugs with the break window not grabbing focus and moving to the front on a Mac. Also a little instruction slides down to let you know Escape closes the break window. Hope you enjoy!

Download at the BreaTimer Page.

BreakTimer – an AIR app to remind you to take a break from the computer

Monday, May 4th, 2009

My current career path has me sittign on my ass infront of a computer for most of the daylight hours. I have back issues, and sometimes I get too involved in my work and forget to move.  Combine that with years of volleyball and tight muscles I got a herniated disc.  So I made a simple AIR application that will block out the screen and tell you to take a break after a proscribed period of time (30 minutes).  This can be set from 0 to 180 minutes (no person should be sitting for 180 minutes straight though!).  If you have multiple monitores it will block all your monitors.

The source is there for you to tweak, right click on the app and view source.

JavaScript Calculator

Sunday, November 9th, 2008

So I made this online calculator that lets you type in commands and equations

http://www.sapethemape.com/calc.html

I based it off of a Mac Widget Calculate I had that was AWESOME! Windows Sidebar Gagdet Calculatorium is also very good.  What I liked was it had history and it was more of a command line calculator than a typical button presser.  Instead of pressing buttons, you could enter mathmatical expressions and it would solve it.

For mine, you can hit up and down arrows to scroll through your input history, exape clears it, and if you hit + – * / it automatically enters answer (the previous answer); next I need to resize it… But I want to port it to AIR.  Except ActionScript doesn’t have an EVAL function. Javascript does.  Eval basically does all the work, parses the expression for me. There is a ? for help, just lists the JS Math function available.  A friend just pointed out 1^4 = 5, so I need to add parsing for that.

Then I want to make it for my G1.  I tested this version, but the keycodes for + – * / are different on the mobile keyboard because it wouldn’t automatically add ‘answer’.  If you want to help, you can add errors to the comments here.  Just view source for source code. Yes, you can steal it. But its prolly not worth stealing =P.

KatanPG Uploader Beta 1

Thursday, May 8th, 2008

I made a lot of updates to the KatanaPG picture up-loader. I added a little browser to view your Katana Inbox (where the picture are uploaded to). I could not get the authentication to stay outside of the AIR program; meaning, the AIR browser keeps you logged in or you can use your normal browser and have to login again. The browser will automatically pop up once your upload finishes or after you login and you click on the “username Inbox” button.

I also added a directory tree for those directories that are filled with subdirectories of pictures. Basically the list will display the thumbs of the pictures and the tree to the left are the sub directories that may contain more pictures (or no pictures). Double clicking on a directory in the tree will update the picture list. The max file upload is 100MB and it won’t let you upload more than that.

Download: katanapgair-v1beta.zip

KatanaPG AIR Pic Uploader

Wednesday, April 30th, 2008

I made a simple AIR app to upload pictures to my buddy’s online photo gallery, Katana Photo Groups.  The AIR app is very basic (first workign version released); but it does in fact work.  So this is what you do:

  1. Select directory to upload pictures from.
    OR
  2. Drag and Drop files onto app.
  3. Slecect the pictures you would like to upload.
  4. Login to KatanaPG.
  5. Click upload to upload pictures.

The above order clearly isn’t set in stone, but it gives you a basic idea of how the application works.

After that your pictures will be uploaded into your Inbox. You will need to already have a KatanaPG account for this to work.

It uses FZip (Actionscript zipping library) to compress the images into a zip and then uploads the zip to Katana.  I hope to had some basic images editing, drag and drop support, and it also needs some optimization.

Here is the package: katanapgair.zip

You will need Adobe AIR to run this.

UPDATE:

Added drag and drop from the PC and also fixed some memory issues.