Windows 10 First Impressions

I have just upgraded my home machine to Windows 10.

The upgrade was horribly slow (3 evenings of waiting for updates).

So far it looks like Windows 8 with Start is Back enabled.

One minor annoyance – it disabled the powershell execution policy.

So far its a bit Meh – but that is how upgrades should be.

Simpliest Possible App Stub

This project has a ridiculously simple means of creating a stub for a web service in the cloud:

https://github.com/Mahoney/wiremock-heroku

  1. Create a heroku account (it’s free)
  2. Clone project
  3. Login to heroku
  4. Run one script
  5. Configure what the service does from a client app.

This allows the creation of a minimal web service in less than 10 minutes.

Wiremock is a stubbing web server – it sends fixed results to given patterns.

Wiremock server is a remotely configurable instance of wiremock.

Heroku is a low initial cost web hosting service.

Apple Stick Suck at Usability

The apple id system is poorly implemented.

It is possible for the apple id to be locked our because it is asking for a different account without prompting. It then requires that passwords not be reused for a year. It also has an insane complexity requirement and does not even permit the £ character to be used.

Chromecast for Business

The chromecast is the single most useful item to add to a modern conference room. Prior to this a  massive amount of time was wasted playing with cables. The simple addition of a cheap consumer gadget allows anything that can be displayed on a laptop or a phone to be transmitted to a tv screen. This is a massive time saver and will allow the development of presentations far more interesting than dusty old powerpoint.

Apple and Usability

I was always lead to believe that apple were the experts at usability.

I have now been issued with a reasonably powerful apple laptop.

When I attempted to download free tools from the appstore I was forced to create an apple id.

The registration screen had so much text that the ok buttons were scrolled off the bottom of the screen – but it had no visual clues including no scrollbar.

Entering an apple id password – it rejected the £ only after it was entered – not shown on required validations.

The # key is in the wrong place on the apple keyboard. You should not require an alt key. Have apple not heard of twitter?

There is something odd about the placement of the odd apple key – its just too close to the important characters that it alters such as XCV. At least if you use Ctrl as the shift then you get more natural finger placement.

Querying Pottermore

Here is a powershell script for finding new articles on pottermore:

Save this as pm-history.ps1:

==============================

[xml]$data = (invoke-webrequest -uri https://www.pottermore.com/sitemap.xml | select Content).content

$date = [DateTime]::Today.ToString(“yyyyMMdd”)

$data.urlset.url.loc | sort > “Pottermore$($date).csv”

$data.urlset.url.loc | % { ($_ -split “/”)[3] } | group | where Name -ne “” | sort Count -Descending | select Name,Count | Export-Csv -NoTypeInformation -Path “Pottermore_Stats_$($date).csv”

 

To use it open powershell in the directory it is in and use:

 

.\pm-history.ps1

 

Once you have more than one days data then you can easily get the difference between dates:

compare-object (gc .\Pottermore20151207.csv) (gc .\pottermore20151206.csv)

 

Documenting Azure Storage Accounts

This is the basis for azure storage account documentation:
Add-AzureAccount

try
{
Add-Type -path “.\Newtonsoft.Json.6.0.8\lib\net40\Newtonsoft.Json.dll”
Add-Type -path “.\System.Spatial.5.6.4\lib\net40\System.Spatial.dll”
Add-Type -path “.\Microsoft.Data.OData.5.6.4\lib\net40\Microsoft.Data.OData.dll”
Add-Type -path “.\Microsoft.Data.Services.Client.5.6.4\lib\net40\Microsoft.Data.Services.Client.dll”
Add-Type -path “.\WindowsAzure.Storage.6.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll”
Add-Type -path “.\Microsoft.Data.Edm.5.6.4\lib\net40\Microsoft.Data.Edm.dll”
Add-Type -path “.\WindowsAzure.Storage.6.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll”

}
catch
{
write-host $_.Exception.Message
write-host $_.Exception.LoaderExceptions
}

Get-AzureStorageAccount | % {

$accountname = $_.StorageAccountName;
$pwd = (Get-AzureStoragekey -StorageAccountName $accountname).Primary;

$connectionString = “DefaultEndpointsProtocol=https;AccountName=$($accountname);AccountKey=$($pwd)”;
$account = [Microsoft.WindowsAzure.Storage.CloudStorageAccount]::Parse(“DefaultEndpointsProtocol=https;AccountName=$($accountname);AccountKey=$($pwd)”)

$cloud = $account.CreateCloudTableClient()

$cloud.ListTables() | select @{Name=’Account’;Expression={$accountname}},Name,@{Name=’Type’;Expression={‘Table Storage’}}

$blob = $account.CreateCloudBlobClient()

$blob.ListContainers() | select @{Name=’Account’;Expression={$accountname}},Name,@{Name=’Type’;Expression={‘Blob Accounts’}}

}

Clearing a neo4j database

To completely clear a neo4j database run the following two commands:

start r=relationship(*) delete r

match a delete a

Note that these will still leave attributes in a database.

I am trying to decide between using neo4j as storage or using it as a qurery tool.

As a query tool you clean out the database and reload it before the set of queries.

As storage you need to maintain and upgrade the db.