Bookmarks from PinBoard December 26, 2020

December 26th, 2020 by Richy B. No comments »

Bookmarks I’ve added on recently

Digest powered by RSS Digest

Bookmarks from PinBoard October 24, 2020

October 24th, 2020 by Richy B. No comments »

Bookmarks I’ve added on recently

Digest powered by RSS Digest

iPhone Windows 10 Microsoft Store Firmware location

July 2nd, 2020 by Richy B. No comments »

I’ve just been trying to recover an old iPhone 5s which is stuck in recovery (DFU) mode and whilst I haven’t yet had any luck getting beyond the Apple logo yet, I hope the following information may help others.

I installed iTunes on my Windows 10 Professional machine using the Microsoft Store (which now appears to be the preferred way Apple is distributing it) and I connected it up, it saw the iPhone and downloaded the 2.9Gb firmware. I did then try a few other applications to try and fix the Apple iPhone but they needed the firmware – but where was it on my machine?

A few sites suggested checking C:\Users\<Username>\AppData\Roaming\Apple Computer\iTunes – but that path was empty for me. However, using Windows 10’s resource monitor, I soon spotted the firmware file was at C:\Users\<Username>\AppData\Local\Packages\AppleInc.iTunes_nzyj5cx40ttqa\LocalCache\Roaming\Apple Computer\iTunes\iPhone Software Updates\iPhone_4.0_64bit_12.4.7_16G192_Restore.ipsw

I suspect the name of the “Package” may differ between iTunes versions, but that should help guide you to the iPhone IPSW firmware file (which I could have also downloaded from – but “guessing” that URL might have been tricky).

PHP SplFileInfo string values

April 7th, 2020 by Richy B. No comments »

Whilst PHP’s documentation of SplFileInfo isn’t “bad” as such, it can be tricky to remember what string functions (such as getBasename, getExtension, getFilename, getPath, getPathname, getRealPath and __toString) return under which circumstances. Hence this post!

To generate this data, we’re going to start off with a RecursiveDirectoryIterator with an optional callback filter (to enable us to later on, filter the returned values):

$directoryIterator=new \RecursiveDirectoryIterator(
            '/var/task', // test directory
            \RecursiveDirectoryIterator::SKIP_DOTS // ignore "dot files"
        $filterIterator = new \CallbackFilterIterator(
            new \RecursiveIteratorIterator($directoryIterator), 
            function (\SplFileInfo $file) {
           // add filter conditions here
            return true;
        /** @var \SplFileInfo $fileInfo */
        foreach ($filterIterator as $fileInfo) {
            $objectNames= [
            ]; // which objects (defined above) are we interested in
          $methods = [
            ]; // which methods of those objects do we want to get. 
           foreach ($objectNames as $objectName) {
               foreach ($methods as $method) {
                    print $objectName . '->' .
                        $method . ' = ' .
                        call_user_func([$$objectName, $method]) .
           die(); // we only want the first one as an example

Give the file /var/task/assets/fonts/montserrat-v14-latin-700.eot and the “start” directory of /var/task , we get the following:

  • fileInfo->getBasename = montserrat-v14-latin-700.eot
  • fileInfo->getExtension = eot
  • fileInfo->getFilename = montserrat-v14-latin-700.eot
  • fileInfo->getPath = /var/task/assets/fonts
  • fileInfo->getPathname = /var/task/assets/fonts/montserrat-v14-latin-700.eot
  • fileInfo->getRealPath = /var/task/assets/fonts/montserrat-v14-latin-700.eot
  • fileInfo->__toString = /var/task/assets/fonts/montserrat-v14-latin-700.eot
  • directoryIterator->getBasename = assets
  • directoryIterator->getExtension =
  • directoryIterator->getFilename = assets
  • directoryIterator->getPath = /var/task
  • directoryIterator->getPathname = /var/task/assets
  • directoryIterator->getRealPath = /var/task/assets
  • directoryIterator->__toString = assets
  • filterIterator->getBasename = montserrat-v14-latin-700.eot
  • filterIterator->getExtension = eot
  • filterIterator->getFilename = montserrat-v14-latin-700.eot
  • filterIterator->getPath = /var/task/assets/fonts
  • filterIterator->getPathname = /var/task/assets/fonts/montserrat-v14-latin-700.eot
  • filterIterator->getRealPath = /var/task/assets/fonts/montserrat-v14-latin-700.eot
  • filterIterator->__toString = montserrat-v14-latin-700.eot

Hope it’s useful to someone!

Windows 10 OpenSSH – Configuring Windows Git

August 24th, 2019 by Richy B. No comments »

This article is the last of a series I’ve written about migrating from using PuTTy on Windows to using the native OpenSSH client now available on Windows 10: you can read the rest of the articles via:

  1. Installation
  2. Storing keys using the SSH Agent
  3. Importing existing keys
  4. Creating a new public/private key pair
  5. Other useful OpenSSH commands
  6. Configuring Windows Git < You are here

If you are using Git for Windows and had previously been using PuTTy, you need to make a small tweak to the configuration for Git to use Windows 10’s OpenSSH client.

If you’ve been getting an error like:

FATAL ERROR: Disconnected: No supported authentication methods available (server sent: publickey)
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

when running git clone, but a test such as ssh works, then you need to do the following steps.

  1. (Perhaps optional): Uninstall Git if you already have it installed. In theory, this can be done from Window’s “Add or Remove Programs”, but this was playing up for me. If you go into C:\Program Files\Git there should be a unins000.exe executable which will remove Git for you
  2. Install the latest version of Git (I actually uninstalled version and installed and during the setup, you’ll be prompt “Choosing the SSH executable”.
  3. Select “Use (Tortoise)Plink“, but enter in the path to Window’s OpenSSH SSH client: “c:\windows\system32\openssh\ssh.exeSelect (Tortoise)Plink and provide the path c:\windows\system32\openssh\ssh.exe to the Git setup
  4. Open a fresh PowerShell window and cloning should work!
    You might get a warning such as “warning: agent returned different signature type ssh-rsa (expected rsa-sha2-512)”, but that’s caused by a mismatch of keys and key types probably from the conversion from PuTTy keys. Generating a new public/private key pair and uploading that public key to Github/Bitbucket will fix that.
%d bloggers like this: