Tuesday, April 22, 2014

Linux removing all directories of a certain name from a directory tree

Ok, so it's actually a Unix system.

I had to removed all directories of a certain name from a directory tree. No biggie, just using find here, along with du to tell me how big these bad things were on the file system:

find . -name "[directory name] -exec du --si {} \;"

Note that du -k gave it in kilobytes, and -m gave it in megabytes, and there is no -g option. However --si just picks the best units to show for each line output.

My thought was that I could use -exec rm -r {}\; with this find statment to delete the directories. However, the non grata directories appeared at different levels, sometimes within each other. This listing gave the top directories first, which meant after I had deleted the top directory find might still return the lower directory if the transfer of lines to -exec is done after find is completed. The solution was to use the argument to reverse the lower and higher level results:

find . -d -name "[directory name] -exec rm -r {} \;"

The downside to this is I was getting pestered my messages that said "find: warning: the -d option is deprecated; please use -depth instead, because the latter is a POSIX-compliant feature.". I didn't have time to figure out if -depth really is a drop-in replacement for -d.

Thursday, April 17, 2014

Chords to Babs Seed

Down another rabbit hole... It started from noticing that there are a lot of covers on YouTube to one of my favorite MLP:FIM songs, Babs Seed:


A great straightforward rocking cover:

https://www.youtube.com/watch?v=ajCqrg0jucw

(By MandoPony, who does some of the best covers on the Net of songs from the show)


An also rocking garage version that wanders just a little bit off of the normal song timing:

https://www.youtube.com/watch?v=0MpqkdgTgiw


This one that's way off the normal song, with lots of rock references including a Beatles scream which is what wins me over:

https://www.youtube.com/watch?v=AubDY7SkJhU

(The video that introduced me to all the MLP ROCK! videos by Claire Anne Carr.)


This delightful acoustic version of the song by MandoPony:

https://www.youtube.com/watch?v=E7Xt3g-cbPM


And many more:

https://www.youtube.com/results?search_query=babs+seed+cover


The upshot is that the chords are pretty easy, here they are:

http://tabs.ultimate-guitar.com/m/misc_unsigned_bands/cmc_-_babs_seed_crd.htm


More amazing Babs Seed covers and where they lead:

Here is something utterly incredible:

https://www.youtube.com/watch?v=AMrkA10hNuo


That in turn was based on something from the utterly incredible PhillyPu, who produces all kinds of things MLP:

https://www.youtube.com/user/PhillyPu/featured


Including this clubified Pinkie Pie remix that I might not stop listening to ever:

https://www.youtube.com/watch?v=FfxgBGYMTxY


Then that leads to this pretty nice setting of Pinkie Pie video clips to a preexisting club song:

https://www.youtube.com/watch?v=z6ePliP9M4c

Which in turn leads to hundreds of similar "PMVs" of just this one song, but also other music too.


Babs Seed 8 bit on a Gameboy, pretty impressive:

https://www.youtube.com/watch?v=14yim_M1CcU

Many other 8 bit covers in the suggestions.






Traversing a list backwards in Python

I would never have figured this out. Apparently there is a third parameter to list indexing which is step size. Setting that to -1 causes a for loop to operate on each list element from the last to the first.

for item in my_list[::-1]:
print item

http://stackoverflow.com/questions/529424/traverse-a-list-in-reverse-order-in-python

Returning a list from a python function

It's easier than imaginable. Just make a list in your function, then say return . As long as the calling function assigns the result to be a local list, and that list is accessed by array index in the calling function's code, it works seamlessly.

http://stackoverflow.com/questions/9317025/python-return-list-from-function

Riotfish has a twitter

Apparently Riotfish will be coming back soon:

https://twitter.com/Riotfish

How to list what ports are open on a Windows PC

You can run netstat from the DOS command window:

https://answers.yahoo.com/question/index?qid=20080810132332AAr5nSv

This may return an error message "The requested operation requires elevation". What this is trying to say is that you have to be Administrator to run it. This turns out to be easy to solve; when starting the command window, right click on the launch icon and select "Run as Administrator". If you have the admin password or are a Power User this will work easily:

http://answers.microsoft.com/en-us/windows/forum/windows_7-performance/error-the-requested-operation-requires-elevation/cdd97f8c-7f58-e011-8dfc-68b599b31bf5

Tuesday, April 15, 2014

Enable Remote Desktop Windows 7

Remote Desktop was disabled on our new system, but it's simple to enable it. Right click on My Computer to get to Properties. Select "Remote Settings". In the section for Remote Desktop, select one of the Allow Connections options. In our case, we are allowing all remote desktop connections.

http://windows.microsoft.com/en-us/windows7/allow-remote-desktop-connections-from-outside-your-home-network

Monday, April 14, 2014

Maryland Code For Deck Railings

Links found in the recent search for the standards to upgrade Dad's deck to.

Best so far, a graphic from Anne Arundel County:

http://www.aacounty.org/IP/Resources/2012_Deck_Guide.pdf

The most complete graphic ever, this shows The Spheres:

http://www.marylandheights.com/modules/showdocument.aspx?documentid=5199

Text only description of the code, including The Spheres, and also the 200lb side force standard. With a URL of decks.com I would have expects this to be better:

https://www.decks.com/deckbuilding/Deck_Railing_Codes

Another awesome URL, inspectipedia.com. General essay about railing safety including cable railings, with photos of railing fails:

http://inspectapedia.com/BestPractices/Deck_Railings.htm

A contractor's chat room on the subject of IRC and railings:

http://www.contractortalk.com/f50/irc-deck-guardrailing-codes-more-55632/

Some nice graphics showing the standard method for making deck railings:

http://www.handymanhowto.com/how-to-build-a-2x6-porch-rail-part-1/

A discussion of deck railing height and the 200lb standard:

http://landscaping.about.com/od/decksandarbors/a/deck_railings_3.htm

A chat room about using lattice for railings:

http://www.contractortalk.com/f50/lattice-railing-48566/

Just a cute online magazine article about fancy deck railing ideas:

http://www.bhg.com/home-improvement/deck/ideas/deck-railings/#page=1

Monday, April 7, 2014

Hay Day for Windows

It turns out that while there isn't a Windows "version" of Hay Day, there is an Android emulator for Windows that will run the Android version of Hay Day. The emulator is called Bluestacks.

http://www.bluestacks.com/

There's a ton of hits for "Hay Day for Windows" that all point back to downloading bluestacks. The sheer number of different web pages suggesting this after indirectly promising a windows version of the app is suspicious. Here is review of bluestacks by a reputable site that convinced me that it might not be a scam after all:

http://www.tomsguide.com/us/how-to-run-bluestacks,review-1912.html

A lot of reviewers on Cnet were convinced that bluestacks introduced viruses to their systems, while others mocked those reviews and indicated that if they declined bundling options (a step which does not seem to exist in the most recent release) that they had no issues:

http://download.cnet.com/BlueStacks-App-Player/3000-18513_4-75593133.html