I often get data files with a ton of data, but I only need the first few lines. It’s usually because I’m building out some test data for code I’m writing. I don’t need to create 2,000 accounts to run my code. Here’s how I figured out how to truncate a file from the command-line… Read more »
Posts Tagged: Mac
If you’re like me and you do your development work on a Mac, you’ll want to configure Postfix to send you email messages. It’s pretty easy to do. vi /etc/postfix/main.cf Edit main.cf and add the following to the end of the file. relayhost=smtp.gmail.com:587 smtp_sasl_auth_enable=yes smtp_sasl_password_maps=hash:/etc/postfix/sasl_passwd smtp_sasl_security_options=noanonymous smtp_sasl_mechanism_filter=plain smtp_use_tls=yes smtp_tls_security_level=encrypt tls_random_source=dev:/dev/urandom The key one is the… Read more »
Any Mac web developers out there right now still fiddling around with the version of PHP that Apple ships on every Mac needs to stop right now. I’ve been there. When OSX first came out I tried to make Apple’s PHP and Apache to work. I did get it to work, but it was a… Read more »
The subversion command-line client that ships with Yosemite is 1.7. That’s too old for most of us, but fortunately upgrading it isn’t a big deal. Here’s a good tutorial to show you how to do it.
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.
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 »
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 »