Andy - Dave's Blog

Search
My timeline on Mastodon

Tweet from Andy Baio

2016 Dec 6, 2:30
OH. MY. GOD. @SethBling MADE AN ATARI 2600 EMULATOR IN MINECRAFT. https://youtu.be/5nViIUfDMJg 
PermalinkComments

Tweet from Andy Daly

2016 Dec 2, 11:08
If you find that interesting, you'd probably be FASCINATED by intelligence briefings & state dept consultations. Give 'em a try!
PermalinkComments

Tweet from Andy Baio

2016 Aug 6, 10:59
We're going to need more Christmas lights.
PermalinkComments

Tweet from Andy Richter

2016 Jul 30, 3:42
Back in my day when we found a Pokémon we had to beat it to death with a rotary phone
PermalinkComments

Retweet of AndyPavia

2016 Feb 11, 1:33
@k_seks @jarennert Using FaceDetect on a Raspberry Pi #WebOnPi #IoT #windows10 @MSEdgeDev pic.twitter.com/Qk2PyoedBP
PermalinkComments

waxpancake:

2015 Jan 15, 2:35
Andy Baio @waxpancake :
pic.twitter.com/IkcFnVavwb
PermalinkComments

Command line for finding missing URLACTIONs

2011 May 28, 11:00

I wanted to ensure that my switch statement in my implementation of IInternetSecurityManager::ProcessURLAction had a case for every possible documented URLACTION. I wrote the following short command line sequence to see the list of all URLACTIONs in the SDK header file not found in my source file:

grep URLACTION urlmon.idl | sed 's/.*\(URLACTION[a-zA-Z0-9_]*\).*/\1/g;' | sort | uniq > allURLACTIONs.txt
grep URLACTION MySecurityManager.cpp | sed 's/.*\(URLACTION[a-zA-Z0-9_]*\).*/\1/g;' | sort | uniq > myURLACTIONs.txt
comm -23 allURLACTIONs.txt myURLACTIONs.txt
I'm not a sed expert so I had to read the sed documentation, and I heard about comm from Kris Kowal's blog which happilly was in the Win32 GNU tools pack I already run.

But in my effort to learn and use PowerShell I found the following similar command line:

diff 
(more urlmon.idl | %{ if ($_ -cmatch "URLACTION[a-zA-Z0-9_]*") { $matches[0] } } | sort -uniq)
(more MySecurityManager.cpp | %{ if ($_ -cmatch "URLACTION[a-zA-Z0-9_]*") { $matches[0] } } | sort -uniq)
In the PowerShell version I can skip the temporary files which is nice. 'diff' is mapped to 'compare-object' which seems similar to comm but with no parameters to filter out the different streams (although this could be done more verbosely with the ?{ } filter syntax). In PowerShell uniq functionality is built into sort. The builtin -cmatch operator (c is for case sensitive) to do regexp is nice plus the side effect of generating the $matches variable with the regexp results.
PermalinkCommentspowershell tool cli technical command line

Golf

2010 Nov 18, 2:58PermalinkCommentsComics Andy Keith technical

lbrandy.com » Blog Archive » Using genetic algorithms to find Starcraft 2 build orders

2010 Nov 8, 3:31Genetic algorithm finds awesome SC2 build orderPermalinkCommentsai algorithm blog code videogames game starcraft2 sc2 genetic-algorithm

Halloween and Gas Park Weekend

2008 Nov 4, 10:14

Gas Works Park, SeattleGas Works Park, SeattleThe weekend before last Sarah and I went down to Gas Works Park in Seattle. Gas Works Park is a former Seattle Gas Light Company gasification plant now turned into a park with the machinery kept intact and found right on the shore of Lake Union. There's a large hill right next to the plant with an embedded art installation from which you get an excellent view of the park and the lake. Anyway a very cool place. Afer, we ate at Julia's of Wallingford where I stereotypically had the Santa Cruz omelet. Good food, nice place, nice neighborhood.

Trick-or-Treat at MSFT by Matt SwannThis past weekend was Halloween weekend. On Halloween at Microsoft parents bring their kids around the office buildings and collect candy from those who have candy in their office. See Matt's photo of one such hallway at Microsoft. The next day Sarah and I went to two birthday parties the second of which required costume. I went as House (from the television show House) by putting on a suit jacket and carrying a cane. Sarah wore scrubs to lend cred. to my lazy costume. Oh yeah and on Sunday Sarah bought a new car.

PermalinkCommentsgas works park halloween personal sarah

Candy Vote

2008 Nov 4, 1:33Kid dresses up as voting booth for Halloween collecting candy as votes in either a McCain or Obama bag and tallies the results on CandyVote.com: "Welcome to CandyVote.com - The results are in!"PermalinkCommentshumor video politics election obama mccain voting halloween costume

portfolio - Mandy Greer

2008 Jun 19, 11:58Mandy Greer's portfolio on her website.PermalinkCommentsart mandy-greer portfolio

"Small but Mighty Wandering Pearl" on Flickr - Photo Sharing!

2008 Jun 19, 11:57I saw '"Small but Mighty Wandering Pearl", an installation by Mandy Greer' at Bumbershoot and again at the Bellevue Arts Museum with some other of Mandy Greer's work. I must resist urge to roll around on the yarn everytime.PermalinkCommentsphoto art mandy-greer bumbershoot

Candy Chang - Public Art

2008 Apr 1, 12:45Candy Chang has some cool public art pieces.PermalinkCommentscandy-chang art graffiti cultural-disobediance

best of craigslist : Survival Of The Fittest

2008 Feb 11, 7:07Whenever I get a package of plain M&Ms, I make it my duty to continue the strength and robustness of the candy as a species. To this end, I hold M&M duels.PermalinkCommentsvia:kris.kowal humor evolution candy m&m

Some Handy Commands - comm & seq

2008 Jan 13, 11:57Brief intro to comm & seq, two handy commands of which I was previously unaware.PermalinkCommentsvia:kris.kowal tool tools unix seq comm
Older Entries Creative Commons License Some rights reserved.