Chronicles of a Techoholic A blog chronicling the life of a student and aspiring programmer

15Feb/138

dArt GUI

IF this program proves useful to anyone, I hope you enjoy using it as much as I enjoyed making it. This was my first time using Objective-C and I think I love this language. I really love it! Here's a link to the application's page!

29Jan/120

Migrating from a MacBook Pro to a MacBook Air

You know you're a masochist when instead of using Migration Assistant or just starting again, you go through every folder you can think of that was changed (not necessarily directly by you) in the course of owning your computer.

I've just finished migrating to my new MacBook Air (new for me) from my Pro. I had a lot of files, such as certain preferences, etc. that were important to me, but wouldn't have been migrated with Migration Assistant. I also didn't just want to clone the HD, since

  1. The MBA SSD capacity is smaller than the MBP capacity and I needed more space. I managed to solve this by not transferring my whole iTunes library, which was 110 GB, mostly podcasts, followed by a few movies and TV shows.
  2. I didn't want to transfer a MBP-specific installation of OS X onto a MBA. This would probably just have caused problems in the future.

I didn't migrate perfectly. There were a few things I forgot, but not much and they weren't very important (just the position of Dashboard widgets, as well as the notes that were saved in the Stickies widget, plus some other stuff). All in all though, I'm enjoying the speed of the SSD and the light-weight. Plus, the higher resolution display is awesome for fitting more apps in my menu bar.

One tip for migrating without Migration Assistant is to not. Try a Dropbox 100 GB account.

For people who like to mess with system files or install command line apps like me, learn from my mistake. Make a note of any changes you make/apps you install, or install something which does that for you automatically. You'll need that list when you upgrade to a new computer and you want to start without moving all your cruft across, but also need important files in hidden folders. For example, I installed a bunch of command line apps in the '/usr/local/bin' directory. When it came time to migrate my stuff, I just copied them over to my new computer. This means I miss the man pages and documentation for them. Easier just to list them all, then reinstall the first chance you get, that way you'll get the binaries, plus the other stuff that comes with them.

26Jan/120

3 Seldom Used Tools/Apps in OS X Installed by Default

If you're a new Mac user, check out this list of cool Mac apps installed by default.

  1. Automator - an awesome application to automate repetitive tasks. The icon is of a robot, which I don't understand why people don't click this awesome looking icon. It's surprising how little this is used, considering how awesome it is. Use this! It can save so much time.
  2. Emacs games - this is quite hidden, but if you thought Chess was the only game available in OS X, you're wrong. Just open Terminal (in /Applications/Utilities/Terminal) and type in "emacs" without quotes. Then, press enter, then Esc and X at the same time. Yes, Esc. Type "tetris", press enter and enjoy. There are loads of other games included in the Emacs program.
  3. Archives.prefPane - just a simple prefPane to change settings of Archive Utility.app in the System Preferences. You can change this by navigating to /System/Library/CoreServices, then opening Archive Utility.app, but this prefPane should really be included in the System Preferences app. But just navigate to /System/Library/CoreServices, right click Archive Utility.app and select "Show Package Contents". Navigate into Contents/Resources and double click Archives.prefpane.Show Package Contents for Archive Utility

Enjoy!

18Sep/110

3 – TotalTerminal (formerly Visor)

Another episode of Terminal Hacks. This time, I talk about TotalTerminal (formerly Visor), a Terminal plugin with a few features, key being a Quake-style Terminal.

Download this app at: http://totalterminal.binaryage.com/

7Jul/110

3 Geeky Pranks To Scare Your Friends

The following is a post that was rejected by MakeUseOf, while I was working there. Here it is, published with minimal changes. I unfortunately did not pass my probation period. The remaining posts will be posted here.

No, it's not April, but who says pranks should be restricted to one day of the year? If anything, doing pranks on other days is much better, since noone will expect anything. If you do any of these pranks on 1 April, it may give it away. But do it a bit later, when everyone else has forgotten and you have a great advantage. You can scare people out of their wits, if you do this properly. But we can't just accept any old pranks. As geeks, we do this properly. Some of the stuff you can do as a geek can make you look like a magician. So why not use your skills as an advantage? Here are a couple of pranks you can play from easiest to hardest. The final one can be really scary for a non-geeky person.

Ctrl+Opt+Cmd+8

This requires physical access to the Mac in question. But it only takes 1 second, literally. Just press the four keys together: Control, Option, Command and 8. This will basically invert everything on the screen. Inverted Screen It's an accessibility feature, but it can be used to scare someone into thinking something is wrong with their monitor or graphics card. If they ask you for help, try your best not to laugh and pin down the problem with the part they think is harder and more expensive to replace. Just don't go too far. If they decide to purchase something to fix the problem, just quickly fix the problem for them. But don't give yourself away, remember, you need their trust to play more tricks on them.

Hide Files

This one will work for Linux too, and other UNIX systems. Remember the Terminal commands I taught you yesterday? Well, I said they would be fun. Here's one way you can use the mv command. You'll need a little more time for this. While your target's gone, just open up the Terminal, type in: mv /directory/importantdocument.doc /directory/.importantdocument.doc A dot as the first character will hide the file. Hiding a wallpaper Make sure there's no hidden files already with the same name. Unlikely with a non-geeky user, but you can never be sure. The mv command will replace a file if it has the same name and it will overwrite it with the file you are moving, or renaming in this case. To look at the contents of a directory, just use the ls command I taught you yesterday too.

SSH say

This is another one which will use the Terminal, the same commands I taught you yesterday. Even though I titled that post "5 Fun & Useful Terminal Commands You Can Use More Than Once", I only identified one of the commands as fun and that was the say command. Now you can see how learning the Terminal can lead to lots of fun? I've already shown you how you can use the mv command for a bit of fun, now for the SSH and say commands. This one is the hardest, since you're going to need not just geek skills, but also social skills too. I did warn you! You could do this evilly without worrying about social skills, but that doesn't mean it's gonna be a piece of cake. For this, we need the target's password. You could use social engineering techniques, or you could just hack his/her password. Looking over their shoulders is an easy method. Once you've got that, it's time to turn on SSH on their computers. Refer to my previous post to find out how to do this. Make sure you have their permission and that they understand the security risks involved with giving people their WEP/WPA/WPA2 and user password, while their computer is in this state. Even just giving the user password is dangerous if an evil entity has their external IP address. If anyone hacks into their computers, this is not my responsibility. As long as you or they don't give their user passwords to anyone, they should be fine. This is why you must be evil if you want to do this without any social skills. Alternatively, you can own two computers, set up remote login on one of them and let your target use that one. Okay, finally we can perform the prank. Just use the SSH command I taught you about to remotely login to their computers on your console. ssh user@host Now, make sure you either have a video feed of them on your screen, or you can hear them clearly from where you are. You are going to have to make sense if you want them to get scared. Now just use the say command to speak to them. say SAY ANYTHING YOU WANT You could say things like, "Malfunction! Malfunction!" or you could make the computer come alive. See if you can start an intelligent conversation with them. SSH ConversationHandy Tip: use capital letters and question marks to change the computer's tone. I tested this and it works!
Handy Tip 2: SSH can control the other computer remotely. say isn't the only command you can do. Get creative! SSH is a fertile ground for pranks.

Conclusion

Like I said, don't get carried away. If they decide to buy a new computer to fix their 'problems' that were, in fact, caused by you, then make sure to either 'magically fix it' and assure them it won't happen again, or be prepared to give yourself away. You don't want the guilt of making your friend spend unnecessary money because of you, do you? Did any of the pranks here help you scare your friends? Or your enemies? Did their computer manage to 'convince' them to finally give you the money they owe you? We'll be glad to hear any funny stories below! Check out these posts for more ideas:

31May/110

Pay attention, but don’t panic!

This article talks about the changing malware landscape on the Mac and what we can do about it. After the new MacDefender variant came out without requiring a password, only showing a "Continue" button, I was going to write a new post addressing it, but this Macworld articles sums up my thoughts exactly.
Except where he says that Windows 7 is more secure. As one commenter mentions, and as I have argued before, OS 9 had many more malware than OS X, while having far less market share. This defeats the market share argument that many use to backup their claim that OS X is only as secure as Windows or less.
Also, Mogull says, "one that automatically runs its installer". This is incorrect. The new variant launches the installer, but you still have to click through several screens to install it. A commenter called whitedog spotted this mistake.

Originally posted on Macworld by Rich Mogull: http://www.macworld.com/article/160098/2011/05/macdefender.html

25May/110

I just finished MacHeist 4: The Heist

For 2011, MacHeist, the popular free Mac app bundling group, decided to use an iPhone app for its bundle. It made an app called The Heist, which had 4 different puzzles. Each puzzle had separate stages and each stage had 4 levels. The first 4 for each puzzle is unlocked by default. There are 4 security measures to get through the safe. For each measure, depending on the level you are, your level is raised by a certain amount, a bit like gaining levels in an RPG. You don't have to finish all the puzzles to get the prize.

SPOILER ALERT, HIGHLIGHT TO READ: THE PRIZE IS A GAME CALLED EETS FROM THE STEAM GAME STORE FOR MAC AND PC.

Here are some screenshots to prove that I have completed it:

The prize in the safe, before I grabbed it!

A poster urging me to claim my prize!

TOP SECRET LOGON SCREEN LEAKED!

Your prize is in your email!

All real screenshots will be 320 x 480.

23May/111

[Opinion] MACDefender and its implications

News has been going round of a new malware for Mac OS X in the wild. I believe all the fear is unfounded. There’s a lot of FUD, maybe because of ignorance. I just want to clear up a few facts. And then I’ll share my opinion on what this means for the Mac.

First of all, what has been said from Apple directly about the issue? Well, we can’t ask Apple officially of course, they’re very secretive. But there are people on the inside that can help us. According to Cult of Mac, one AppleCare Support Representative said that “call volume at his call center is four-five times greater than it used to be since the rise of MacDefender”. “Even more interestingly, the same Apple Store genius says that while Apple publicly blusters about the security of the Mac, behind the scenes, they all use Norton Antivirus on company machines!” Of course, PCWorld quickly picked up on this: “internally Apple mandates the use of Norton malware protection.” They conveniently ignore this: “This may be true for any Apple-owned machines running Windows, but it is not true for machines running any version of Mac OS X. I asked several Apple engineers whether any antivirus software was mandated or even recommended for Mac OS X, internally. All said no. Said one, “You couldn’t get me to install Norton on OS X if you slipped me the date rape drug.”” (I realise the PCWorld article is written before the Cult of Mac article, but the PCWorld article references the CoM article, meaning they may have manipulated the date, so I will ignore that for now.) Meanwhile, Ars Technica said, “Many third-party Mac support specialists told us that they had not seen a noticeable spike in malware issues on the Mac recently.” Apparently, 14 different specialists were asked. Most of them said the situation is exactly the same and they have not had an increase in calls relating to malware.

One thing that REALLY pisses me off is this claim: “I still maintain that the real reason that Macs aren't plagued by more malware is that the platform represents such negligible market share that it's not worth the effort for malware developers.” How much market share did OS 9 have, compared to OS X? Now, how much malware did OS 9 have, compared to OS X? Market share has a negligible effect, if any.

Let’s look at a few more facts. Right now, there are NO viruses for the Mac. This article from 2005 drives the point home nicely. “All, right, I'm sick of people reporting that Mac OS X is 'mostly' virus-free. It is, as far has been proven, ENTIRELY virus-free. Macs are not magical, and one day there will be virus that infects them. However, I don't think it's happened yet, and I think it's time we, the Mac community, started saying, "No, we don't have any viruses."” I think this demonstrates the security of Mac OS X. There are currently no malware that can attach itself to files and self-replicate. NONE! However, there are trojans and other malware. I’ll come back to this later, but first I want to touch on something.

A second thing that pisses me off is that for some reason, the PC fanboys believe that Mac users think the Mac is invulnerable. PCWorld even said, “A certain Apple loyalist recently called me--and a variety of respected tech writers--out for having the audacity to point out that Mac OS X is not invulnerable and that the potential for Mac malware is steadily rising.”, while the Macalope points out that John Gruber himself said in 2004, “No one with any sense would ever claim that Macs are impervious to viruses, worms, or Trojan horses. Especially Trojans—which just about anyone with a 3-digit IQ could put together.” Mac users have never claimed Macs are free from malware or are invulnerable. Why do PC fanboys believe that we believe this? We don’t. Back to the trojan point. Let’s have a look at the MACDefender, Mac Protector, whatever you want to call it! First of all, it requires a password. As one commenter on a CoM post said, “You'll never have any security if you hand over the keys to the castle.” This is the number one point. The Mac itself is always secure the whole time. This trojan does not harm the Mac in any way whatsoever. Even if it did, this is where we say, you handed over the keys, it’s not OS X’s fault and it’s not a security hole. It’s like handing a stranger the keys to your house. All the protection in the world won’t help you then(with current, non-prototype technology). You’ve let them in, they can do anything they want. I commented on the same post, “The only thing being taken away here is the credit card details, the Mac is fine. So, technically the Mac itself is still secure, ;P”. A lot of PC fanboys are suddenly saying, this is it for us Mac users. “His point seems to be that because someone made a prediction in 2005 that a wave of Mac malware was coming, and it didn’t materialize, then it can’t possibly happen in 2011 either because of some ancient lore that says that things never change and the past always equals the future.”, says ZDNet, referring to John Gruber’s claim that the PC fanboys and security researchers are just crying wolf. So just because one Mac trojan is out, this is it for us Mac users and we need to “get protection”? Hypocrites!

One final point I’d like to make is that, even if these viruses do anything more harmful or less crap, antivirus software won’t help. Sometimes they are worse than the actual malware they claim to protect you against. As another commenter pointed out on CoM, “AV software is worthless for future trojans, they find out about them the same time you do.” Not only that, but antivirus software can actually harm your computer too. The commenter linked to several stories of AV software making things worse than before they were there, such as this one. AV software just unnecessarily (for now, at least) takes up memory, CPU cycles, a lot of hard disk space for a thorough suite and sometimes money and other precious resources. It’s something we can do without, thank you very much!

21May/110

2 – Quad Scroll Buttons

By default, there are two scroll buttons at the bottom of the scrollbar to provide quick access for switching quickly between them (just another example of how Apple thinks their designs through and doesn't see it as merely 'aesthetics' or 'eye candy'). You can change this to have each button on their respective sides, but if you'd prefer to have two buttons on both sides, there's a Terminal hack for that. See my YouTube video here.

18May/110

1 – Force Emptying the Trash

Sometimes, when you just want to empty the trash, there are stubborn files that will disallow the trash to be emptied. So what are you to do? Do you let the files build up, let the trash sit, unattended. No! Terminal comes to the rescue! Using a simple Terminal command, we can get rid of the pesky file. To see the 720p HD version, go to the YouTube video here.