How to Get Mac Battery Level from Command Line
I'm a big fan of having as much information as I can get within the command line. I couldn't go without knowing which git branch I'm on, for example. Another important piece of information I like having is my current battery percentage.
To get the current battery level from command line, you can run:
pmset -g batt | grep -Eo "\d+%"
Since I get lost in command line for hours at a time, having the percentage present saves me the labor of shifting my eyes outside of shell. What information do you like having in your command line?
CSS and JavaScript: the lines seemingly get blurred by each browser release. They have always done a very different job but in the end they are both front-end technologies so they need do need to work closely. We have our .js files and our .css, but...
One of my favorite social APIs was the Open Graph API adopted by Facebook. Adding just a few META tags to each page allowed links to my article to be styled and presented the way I wanted them to, giving me a bit of control...
One of Dojo's major advantages over other JavaScript toolkits is its Dijit library. Dijit is a UI framework comprised of JavaScript widget classes, CSS files, and HTML templates. One very useful layout class is the TabContainer. TabContainer allows you to quickly create a tabbed content...
I turned this into alias called
battery
. Thanks for the tip!