Archive for the ‘Apple’ Category

Hey Apple – Where’s the stinkin’ .Profile?

Posted on March 12th, 2014 in Apple, Linux/Unix | No Comments »

So after a multi-year hiatus from living daily in the OSX world, I recently could resist the “Shinny” no longer; I broke down and purchased a MacBook Pro. Just as with every Apple product I’ve used through the years, this new rMBP 13” is a wonderful piece of hardware. But Apple’s consistently sublime hardware is not the subject of this post, but rather the software – OSX 10.9 Mavericks to be specific.

While I’ve been away form the Mac ecosystem (Snow Leopard days), many things have changed – The App Store, death of physical media, the hard drive displaying by default on the Finder’s desktop, I could go on. But one thing that has remained true as the north star is OSX’s Unix underpinnings, and where there is Unix – there is a Terminal.

As someone who’s idea of making a computer useful requires, regardless how pretty the GUI is, there is always a CMD.exe or Terminal shortcut overtly located on the desktop – you can be sure getting down to the command line on my new notebook was a top priority. With Terminal prominently situated on my dock I was ready to work – or so I thought until I started barking some of my favorite Linux/BSD commands at the window.

What the heck? No “ll” alias? And what about my other favorite behaviors? Ok, ok – surely I just need to modify the .profile (hidden file in the home folder of many *nix systems that defines the CLI’s operation.)  From the command line, I issue a “ls -al” to show me the hidden “.” files, and sure enough – no “.profile” – great, I’ll just grab one of my linux ones and be good to go. Right? Wrong!

Meet the .bash_profile file

After a little bit of digging online, I found some docs referring to the .bash_profile. Interestingly, on my fresh OSX 10.9 Mavericks build this file does not exist, not even an empty one.  So if you, like I, desire more customized control over your Terminal experience – feel free to create a .bash_profile and then use my template below to populate it. Consider it a soup starter, and you an mix in your favorite changes – Enjoy.

#     SET ENV
#   ------------------------------------------------------------
export PATH="/usr/local/:$PATH"
#   Set Default Editor (change 'Nano' to the editor of your choice)
#   ------------------------------------------------------------
export EDITOR=/usr/bin/nano
#   Set default blocksize for ls, df, du
#   ------------------------------------------------------------
export BLOCKSIZE=1k
#   Add color to terminal
#   ------------------------------------------------------------
export CLICOLOR=1
export LSCOLORS=ExFxBxDxCxegedabagacad
#   -----------------------------
#   -----------------------------
alias shome='ssh'          # quick SSH shortcut
alias cp='cp -iv'                           # Preferred 'cp' implementation
alias mv='mv -iv'                           # Preferred 'mv' implementation
alias mkdir='mkdir -pv'                     # Preferred 'mkdir' implementation
alias ll='ls -FGlAhp'                       # Preferred 'ls' implementation
alias less='less -FSRXc'                    # Preferred 'less' implementation
cd() { builtin cd "$@"; ll; }               # Always list directory contents upon 'cd'
alias f='open -a Finder ./'                 # f:            Opens current directory in MacOS Finder
alias ~="cd ~"                              # ~:            Go Home
alias c='clear'                             # c:            Clear terminal display
alias path='echo -e ${PATH//:/\\n}'         # path:         Echo all executable Paths
alias show_options='shopt'                  # Show_options: display bash options settings
alias fix_stty='stty sane'                  # fix_stty:     Restore terminal settings when screwed up
alias cic='set completion-ignore-case On'   # cic:          Make tab-completion case-insensitive
mcd () { mkdir -p "$1" && cd "$1"; }        # mcd:          Makes new Dir and jumps inside
trash () { command mv "$@" ~/.Trash ; }     # trash:        Moves a file to the MacOS trash
ql () { qlmanage -p "$*" >& /dev/null; }    # ql:           Opens any file in MacOS Quicklook Preview
alias DT='tee ~/Desktop/terminalOut.txt'    # DT:           Pipe content to file on MacOS Desktop
#   lr:  Full Recursive Directory Listing
#   ------------------------------------------
alias lr='ls -R | grep ":$" | sed -e '\''s/:$//'\'' -e '\''s/[^-][^\/]*\//--/g'\'' -e '\''s/^/   /'\'' -e '\''s/-/|/'\'' | less'
#   ---------------------------
#   ---------------------------
#   findPid: find out the pid of a specified process
#   -----------------------------------------------------
#       Note that the command name can be specified via a regex
#       E.g. findPid '/d$/' finds pids of all processes with names ending in 'd'
#       Without the 'sudo' it will only find processes of the current user
#   -----------------------------------------------------
findPid () { lsof -t -c "$@" ; }
#     Find memory hogs
#   -----------------------------------------------------
alias memhogstop='top -l 1 -o rsize | head -20'
alias memhogsss='ps wwaxm -o pid,stat,vsize,rss,time,command | head -10'
#   cpuhogs:  Find CPU hogs
#   -----------------------------------------------------
alias cpu_hogs='ps wwaxr -o pid,stat,%cpu,time,command | head -10'
#   topforever:  Continual 'top' listing (every 10 seconds)
#   -----------------------------------------------------
alias topforever='top -l 9999999 -s 10 -o cpu'
#   ttop:  Recommended 'top' invocation to minimize resources
#   ------------------------------------------------------------
#       Taken from this macosxhints article
#   ------------------------------------------------------------
alias ttop="top -R -F -s 10 -o rsize"
#   my_ps: List processes owned by my user:
#   ------------------------------------------------------------
my_ps() { ps $@ -u $USER -o pid,%cpu,%mem,start,time,bsdtime,command ; }

#   ---------------------------
#   ---------------------------
alias myip='curl'                    # myip:         Public facing IP Address
alias netcons='lsof -i'                             # netCons:      Show all open TCP/IP sockets
alias flushdns='dscacheutil -flushcache'            # flushDNS:     Flush out the DNS Cache
alias lsock='sudo /usr/sbin/lsof -i -P'             # lsock:        Display open sockets
alias lsocku='sudo /usr/sbin/lsof -nP | grep UDP'   # lsockU:       Display only open UDP sockets
alias lsockt='sudo /usr/sbin/lsof -nP | grep TCP'   # lsockT:       Display only open TCP sockets
alias ipinfo0='ipconfig getpacket en0'              # ipInfo0:      Get info on connections for en0
alias ipinfo1='ipconfig getpacket en1'              # ipInfo1:      Get info on connections for en1
alias openports='sudo lsof -i | grep LISTEN'        # openPorts:    All listening connections
alias showblocked='sudo ipfw list'                  # showBlocked:  All ipfw rules inc/ blocked IPs

This Border Crossing brought to you by the RIAA

Posted on June 4th, 2008 in Apple, Linux/Unix, Windows | No Comments »

“Your Papers Please?”, says the homeland security officer with an accent reminiscent of something from a WWII Nazi Germany checkpoint. Corny, yes but this is how the inquisition is starting to feel upon your entry into the land of the Free.

Where once your greatest customs concern was staying under the limit of alcohol, tobacco and designer fragrances, now beware as your MP3s, ripped DVDs, Porn and illicit Warez are likely to land you and your computer in the pokey!

Now more then ever digital privacy is sounding like a good idea. Truecrypt, to the rescue! I’ve been playing with the free cross platform encryption now for a few weeks and I’m impressed!

Regardless whether you need to secure documents of a professional or personal nature, configuring a Truecrypt vault is the way to go. While the sensational nature of the RIAA and MPAA’s co-enforcement at US borders grabs headlines, striking a nerve with the tech savvy, the local security that Truecrypt offers is useful for many who have no plans of international travel anytime soon.

With over 50% of new system sales in the form of highly portable (easily stolen) notebooks, data encryption is not only desirable to keep out the prying eyes of governments and corporations, but thieves as well! Bear in mind that Truecrypt can be used on SD Cards, USB drives and other removable media.

Regards less your need for encryption, Truecrypt is a powerful, effective, easy to use and best of all Open Source solution – check it out at

Podcast Picks Part II

Posted on May 14th, 2008 in Apple, Business & Industry, Gadgets, Internet & Networking, Linux/Unix, Tech & Science, Windows | No Comments »

As promised, I’m back with part two of my personal podcast selections.

Grammar Girl –

If your reading this blog post there is a good chance you are a blogger yourself, in which case this cast is a must for you. But regardless how you use the English language, Grammar Girl has helpful tips for you. Each installment of GG is quick and to the point, focusing on all kinds of grammar usage issues.

Linux Action Show –

Begin tired old Cliché: “If you only listen to one Linux Podcast, this should be it!” Chris and Bryan are not only incredibly insightful and up on all the latest happenings surrounding the Open Source community, they put on one darn entertaining Podcast.

And if you want all the casts put on by this resourceful duo (like the afore mentioned CastaBlasta) you can subscribe to the unified Jupiter Broadcasting Feed at –

Linux Basement –

Great Tutorials, Fantastic close-nit community and as if that is not enough, you get and Open Source Song every episode! Yes, you heard right an OSS “Song” performed by the ever talented Chad Wollenberg, host of the the Linux Basement.

Slashdot Review –

Don’t have time to sift through all the great content on Reddit, Digg, Slashdot or a myriad of others, no worries, Andrew McCaskey does an amazing job editing and reading them to you. Under 15 minutes and you are up to date with the day’s tech/geek news.

Super Average Podcast –

Looking for a great down to earth spiritual talk show? The interestingly named “Super Average Podcast” is a weekly round table of four everyday guys from different walks of life, talking about what faith means to them.

This WEEK in TECH –

Leo Laporte, nuff said! Ok seriously if you have not ever heard of the “Twit Army” this is the Leo’s flagship podcast – part punditry, part news, part interview show, and plenty of random thoughts, This Week in Tech features a weekly round table (guests change from show to show) discussing the state of all things tech.

This will have to do for now, but you have gobs of stuff to listen to now, so find some new podcasts already.

Podcast Picks Part I

Posted on April 17th, 2008 in Apple, Internet & Networking, Linux/Unix, Tech & Science, Windows | No Comments »

Last week I blogged about the state of the Satellite radio landscape and the many great alternatives to fee based subscription radio. But let’s face it no matter how many MP3s you have at some point you may want to listen to some talk radio style programming.

To that end I have found an assortment of audio podcasts that inform, educate and challenge me on a regular basis. Hopefully you will find something new in this list that sounds interesting (sorry no pun intended.) Note: these are all audio programs, there are some wonderful video casts that warrant consideration – perhaps I’ll save those another post.

CastaBlasta Show –

Newer show I’ve started to enjoy that centers around geek/nerd/sci-fi and entertainment culture. Three regular hosts, the same creative team that developed the Linux Action Show, put out this weekly review/recap of the stories ranging from movies to video games, book reviews to toys for the not so grown-up.

CNET’s Buzz Out Loud –

“Welcome to CNET’s podcast of indeterminate length episode number 5,294,387!” Ok well maybe that is a bit of an exaggeration, but Molly Wood and Tom Merit, should be awarded some kind of medal for consistency and longevity! BOL is a daily, yes DAILY, 30 – 40 minute tech news and commentary show, summarizing the happenings of Silicon Valley, Redmond, and the greater tech world. High production values, methodic consistency and great hosts make this a must listen for every techy.

Cranky Geeks –

“Arg – visit my blog @” Love him or hate him Dvorak is a fixture in the computer journalism world, if you look up tech pundit in the dictionary, you’ll the host of the Cranky Geeks there. If there was any doubt in your mind, the show name it truth in advertising, each week John assembles a panel of feisty technology specialists for thirty minutes of banter (ala his old Tech TV show – Silicon Spin.)

Daily Audio Bible –

Less is more, and in the case of bible study Brian Hardin provides daily readings from the scriptures with heart felt passion, high production values and minimal commentary. Refreshing and simple Brian has been reading various translations every day for three years now. Regardless of your spiritual position, incorporating 15 minutes of the Bible into your day is always positive.

FLOSS Weekly –

Open Source Software is changing the way we use technology in our everyday life; whether you know it or not you are most likely already working with OSS. To this end Randal Schwartz and Leo Laporte host this weekly show that focuses each episode on an Open Source technology, usually via an interview with the inventor or author.

Fresh Ubuntu Podcast –

If you “Heart” Ubuntu – this is the show for you! Don’t me wrong, other Linux Distros are welcome, but Harlem and Peter’s first love is for Ubuntu. This weekly Linux round-up features news and helpful tips along with a health dose of whatever is irking the hosts all in fast passing hour long show.

Next post I’ll continue this list with six more great podcasts, till then – happy listening!

The Un-SXSW Report

Posted on March 12th, 2008 in Apple, Gadgets | No Comments »

So is it just me, or is it normal to feel like the only blogger not in Austin this week? Yea, yea, perhaps its just some snarky jealousy showing through here, but since everyone in the tech media universe is covering South by Southwest this week I figured it would be refreshing to blog about something else!

The iPhone Strikes Back!

Hell might not have froze over, but there was a refreshing fall like breeze reported wafting throughout the nether regions as Apple announced last week that its Version 2.0 iPhone software will support Microsoft Active Sync.

While third party apps and the availability of the SDK garnered much of the blog-o-sphere’s attention this week, the inclusion of native Microsoft Exchange support is the big take-away from this announcement. This opens the door for the iPhone into most business – an arena whose stance toward the device has been somewhere between indifferent to hostile.

Chalk it up as a “win” for both Apple and Microsoft, who are both trying desperately to increase market share in the high-end smart phone niche before Google weighs in later this year with Android.

Year of the home NAS – A Tera-byte in every pot!

Posted on February 5th, 2008 in Apple, Internet & Networking, Linux/Unix, Windows | No Comments »

The digital home is here, and to feed a hungry media rich world you need a terabyte or more; at least that’s what NAS vendors (Network Attached Storage) are banking on this year. Large hard drives are nothing new, what’s novel for 2008 is the appearance high capacity, inexpensive, consumer friendly NAS systems for the home.

Despite CES 2008 being largely unimpressive, with regards to new innovative product launches, there was one interesting theme that persistent all over the show floor; the appearance of RAID based NAS boxes for the home. In the past home based storage has been limited to external USB or Firewire boxes, but not any more. Thanks to the raise of home networking and the digital lifestyle, every member of the family from parents to teens and even little ones have storage needs.

Here are a few of the standouts in the home storage arena:

Netgear – Ready NAS Duo

HP – MediaSmart Server

Lacie Ethernet Disk mini – Home Edition

The truly unique aspect about these offerings if just how consumer friendly they are! No need to be a network admin or have your local geek force out to install them.

If you have been looking to add storage to your home computer this is the method you should employ, any of the above products will do wonderfully.

Any Friend of Apache, is a Friend of Mine!

Posted on January 30th, 2008 in Apple, Internet & Networking, Linux/Unix, Windows | No Comments »

I’ll gladly concede that backend web server technology is about as sexy as a 1980s’ Volvo 240GL. But having said that, the good folks at Apache friends are making a hot rod out of these mundane, but critical applications.

The XAMPP project is an easy to install and configure bundle containing the Apache web server, MySQL, PHP and Perl. The emphasis here is on EASY! If that does not sound appealing, then you have not experienced the full pain of trying to deploy these services individually. XAMPP eliminates these wows with an all inclusive package for Linux, Mac, Windows and Solaris. Oh, and did I forget to mention you get all this for free.

Recently I deployed the Linux package onto a Ubuntu 7.10 server in my office. The process was painless, and I was able to deliver web services to my designer in less then 30 minutes.

So next time you are setting up a web server do yourself a favor – install XAMPP!

Goodbye iTunes

Posted on January 4th, 2008 in Apple | No Comments »

Occasionally a piece of software comes along that is so good at what it does that you simply refuse to look objectively at the true cost of using it – Apple’s iTunes is today’s case in point.

While I’ve never owned an iPod or iPhone, nor do I use a Mac on a day in day out basis, I have come to love iTunes and use it regularly. Easy to use; especially for podcasts, free to download and nicely organized library features make it extremely compelling whether you are syncing to an Apple device or not. And while there have been buggy versions in the past, iTunes is generally void of critical defects and albeit its a bit on the bloated side, it performs well.

So by now you must be wondering what the problem is, or specifically what the “cost” is that I referred to? iTunes despite it’s “free download”, carries a heavy price tag; and no, I’m not even talking about the potential cost of overpriced, DRM iTunes content, but instead the cost of finding yourself mired deeper and deeper into the monolithic Apple world view. Apple does not want interoperability of their software – they never have and never will. Apple needs to sell more and more hardware to sustain its business model, therefore any software they “give away” will always carry out a more calculated objective, furthering the Apple gospel and feeding a subconscious desire to buy exclusively Apple products.

Ironically it was an Apple ad campaign that challenged us all to “Think Different”, yet nothing about the Apple ecosystem supports this mantra. However with a commanding market share of portable media players and the most successful online store, the last thing Jobs and company want is for you to think differently about what music (and video) library management application your using. But do other truly free and open options exist, preferably cross platform and GPL?

Rhythmbox is a fine, free and open, solution for Linux if you are looking for a comprehensive iTunes alternative, unfortunately I do not believe it is available for OSX or Windows. Juice is a promising looking pod-catcher that I’ve just started using, it supports all major architectures and is open-source. (you can find a link in my delicious bookmarks to the right.)

If you have found a good cross-platform iTunes replacement please share your findings in the comments. Maybe we can all start the new year by bidding iTunes farewell.

It’s all about the iGoopple baby!

Posted on November 15th, 2007 in Apple, Business & Industry, Internet & Networking | No Comments »

Psst! hey buddy I have a hot stock pick for yea… Warning: All of my investing advice should be consumed with a grain of salt. In the spirit of full disclosure; I discovered just how bad a day trader I am during the last tech bubble of 2000! But, seeing we are now peaking in the Bubble 2.0 era, it seams an appropriate time for me to dust off my stock prognostication skills and post about two of the most influential tech issues out there.

Apple and Google – In a Class of their own

Some tech companies are all about the hype, while others actually deliver on the goods, but rarely do you find established players that are both profitable while simultaneously maintaining that meteoric level of excitement present in a pre-IPO startup; and then there’s Google and Apple. Titans of tech both command legions of devoted customers, soaring share prices and massive media attention. But is their stock worth it today? Is there still room for growth?

Fundamentals Don’t Matter

While many business analysts and fund managers are quick to cite trends and backup their stock ratings with statistics like earnings per share, Cash reserves, or the state of a company’s management team, in the case of both Apple and Google these hard facts don’t seam to matter.

The usual barometers for company health and stock value can not measure these firms. While some might argue this is just a symptom of the new tech bubble, Apple and Google are so compelling, their momentum is virtually unstoppable. Let’s look a little deeper at each company and try to uncover why this is.

Google – It’s about the Ads stupid!

The key thing to understand about Google is that they’re an advertisement firm. Nope, not a search engine or social network or widget provider or even soon to be a mobile phone OS, Google is the new ad medium of our time – and it’s only going to grow.

Google Ad sense is already the most profitable aspect of the company, and while search made them famous, ads are paying the bills. Look for this to continue especially as Google branches into new ventures and platforms like the Open Social and Gphone OS spec. With a billion plus potential people to target – and I do mean target – the sky, and share price, are the limit.

Potential pitfalls do exist though. Foreign government’s demands to block access or hand over results as a provision of doing business in their country (think China) have created industry watcher and human rights concerns, even some loyal fan base outrage. Privacy, however, is an even greater source of discord. As users freely disclose marketing and demographic data that Google and its partners are using to targeting products and services at users with precision accuracy, privacy advocates warn that too much personal information is being amassed.

While these concerns are only likely to grow given Google’s pervasive plans, end-users simply enjoy Google’s offerings too much to give them up. Combine end users insatiable appetite for convenience with the virtual ubiquity of Google’s services – and therefore ad placement opportunities – and you have a formula for continued success. Looks like the stock is still a bargain at $1000 per share!

Apple Uber Allies

If there is one lesson that can be learned from both the Jonestown massacre and Apple’s stock performance as of late; the cult of personality is alive and well. Now I’m not saying that Steve Jobs is a charismatic, magnetic, tyrannical cult leader… then again, let me get back to you on that. Regardless of whether you want to attribute Apple’s success to its vivacious leader, there’s no question that Job’s return to Apple has ushered in a new era of profitability and market share expansion.

Apple is unquestionably the most over hyped and over covered tech company out there. Despite all the ink that has been spilled chronicling Apple’s greatness and the zealous fan base, even this non-Apple user has to admit; Apple is really firing on all cylinders and its stock is only going to climb. This growth is going to be driven by continued dominance of the iPod/iTunes ecosystem, strong computer sales (as Microsoft Vista falters), and the long term impact of Apple’s entry into the wireless space, ala the iPhone.

So when analyzing Apple the bottom line is: despite the excessive hype surrounding their products, software and dynamic CEO, Apple is still an issue to buy and hold.

Mobiles are the Future

Both Google and Apple are focused on the future, and the future is phones. Apple has already made a tidy chunk of change this year with the iPhone, and relatively speaking this is just the tip of the iceberg. While Google’s Android platform will not be ramping up till mid 2008, the search and ad giant is not about to surrender the mobile market to Apple, Microsoft or Palm.

Not only do mobiles represent new revenue streams for Apple and Google, but they usher in the next battlefield for consumer minds and pocketbooks. The companies that dominate the coming generation of highly integrated mobile voice/messaging/computing devices will undoubtedly see dramatic profits and stock appreciation. Google and Apple both know this and have set in motion strategies to capture this market, this anticipated growth and Apple/Google’s positioning for it is one of the most compelling reasons to own both companies.

Forget the Hype, Buy Apple and Google

It’s hard to find two companies that have greater visibility that Google and Apple. They are part of our daily lives, covered exhaustively and considered over valued by many. Despite what the detractors have to say, these issues are must haves for any tech portfolio. Heck the only thing that would make them more attractive is a merger. What would we call them? iGoopple?

Open Office “Switch” Update: Spell Checker – Not all that and a bag of chips

Posted on October 24th, 2007 in Apple, Business & Industry, Linux/Unix, Windows | No Comments »

Its month three since I jettisoned Microsoft Word and Excel, and switched to Open Office as my full-time spreadsheet and document editor. And while the experience has been overall very positive, I’m quite disappointed with the spell checker correction algorithm.

Good spell check has always been a big part of my word-processing needs – Yes, I’m a horrific speller – and the heuristics for the auto-correction is just not on par with Microsoft Word.

Also lacking is the facility for managing custom dictionaries. I was unable to easily port my existing Word compatible dictionary; and by easily I mean the ability to do it in under an hour!

I’ll have more updates on my experiences switching in future posts, but for now I need to mind my spelling.