Mac command to view last login/wake/sleep/charge times

The pmset utility on mac is quite useful for viewing system logs. If you type:

you’ll be able to see some cool system logs. However, as a timesaver, here’s a no-bullshit command to view the following times:

  • When mac went into sleep
  • When mac came out of sleep
  • Charge levels
  • Standby times

Enjoy!

CodeEval: Fizz Buzz (Java)

Finally managed to get some spare time in order to do this. Helped be clear my head a bit. Here’s my quick 1 minute solution to CodeEval’s fizz buzz problem in Java:

Continue reading

Welcome!

Welcome to Code Ninjutsu.

Code Ninjutsu is about art of writing efficient code. In this blog, we shall discuss methods to write efficient code. I shall also teach tricks that you can perform in different programming languages to get the most out of your code. We shall also see how algorithm works and methods to make it more efficient. We have a lot to talk about. Till then, you can watch videos on my youtube channel:

http://www.youtube.com/user/themanthandave

Later then!

Manthan Dave