When’s it going to rain?

The wife and I decided to be better about bringing in the outside dog beds when it’s going to rain… But we needed to know when it might rain. So I threw together this script in 30 minutes last night to poll weather.gov and send me an email when more than 30% probability of rain was coming up. Granted it’s dirty but I thought I’d share it since it’s a good 60 minute intro to doing this kind of thing, might help someone in the future trying to understand the how DWML works…

https://gist.github.com/apokalyptik/5946350

OSX Install qcachegrind (kcachedrind) from source the quick way

This article by Georgiana is pretty much awesomesauce. Now I can look at my cachegrind files without booting up a VM.  If you’re having trouble, here’s some help.  You probably want this file from the qt-project website.  It will install to ~/Qt/.  Then you’ll want to run

~/Qt/5.1.0/clang_64/bin/qmake -spec 'macx-g++'; make

The above will be helpful if you’re getting an error like this:

/Developer/Tools/Qt/uic generalsettings.ui -o ui_generalsettings.h
make: /Developer/Tools/Qt/uic: No such file or directory
make: *** [ui_generalsettings.h] Error 1

or a huge stream of errors like this:

../libviews/globalguiconfig.cpp: At global scope:
../libviews/globalguiconfig.cpp:188: error: no ‘QColor GlobalGUIConfig::groupColor(CostItem*)’ member function declared in class ‘GlobalGUIConfig’
../libviews/globalguiconfig.cpp: In member function ‘QColor GlobalGUIConfig::groupColor(CostItem*)’:
../libviews/globalguiconfig.cpp:188: error: return type ‘struct QColor’ is incomplete
../libviews/globalguiconfig.cpp:190: error: ‘class ConfigColorSetting’ has no member named ‘color’
../libviews/globalguiconfig.cpp: At global scope:
../libviews/globalguiconfig.cpp:193: error: no ‘QColor GlobalGUIConfig::eventTypeColor(EventType*)’ member function declared in class ‘GlobalGUIConfig’
../libviews/globalguiconfig.cpp: In member function ‘QColor GlobalGUIConfig::eventTypeColor(EventType*)’:
../libviews/globalguiconfig.cpp:193: error: return type ‘struct QColor’ is incomplete
../libviews/globalguiconfig.cpp:202: error: ‘class ConfigColorSetting’ has no member named ‘color’
../libviews/globalguiconfig.cpp: At global scope:
../libviews/globalguiconfig.cpp:206: error: no ‘QColor GlobalGUIConfig::functionColor(ProfileContext::Type, TraceFunction*)’ member function declared in class ‘GlobalGUIConfig’
../libviews/globalguiconfig.cpp: In member function ‘QColor GlobalGUIConfig::functionColor(ProfileContext::Type, TraceFunction*)’:
../libviews/globalguiconfig.cpp:206: error: return type ‘struct QColor’ is incomplete
../libviews/globalguiconfig.cpp:226: error: ‘class ConfigColorSetting’ has no member named ‘color’
make: *** [globalguiconfig.o] Error 1

 

Go Docs

Wish you had an offline version of http://golang.org/ (for reference when hacking on the bus, plane, train, etc)? is opening Check out the -http argument to the godoc binary (bundled with go)…. run godoc -http=:8888 And then open http://127.0.0.1:8888/ in your web browser. Boom. Since Go is named, well, “Go” it’s a real PITA to search for things on the internet. So searching for things like “offline go docs” and “offline golang docs” or “download go docs” and the like tend not to yeild useful results.

Hope this helps someone. I finally stumbled on this on my own after thinking “Fine. I’ll just generate my own!”