Tuesday, 25 August 2015

Inception computers

So I managed to get the remote desktop connection working to my work computer. Unfortunately as you can see, that required a few layers. At the bottom of the screen is my Debian taskbar, then running within virtualbox is the windows install on the other partition of this computer. Then within that is an RDP connection to my work computer at the office.

Probably the most impressive thing about this whole setup is how good the performance was. It felt like I would still be able to use it for doing actual work.

I am in the process of finding an alternative that will run natively within my Linux install and I have found this program http://remmina.org/ that will do RDP through a TS Gateway which is causing my headaches. Unfortunately the ppa I found for it is only for newer versions of Ubuntu than the version of Debian I am using. So I can either compile from scratch and probably have to sort out a whole lot of dependencies. Or I can update in place this install of Debian I am using now. Or I move to a distro with rolling updates like Gentoo which I was going to use but then needed a working install far to quickly.

I'll let you know what I end up doing. And particularly if it is a bit interesting I will do a writeup on it. If anybody has a suggestion as to how I should proceed let me know what you think and why.


Friday, 21 August 2015

Clean and Fresh

So recently I ordered some shaving soap because after a perfunctory look around town I couldn't find anyone who sold it. So while waiting for the train I came across http://sharpologist.com/ which at least sounds like they know what they're talking about. They made a recommendation of this http://www.amazon.com/gp/product/B00914G5LE soap (from a different supplier but they wouldn't ship to me.

It arrived yesterday and I got to use it for the first time this morning; and like when I started using the razor it has made a huge difference in the feel and how nice shaving is. I played around with it a little and seemed to get results that are worlds away from what I was getting before.

I plan to do a followup in about a month or so and see how I'm going with this and the razor. Unless I buy something else different again.

Any comments, queries are welcome.


Wednesday, 12 August 2015

Code Today: Create a kml file with VBA

Hi, another nerdy post today. The other day I came across some code I had written that generates a .kml file that points to a street address. It is a little kludgy but it has worked for the last few years. First I will show the code, explain it, then I'll talk about what I'd do differently if I were to do it now.

Sub Create_kml()
    Dim Name, Details, Address As String
    'Get job details into RAM
    Name = Range("Q3") & Range("R3")
    Details = Range("M3")
    Address = Range("K4")
    'Open kml file
    Dim fso, tf
    Set fso = CreateObject("Scripting.FileSystemObject")
    Set tf = fso.CreateTextFile("File Location" & Name & ".kml", True)
    'Write actual kml file
    tf.Writeline ("<?xml version=""1.0"" encoding=""UTF-8""?>")
    tf.Writeline ("<kml xmlns=""http://www.opengis.net/kml/2.2"" xmlns:gx=""http://www.google.com/kml/ext/2.2"" xmlns:kml=""http://www.opengis.net/kml/2.2"" xmlns:atom=""http://www.w3.org/2005/Atom"">")
    tf.Writeline ("<Document>")
    tf.Writeline ("    <Placemark>")
    tf.Writeline ("        <name>" & Name & "</name>")
    tf.Writeline ("        <description>" & Details & "</description>")
    tf.Writeline ("        <address>" & Address & "</address>")
    tf.Writeline ("        <styleUrl>#m_ylw-pushpin</styleUrl>")
    tf.Writeline ("    </Placemark>")
    tf.Writeline ("</Document>")
    tf.Writeline ("</kml>")
    'Clear buffer and finalise file
End Sub

So I may have to look into better ways of displaying code in Blogger. But I think you get the gist of this. The Name variable is used for the name of the waypoint in the kml. The Details variable is used for the description of the waypoint and the address is the street address for the pin to get put on. Looking at it you can probably omit the fso object as it is only used once so you would just have a longer command to set the text file object.

The tf object is created with a specified file. Then writing it is just a case of pushing lines to it. The only way I know of to use a template for writing a file like this is by coding it in place like this.

The biggest thing I would do differently knowing what I know now is that rather than hard coding the locations to get the variables (Name, Details & Address) from. I would pass them to the sub(or write it as a function) so I can copy the code and re-use it without any modification.

Any questions or comments are appreciated.

I hope this helps someone with a project somewhere along the line.


Wednesday, 5 August 2015

Disable Animation in Microsoft Excel 2013

A bit of a nerdy post today.

So I recently got a new computer at work. Along with the new hardware and the performance that comes with it I got a copy of Microsoft office 2013. This is taking some getting used to. However there are a few little niggles that have been bothering me.

One of these that I have been able to fix is the animation within Excel. I'm not quite sure why this has been set up but it is easy enough to fix. Continue past the break to see how to fix this "feature"