Roy Ashbrook

let go or be dragged
posts - 197, comments - 29, trackbacks - 8

March 2013 Entries

passing csv to sql is still bad

so about… oh… 5 years ago, I posted this blog entry: http://www.drowningintechnicaldebt.com/RoyAshbrook/archive/2007/03/09/passing-csv-to-sql-is-bad-mmkay.aspx I recently needed to do something where I was passing in something like a csv to a sql proc and was reminded of it, so I looked it up. I noticed that I really didn’t have a good code sample on the old blog. I happened to notice a similar question on stackoverflow from 2010: http://stackoverflow.com/questions/2312581/comma-delimited-sql-string-need-to-separated/15668344#15668344 So, I thought now would be a good time to post an updated code sample of this. Below is a method of simply passing a string to check...

posted @ Wednesday, March 27, 2013 5:13 PM | Feedback (0) |

Fit Window for All Pages Visio macro (FWAP!)

I have been editing a *lot* of Visio diagrams recently. One of the issues I have with a lengthy session of Visio editing is the documents all get kind of wonky sometime because I have zoomed a ton or something. This isn’t a big deal but if I want to screen share and blow through the slides really quick to review it’s a pain. Here’s a macro to fit each visio window to page. I call it FWAP (Fit Window for All Pages) =). Sub FWAP() Dim OriginalPage As Visio.Page Set OriginalPage =...

posted @ Friday, March 22, 2013 2:03 PM | Feedback (0) |

Minecraft Password Recovery from lastlogin file

A few months ago my kids and I started up another round of playing Minecraft. The only issue was my daughter had forgotten her password and she lost the password to the email she registered it on and she couldn’t remember her questions etc to recover the password. So as I was looking for ways to recover her password I came across a way to recover it from the lastlogin file used by Minecraft if you check the ‘save password’ box, which she had done fortunately months previously when she last played. I used the Java code below and...

posted @ Wednesday, March 20, 2013 11:28 AM | Feedback (0) | Filed Under [ DEV ]

I’m looking at you Comcast!

So we just moved and setup new internet. We are using Comcast for our internet here as we were at the last place. We got 30MB speed, but we were assured on the phone that they were upgrading the 30MB connections to 50MB on 4/1 for no charge to any of the customers. This was in response to our lamenting there being no package realistically priced between 30MB and 105MB. It’s pretty fast so far. I took about 5 different samples from speedtest.net and they were all about the same. Here’s one of them: I’ll have...

posted @ Wednesday, March 13, 2013 10:35 AM | Feedback (0) |

SimpleSniffer Updated to 1.0.0.2 (stable)

So I updated SimpleSniffer with what I learned from all of my playing about lately. It seems quite fast to me. I have updated the latest release as ‘stable’ on CodePlex. 12 whole downloads so far, so maybe it helped someone else =P

posted @ Tuesday, March 12, 2013 4:42 PM | Feedback (0) |

Bitshift operator vs .Net Libraries (and False Advertisement regarding Performance)

Recently I have written a few blog entries about basic sniffer code. One of the most basic things that a sniffer has to do is gather packets and break out some data. My sniffers were all very simple, really only dealing with analyzing the packet headers themselves for IP and TCP headers. Within the headers there were a few values that I was concerned with that were multi-byte values. I have already written about this in my last blog post, but I thought I would post about something I noticed that really impacts the crazy problem of early optimization. ...

posted @ Monday, March 11, 2013 3:32 PM | Feedback (0) |

How to write a basic sniffer in PowerShell

  So I recently wrote a little sniffer in C# and decided I wanted to convert it to PowerShell. I ran into a little weirdness with the way that the bitwise operators worked in PowerShell. But before I talk about that let me describe the two ways to port your C# app to PowerShell. Just include the .NET code and call it Actually write it in PowerShell Method 1 So #1 was very easy. Basically you just add the c# code as a type and then you can...

posted @ Friday, March 8, 2013 4:44 PM | Feedback (0) |

Powered by: