Monday, May 9, 2011
Friday, February 4, 2011
PowerShell; download, parse, extract
Wrote my first powershell script and it finally clicked how it all ties together, and why I should spend a bit more time learning it. Generally when I need to do something quick and dirty I’ll fire up VS and create a console project or write a *.vbs script. Not anymore got a bit of love now for powershell just need to do it to “get it”.
Basically I wanted to download a webpage, parse it using a regex, then extract the named groups from the multiple matches, and finally output to a tab delimited text file. As I could not find a complete script that worked, I’m putting this one up, for others and for personal storage (as I’m likely to forget after the weekend).
$wc = New-Object System.Net.WebClient
$wc.Encoding = [System.Text.Encoding]::UTF8
$pagetext = $wc.DownloadString("http://www.cro.ie/ena/forms_s_se.aspx")
$matches = $pagetext | select-string -pattern "<strong>(?<form>.*?)</strong>(?<desc>.*?)</p>" -allmatches | %{$_.matches }
$extractedtext = $matches | %{ $_.groups['form'].value.trim() + "`t" + $_.groups['desc'].value.trim()}
add-content formtypes.txt $extractedtext
Friday, October 22, 2010
London .Net User Group: Open Mike Night
On Wednesday 20th October 2010 in organise an London .Net User Group (LDNUG) Open Mike Night.
Open Mike Night is a night to introduce new speakers to the community. Over the last year we have noticed not many new speakers coming through the ranks in LDNUG, this has been our own fault for not creating the arena for them to take to the stage.
There was 5 talks 10-15 minutes long on any topic related to been a developer. They all did very well, I know it is not easy as I was there once, my first talk was also a LDNUG 10 minute talk. So I wish them well on their journey and hope to see them presenting longer talks at bigger events!
Thanks you everyone for coming and making such an great night. I hope to see you at the next events and if you have any suggestions or questions please don’t hesitate to contact me.
Speaker details:
Talk: "Three years of running a Tiny software company.. All my mistakes.."
Name: James Knowles
Email: james@unwindsoftware.com
Twitter: http://twitter.com/unwindsoftware
Linkedin: http://uk.linkedin.com/in/unwindsoftware
Blog/website: http://blog.unwindsoftware.com/
Slide/code links: http://www.unwindsoftware.com/presentations/Three-years-of-running-a-Tiny-software-company.pptx
Talk: "Introduction to Sass"
Name: Garry Shutler
Email: garry@robustsoftware.co.uk
Twitter: http://twitter.com/gshutler
Linkedin: http://uk.linkedin.com/pub/garry-shutler/13/896/a98
Blog/website: http://www.robustsoftware.co.uk/
Slides: http://bit.ly/ldnugsassslides
Images: http://bit.ly/ldnugsassimages
Talk: "Pair programming, the good, the bad and the ugly"
Name: Sara Stephens
Email: sara@sarastephens.com
Twitter: http://twitter.com/developerdame
Linkedin: http://uk.linkedin.com/in/sarajstephens
Blog/website: http://www.developerdame.com/
Slide/code links: watch the blog
Talk: "Pair programming, the good, the bad and the ugly"
Name: Rachel Laycock
Email: rachellaycock@googlemail.com
Twitter: http://twitter.com/rachellaycock
Linkedin: http://uk.linkedin.com/in/rachellaycock
Blog/website: http://www.rachellaycock.com/
Slide/code links: watch the blog
Talk: "HTML5 basics"
Name: Robin Minto
Email: robin@minto.co.uk
Twitter: http://twitter.com/robinem
Linkedin: http://uk.linkedin.com/pub/robin-minto/22/496/799
Blog/website: http://robinminto.com/blog/
Slide/code links: http://robinminto.com/blog/2010/10/22/html5-basics-presentation/
Talk: "Cross platform mobile app development"
Name: Matt Lacey
Email: matt@mrlacey.co.uk
Twitter: http://twitter.com/mrlacey
Linkedin: http://uk.linkedin.com/in/mrlacey
Blog/website: http://blog.mrlacey.co.uk/
Slide/code links: http://blog.mrlacey.co.uk/2010/10/phonegap-at-ldnug.html
Main code is from www.phonegap.com
WP7 version is currently at www.github.com/mrlacey/phonegap-wp7
Next LDNUG Events:
Thursday 4th November 2010
Mads Torgersen from Microsoft will talk about C# 5. We will probably be the first people in Europe to present on it.
http://skillsmatter.com/event/open-source-dot-net/c-sharp-5
Thursday 18th November 2010
Sarah Taraporewalla (http://sarahtaraporewalla.com/) on Integration Points
This is still been organised so watch the mailing list for details
Other Events:
Saturday 22nd 2010
DeveloperDeveloperDeveloper! These FREE one day events build on the success of the previous DeveloperDeveloperDeveloper Days. As before, it is all about developers learning, sharing and interacting with each other in an informal and relaxed atmosphere.
http://developerdeveloperdeveloper.com/ddd8a/
Tuesday 26th October 2010
OpenSpaceBeers are a one hour open-space, organized in a pub, with an open bar, for all the creative juices of the IT community to come and reflect on their own practices.
http://openspacebeers.eventbrite.com/
If you could vote for Michelle Flynn as a way for thanking her for venue and beer that would be awesome. http://www.computerweekly.com/Articles/2010/10/20/243307/Vote-in-the-Computer-Weekly-IT-Blog-Awards-2010.htm
Thursday, February 4, 2010
DDD8: Introduction to Mono slides
Here are my slides from my talk at DDD8. Just like to say thank you to all who came, I know it was due to the John Skeet room been full :). Thanks for all the great questions, I really enjoy giving the talk this time, as last year I was terrified and don’t remember talking.
Friday, July 17, 2009
Visual Studio Fonts and Colours
I got tired of the colours in VS2008 so asked on twitter if anyone has some themes. Got a good response of links to themes.
Here are the main links I was sent:
Scot Hanselman’s Blog
http://www.hanselman.com/blog/VisualStudioProgrammerThemesGallery.aspx
Iain Holder’s Blog
http://tech-nous.blogspot.com/2008/10/visual-studio-2008-colour-schemes.html
Is your IDE Hot or Not
http://idehotornot.ning.com/
Mohamed Meligy
http://geekswithblogs.net/Mohamed/archive/2007/08/20/Dark-Visual-Studio-With-Resharper---My-VS-Settings-Colors.aspx
If you use ReSharper the normal settings people export don’t work correctly and you will have to do a lot of customisations yourself.
I based mine on Mohamed’s one and have done some changes, especially to XML and HTML views. I have found it much easier on my eyes and really enjoy it. So I thought I would share it with the interwebs.
Please remember these Fonts and Colours are for VS2008 + R#
Tools | Import and Export Settings | Import selected environment settings | Yes, save my current settings | Browse |VS2008R#Dark-FontsColours.vssettings | make sure it is importing Fonts and Colours only | Finish | Enjoy
Let me know if you like them.
Saturday, January 10, 2009
Windows 7 beta
After spending half a day fighting with MSDN subscriber downloads on the day of release on Thursday, anyone can now download it from http://www.microsoft.com/windows/windows-7/beta-ownload.aspx and give it a try. I of course had to test it out, see if the companies software I write installs and works on it ;). I fired up Windows 7 x86 in a Virtual Machine, I currently use VirtualBox which I think rocks ! about 35 minutes later it was done, install perfectly worked right off the bat. Runs a lot better than the Vista VMs I have and the only tweaking I had to do was use the Compatibility Troubleshooter to install the Guest Additions, but that was it.
Feeling confident with the new operating system I wipe my Dell XPS M1730 laptop and installed Window 7 x64 replacing my current Vista x64. It installed quickly ran and with no problems, only had to install the latest Nvidia drivers to get better resolutions, but then I had to do that on Vista too. You can pick Laptop Nvidia driver direct from Nvidia now and not the rarely update ones by laptop vendors. The rest of the hardware which was unknown after install was picked up by Windows update which was the Creative inbuilt laptop camera and the Ricoh Memory card reader. Been x64 bit I was a bit worried as Vista x64 half a year ago took me ages to get everything running and I really had to hunt around for the drivers, Windows 7 x64 just worked, nice.
It runs really well, it is slicker and snappier than Vista, it looks very much like Vista but the changes have made a huge difference. For a beta it is bloody good, well done Microsoft. Now to finish installing the useful software as TweetDeck won’t get any of my work done.
Tuesday, November 25, 2008
DDD7: How to develop .Net on Linux using Ubuntu distro
Wow, my first time presenting and a lot of panicking. I hope those who came enjoyed it, and now feel the world of Linux is a less scary place for us .Net developers.
Here is my presentation:
Every DDD session this year has been filmed; so if you missed it watch the DDD site for the video. Please also submit your feedback.
I will be doing a few posts on setting up Ubuntu and adding some addition content which I didn't have time to demonstrate.