Fun extras with the OS X terminal

I’m writing some more R scripts today to make up for the discrepancy between different people’s interpretation of the concept of disparity and variance, and I felt the need to add a signal that the script was done running. I’ve used play() in the past, but it seems silly to use an extra library when I have other methods…

system("say All done!");

I was also playing with the system volume, but decided not to do too much, since I’m usually listening to music, and blowing my ears out is not my preferred method of learning that my function has completed running.

Change the system volume from the command line – OS X Daily Check out Kevin’s comment for some more tricky things.

Of course, you can always just play a sound without the play() function–just use Terminal! http://forums.macosxhints.com/showthread.php?t=33962

Tricking a new computer into working (maybe)

UPDATE: Oh never mind, I’m just using a different hard drive now.

I have a recently acquired Gateway Pentium 4 that I am trying to upgrade to from the HP PIII I’ve been using for my programs that just have to run on a PC.

Problem 1: The Gateway wouldn’t boot from the CD-ROM drive so I could use the Windows XP installer to format the drive.

Solution 1: I attached this drive as a slave to my HP and formatted it there.

Problem 2: The drive wouldn’t format correctly.

Solution 2: Somehow, I just had to get the right combination of things in the Disk Utility (whatever it’s called) in Windows. Delete the current partition, create a new partition, leave the defaults, and do a quick format. Took me a while to figure this out, otherwise it would tell me that the disk would not format correctly.

Problem 3: The Gateway gets stuck at the Gateway splash screen and won’t let me into BIOS to set the boot device.

Solution 3: Unplug all the drives, or even unplug just the floppies and the hard drive, and I can get into BIOS just fine to set the boot device.

Problem 4: I still can’t get into BIOS when the HD is attached. I can, however, boot from the CD-ROM drive and start the Windows installation (up until it looks for a HD).

Solution 4: Here’s the fun part: I unplugged the HD cable and booted from the CD. Then, before it asked if I would like to install Windows, I plugged the HD in. Don’t try this at home, kids! Setup then located the drive, and by the time it got to asking if I would like to install, it found the drive and away it went!

Problem 5: Rebooting during install, not so good. I got a long low beep that wouldn’t stop.

Solution 5: I hit the power button and manually restarted.

Problem 6: Intel boot somethingy found a problem, so I had to boot from the CD again. Uh oh…

Solution 6: Trying recovery at the moment, more news later.

Later:
Installed again, didn’t give me a long beep at restart, but I got the same Intel Boot Agent media failure. Changed the boot order around in BIOS. Now it goes to a cursor (that I can’t do anything with) after the Gateway flash screen.

Alliance p2p notes

I’m working my way through this program. I think it works really well, these are just my notes. I haven’t gotten around to posting these in the official forum or bug tracker yet.

Invite Codes
*The only thing the LAN checkbox affects is new invite codes. It does not change how your computer accesses anything else.

*Leaving LAN unchecked uses the web-accessible IP address of the computer. Checking LAN uses the local address (192.168.XXX.XXX).

*You can create two invite codes for each computer: a LAN code and a web code. Sometimes one will work where the other one will not, depending on the relationship between the two computers.

Moving Around
*Switching one computer from one network to another (e.g., from a wireless access point to a wall jack) sometimes results in loss of connection between the machines that cannot be repaired without a)changing the hostname of the buddy to either a local or web-accessible IP or b)deleting a buddy and re-adding them with their invite code.

*It may be the case that Reconnect has to be pressed by users on both ends of a connection after one person has switched networks in order for the change in IP address to register and the connection to be reestablished.

Miscellaneous
*It is unclear what “Reconnect” actually does.

*It is unclear how long it should take for certain things to happen. Sometimes it takes a couple minutes for everything to get situated after starting Alliance or switching networks. It also lags a couple minutes when someone leaves the network before removing them from the active users list.

*Should you be able to add friends of friends with whom you cannot connect? There is no dialogue or notification when they are unavailable after clicking “Finish.” I know that not everyone’s friends of friends will be online all the time, but if they are, and are not accessible from the current location, that should be reflected somewhere for the user.

*What port is being used to send invite codes? Is it possible that the router is getting mixed up and using the wrong port? Is this encoded into the invite code?

*When downloading, then disconnecting, then attempting to download from a different buddy, download will not begin. After removing everything in the download queue, restart is still required before downloading will commence. This may be related to switching networks too.

*Is there a limit on number of files that can be shown per directory? Alliance will not display a folder with 4840 files (kicks the connection for a few minutes), but when searching will display files in that folder that match the search criteria. This may also be related to funky characters in a filename within the folder–since those files weren’t part of the search results, the folder displayed just fine. It was the number of files–keep it under about 1,000.

*Sometimes the checkbox to browse a folder just disappears. Why is this? Because the shared directory name has been changed and the folder doesn’t exist anymore.

*When you have two laptops on the same wireless network and very few people using Alliance in general, it acts like there needs to be a critical mass in order for sharing to really occur. Such as, A and B are in the same room, on the same network, and can see each other. B can see a third computer C, on a different part of the network (outside the wireless access point), but A cannot. In this case, Friends of Friends seems to work, but user C never shows up for A.

Leopard upgrade notes

Here I am, finally having upgraded from Tiger to Leopard on my 1.67 MHz 15″ Powerbook. I’m still not sure if its faster or better yet, but I hope to keep reporting on what I find out about it.

Issues:
1. When I first restarted after upgrading, I wouldn’t get past being able to see the desktop, some icons, the dock and the info bar at the top. Then I would get the grey screen of disappointment (read: kernel panic!) and have to restart. This was due to a problem with startup items. It looks like the problem was Little Snitch, but I haven’t tried anything else to see if it could have been Mail, iCal, SizzlingKeys, or iChat.

2. The Sites folder didn’t work! Luckily, this guy figured this out before me. However, it also looks like PHP didn’t carry over for some reason, so I am downloading a new PHP install to work with Apache 2 from my favorite PHP/MySQL site.

3. The dock is kind of ugly–what’s with the shiny floor? Luckily, it looks like there is a solution. This worked for me.

4. Azureus has just quit a couple times while I wasn’t watching, but I’m downloading the latest version, which should work out better. UPDATE: Seems to be working fine now!

Happy Leoparding! Does anyone have any other stories?

Merging 2 or more SMF Forums

I suppose I will throw it out there that I have figured out how to do this. It worked very well, although I still need to eliminate duplicate members by hand (there does not seem to be a way to merge the accounts offhand, but for what I did, I didn’t have to worry about it). You can see the results at Campus Dakota – Forums for university students at UND and NDSU.

I will do this for other people, if they pay me, price negotiable. This is about all ther advertising I am going to do for it though–I’m busy enough right now as it is, but I need money too.

UPDATE: Since I keep getting requests at SMF, I just posted the script. If you like it, please drop me a line (and maybe a dollar or two for all the time I saved you). Look at the script here.

Let’s see if I can keep this straight…

Apparently, the amount of information I do not possess will always be more than I have the time or the inclination to pursue. BUT, today I do have both, and so I am hot on the track of making things work that need to work for me to be happy that I have pursued everything I need to pursue. I will present this in reverse chronological order, so that my motivation is clear.

1. Currently, I am downloading XcodeTools1.5 from Apple. Why this version and not the most recent version? Simply because I have Panther (10.3) instead of Tiger (10.4), and the latest version only works on Tiger.

2. I am downloading this developer tools package because I need to use the command gcc in the terminal. Apparently, gcc is a command that just doesn’t come with the OS. I don’t know what it does, it seems to be some sort of C compiler, but I may eb way off. In any case, I need to download these tools to make my OS let me type gcc and have it do what I want it to do.

3. I need gcc to install the program aspoof (which is in itself an OS extension, as far as I can tell). See, I run the install package (a Perl script, that in itself fun and new to me), and it installs aaspoof, the program I really want, but which needs to run aspoof in order to function correctly.

4. But what does aaspoof do? It is a shortcut to aspoof, which asks for command lines only when it is installed. Since the command lines will never change (which would be detrimental to the computer working right, something I experienced last night), it is a very good little timesaver.

5. aspoof in itself is a script to modify the extension that drives the Airport Xtreme card in my Powerbook.

6. I want to mess with this file (yes, I even tried last night, by hand, with a Hex editor) because I want to change (“spoof”) my MAC address.

7. Finally, I want to do this a) because I have a random theory that the place I am receiving my wifi access from has blocked my MAC address so I cannot use that access point and b) because this has become an obsession since I have little else to fill my time with right now. [EDIT: I’m pretty sure this wasn’t the case, but you know what they say about idle hands… 2014-02-07]

Wikipedia has a fairly decent article on MAC addresses, if you want to know more. http://en.wikipedia.org/wiki/MAC_address
aspoof can be found at http://sourceforge.net/projects/aspoof.