Three monitor mac pro work station

Mac pro got upgraded to 3 monitors. 24″ in the middle and 2 19″ wide screen on the side.

Actionscript 3: Move first array index to the back and back to front

Here is a very cool line of code to manipulate an array.

If you want to take the first item of an array and place it at the end:

myArray.push(myArray.shift());

If you want to take the last item of an array and place it back at the front:

myArray.unshift(myArray.pop());

[ad#Google Adsense]

Actionscript 3: Check if flash is stand alone or in browser

Here is a quick code snippet if you want to have links trace the value locally but link out in the browser.


if (Capabilities.playerType == "StandAlone" || Capabilities.playerType == "External") {
	trace("data.CTAOpen.@url : " + data.CTAOpen.@url );
} else {
	navigateToURL(new URLRequest(data.CTAOpen.@url), "_self");
}

Or you can use RegExp

var isStandAlone:Boolean = new RegExp("file://").test(loaderInfo.url);

[ad#Google Adsense]

LG LP1200DXR portable air conditioner!!

Running 1 huge pc tower, two mac pros, 1 mac book pro, 1 dell laptop and 1 file server in the closet running constantly is making the home office about 10 degrees hotter then the rest of the house.

Some computers are actually failing due to over heating during this summer days as temperature reach 87 indoors.

Solution is this bad ass 12,000 BTU portable air conditioner :

Actionscript 3: Remove all elements from a Movieclip

I’m always trying to empty out a clip and this is by far the best way :

while (target_mc.numChildren) {
target_mc.removeChildAt(0);
}

or if you prefer to be verbose :

var total:uint = target_mc.numChildren;
for (var i:uint = 0; i < total; i++) {
target_mc.removeChildAt(0);
}

or if you prefer single function :

for (var i:uint = 0; i < target_mc.numChildren; i++) {
target_mc.removeChildAt(0);
i--;
}

Here is a user submitted version :

while (target_mc.numChildren > 0) {
target_mc.removeChildAt(target_mc.numChildren - 1);
}

Here is a one line version :

while (target_mc.numChildren != 0) target_mc.removeChildAt(0);

Saw this one on Adobe website :

while (target_mc.numChildren > 0) target_mc.removeChildAt(0);

I think that’s it.

[ad#Google Adsense]

Upgrade OS X 10.5 svn from 1.4.4 to 1.6.2

Os X 10.5 comes with svn 1.4.4 preinstalled, but you might want to upgrade to the latest 1.6.2 for many reasons.

I needed the upgrade to run subclipse 1.4.x for flex builder 3. The best instruction I found on how to do this was here.

in a nutshell

1) download the universal subversion 1.6.2 binaries for mac from here : http://www.open.collab.net/downloads/community/

2) open terminal and type this : echo ‘export PATH=”/opt/subversion/bin:$PATH”‘ >> ~/.bash_profile

3) restart terminal

4) tpe svn –version and make sure you see :
—> svn 1.6.2

done.

[ad#Google Adsense]

Home server with old G4 – pt 2

serverdoc

Once your hard ware is set up, we will need to install the software to fill the purpose of your home server. Here is a list of what I’m running and a description.

1) sharepoints

sharepoints1

If you are running os x 10.4 or lower, this app will make it easy for you to define which folders or volume will be available to share. This is especially helpful is you have a separate hard drive as your file server. 10.5 does not require Sharepoints because it is built in.

2) DynDns

dyndns

The free service from dyndns.org will give you a web address that auto forwards to your server for those with dynamic I.P. address. Not needed if you can afford a static I.P. address.

3) Vine Server

vineserver

Since my server will sit in my closet without a monitor,  svnX will allow me to connect remotely via VNC.  OSX has built in vnc support but you can not change the default 5900 port.

4) Media Link

medialink

Get more usage out of your server by turning it into a media server. MediaLink is a UPnP server to stream photos, videos and music to your Playstation 3.

5) FtpD

ftpd

FTPD is a FTP server for creating users to give access control for others to connect via FTP.

6) WebMon

webmon

Not critical, but it is a nice option to connect via WebDAV.

7) Carbon Copy

carboncopy

I decided not to run RAID 1, instead set carbon cloner on a schedule to backup to the second hard drive once a week. This helps incase I accidently delete a file, since deleting a file on the server will delete it immidiately.

Another option was iBackup, but that does not do incremental backup. Incremental backup is where it only backups files thats been modified, so it doesnt back up the entire disk every time. If i delete a file on my main drive it will also delete it on the back up drive.

[ad#Google Adsense]

Home server with old G4

Using an old G4 is a great way to create a file server. If you have one around it is a cheaper solution then getting a dedicated NAS drive. The old G4 have gigabit etherbit capability so it will be much cheaper then getting a NAS drive with gigabit connection.

It can also stretch the functionality to a Web server, FTP server, UPnP media server and a Webdav server. Not bad for an old obsolete computer.

The one I will be using with be my old 10 year old Mac G4 dual 450 mhz, 896mb ram, 136 gb main hard drive, and 2 western digital 1TB sata drive for files.

img_3045-medium

The only upgrade required was to install a SATA pci card to support two additional hard drives. Current system is limited to recognize 136 gb.

img_3044-medium

I used a Sonnets TEMPO serial ATA 2 port pci controller card as pictured above for $60 from amazon. There is an issue with the driver that comes with os 10.4  for this card which makes the system freeze. You will have to reflash the driver, but don’t use the one from sonnet. This is acutally a repackaged FirmTek , and their driver fixes the issue. Download their driver and it should get this card working for you.

As i mentioned above, you will want to go with os 10.4. You can get away with 10.3, but there are lots of apps that wont support it. My current setup is to enable the sharing below, and also several apps that i can go into detail in the next post.

sharing2