Posts Categorized: How-To

How to Merge Files Without Using Merge

I use a Mac almost exclusively for development. Mac doesn’t come with the Linux merge command and sometimes I need to merge text files. It’s pretty easy to do using diff and grep. I’m going to show you how to merge the changes from two files into one. I’ll use file1, file2, file3 and file4… Read more »

Edit Eclipse Generate Getter and Setters Format

For me, I like to always return $this when creating a setter class method when coding PHP. For example, to set an object to be freaky, I would create method like this. /** * Set to freaky or not freaky. * * @param boolean $freaky * @return $this */ public function setFreaky($freaky) { $freaky ===… Read more »

How to Make Eclipse IDE Faster

While coding the other day, Eclipse was running like shit. It was slow as hell. I couldn’t get anything done. I did all of the updates to Eclipse and even rebooted. It didn’t it help, it was dog ass slow. Checking my laptop resources, it was all fine. Researching this issue, I found out about… Read more »

How to Configure Apple Airport Extreme and Verizon Fios Router

I prefer Apple products over pretty much any other computer product any day of the week – if I can afford it. Prior to getting Verizon Fios, my preferred wifi router was my Apple Airport Extreme. What I like about the Airport Extreme is that I can plug a hard drive into it and do… Read more »

Connect Existing Eclipse Project to a Git Repository

Since we moved to Git at work for version control, I’ve had a few occasions in which I had an existing Eclipse project in my IDE that I wanted to connect with a Git repository. The process is, I feel a bit convoluted, but it sort of made sense after I did it once. First,… Read more »

How to Use Symfony’s Monolog for Logging

Monolog is the logging bundle for Symfony. It’s super easy to use. You just need to pull in the “logger” service and call the “error” or “info” method. In a controller you could do something like this. $logger = $this->get(‘logger’); $logger->info(“I’m logging over here”); $logger->error(“Who dat err?”); Obviously, you can do a lot more than… Read more »

How to Flush Routing Table on a Mac

If you’re feeling like your routing is all dicked up on your Mac, try this. sudo route -n flush; sudo route -n flush; sudo route -n flush; Running route several times should clear out all of your routing table data. Now restart your networking and your default routes should be created.

How to Restart Networking on a Mac

If you’re like me and you have to connect to a VPN with the Cisco Anywhere Connect client, you’re probably dealing with strange networking issues as a result. One of the things I do when I’m experiencing networking issues is that I restart networking on my Mac. To do that run this command. sudo ifconfig… Read more »

Color Eye Drop Selector for Mac

I often feel the desire to grab a particular color from an image or graphic I find on the Internet. And because I’m an ignorant fool, I’ve always struggled with doing this. I’d grab a screenshot, open the file in Photoshop or some similar program. It was always such a pain in the ass. I… Read more »