Thoughts on Rails

Riding the Train of Thought

Archive for July 2012

Check Western Grid data with a command…

leave a comment »

Note: not optimized, but it works.

#!/bin/bash curl -s http://www.wrldc.com/ | sed -n '/WR Grid Frequency/,/UI Rate/p' | sed -e 's#<[^>]*>##g' | sed 's/ / /g' | sed 's/UI Rate (Rs\/Unit)/ /g' | sed 's/ //g'

Output looks like this:
WRGridFrequency 50.07 LastUpdatedat: 31-Jul-201216:25:05

Yes, there are trailing new-lines that I am not sure how to get rid of easily, so letting them be. Suggestions welcome!

You can put this into TextExpander and have the output pasted into current window on-demand.

Written by hiway

July 31, 2012 at 4:28 pm

Posted in Uncategorized

Hey, @whatsapp are you being impersonated? This smells like spam…

leave a comment »

Screen_shot_2012-07-30_at_12

Clicking on the notification took me here:

0screen_shot_2012-07-30_at_12

URL:

https://www.facebook.com/dialog/oauth?client_id=[…]&redirect_uri=http%3A%2F%2Fmilindgupta.com%2Fwhatsapp%2Fmain.php%3Fappid%3D446384218734458&state=[…]&scope=friends_online_presence

So someone with the domain milindgupta.com seems to have created an app with the name WhatsApp. I haven’t checked further, but someone with better resources might want to have a look.

Written by hiway

July 30, 2012 at 1:04 pm

Posted in Uncategorized

Reminded me of The Joker…

leave a comment »

Screen_shot_2012-07-26_at_2

Flipkart emailed with subject “Put a smile on your sibling’s face this Raksha Bandhan!” … the first reaction mid-sentence was “The Joker!”
I can’t shake it off now.

Written by hiway

July 26, 2012 at 2:29 pm

Posted in Uncategorized

Pluggdin asked: “Geeks: How do you work?” (my extended reply)

leave a comment »

I realized I’ll be dumping too much in one reply on Pluggd.in, so decided to keep it short there and forum and instead posting the full braindump here:

1. My favorite IDE.

Komodo Edit

2. Apps I just can’t live without.

Old Tweetdeck (still keeping it alive!), Firefox, TextExpander

3. My best time-saving shortcut/life hack?

1. TextExpander with Python scripts to paste command output/ config files/ environment variables into my IDE: I only type in “..cmd” and the command whose output I want pasted. Say, I want to share the uname, this is what got pasted: ” Darwin “

2. Shortcuts to override new file creation shortcut in Komodo Edit. Since it is based on Firefox, you can close / move to tabs using same commands as FF, however if I want a new tab (a new file) I have to remember to press Cmd+N, so used Spark to let both commands Cmd+T and Cmd+N work. Also, use VI mode 😉

3. Have applescript / python scripts hooked to keyboard shortcuts to ease repeated tasks such as go to the issue tracker or create a new issue from anywhere in the system.

4. Use Sikuli to set up my workstation at the beginning of the day. Rudimentary tiling window manager on the Mac desktop using ShiftIt – is very useful since I have a fairly large screen.

5. Use followupthen.com to defer emails that I do not want to respond to right away, but don’t want to keep in my inbox either.

6. I tweet a lot, and among other things, I tweet current music occasionally, and I only have to type “..muz” to paste this: ” #music My Generation by The Who from The Boat That Rocked CD2  ( www.youtube.com/results?search_query=My+Generation+The+Who ) “

1. TextExpander intercepts it and runs my Python script…
2. The script picks up current track playing in iTunes.
3. It creates a youtube search URL for the song
4. This tweet is pasted into Tweetdeck
4. URL is then auto-shortened in Tweetdeck using my own bitly short domain.
5. The tweeted URLs are automatically stored in my delicious account via ifttt.

This saves me a great deal of time if I want to share current track, which happens often, and I can go back to my music shares whenever I want.

7. Use ifttt to automatically download a copy of photos that I’m tagged in on Facebook. 

8. Ifttt also emails me every tweet that I send out with the hashtag: #notetoself in it.

9. A bot running on Google’s App Engine  to pick out and add all my #idea and #todo tweets to my Trello board (and bunch of other interesting things)

10. Gmail filters to make sure only the really important stuff ever reaches my inbox. All unnecessary automatic notifications are archived, but rarely seen. It takes discipline to set this up over time, or lots of time on a weekend.

4. Music I listen to, while @ work. [inspired from Lifehacker]

There’s a 27 minute version of Pink Floyd’s “Shine on you crazy diamond.” which is a loop favorite. 
I like movie soundtracks – the energetic and uplifting ones are best. Personal fav is TRON Legacy.

Written by hiway

July 20, 2012 at 3:41 pm

Posted in Uncategorized

Good Morning Mumbai :)

leave a comment »

Gravity

Written by hiway

July 20, 2012 at 6:06 am

Posted in Uncategorized

Something weird about this creature…

leave a comment »

Gravity

Written by hiway

July 16, 2012 at 4:47 pm

Posted in Uncategorized

Loving the posts on marcandangel.com … A blog worth bookmarking and reading often.

leave a comment »

Gravity

Written by hiway

July 15, 2012 at 11:29 pm

Posted in Uncategorized