## Starting mRemote with a new config file path

Posted by on Aug 5, 2015 in Other

I love mRemote as a means of managing my RDP sessions but do find it somewhat flaky regarding the connection file. I’ve had connection files become corrupt on a number of occasions (hint: back up this file now if you haven’t already and get in the habit of backing it up every time you change it!) and recently it bombed out for a different reason. As I use OneDrive more and more for storing my cloud data I restructured some of my folders without considering the implication of the apps that rely on those files. mRemote was one of those and the config file was moved from its original directory in to a sub-directory. This caused the rather hostile situation of a start-up error: The startup connection file could not be loaded. C:\Users\Lee\AppData\Roaming\mRemoteNG\confCons.xml Input string was not in a correct format. In order to prevent data loss, mRemoteNG will now exit. And there was no option to start with a blank connection file or just load the UI and let me locate the file. Not a great user experience. Turns out the solution is quite simple though – the config file can be passed as a command line argument and starting the app this way fixed the issue “permanently”: “C:\Program Files (x86)\mRemoteNG\mRemoteNG.exe” /c:”C:\OneDrive\path\to\config.xml”...

## Windows Server 2008 Hyper-v server stuck at ‘starting windows’

Posted by on Jun 21, 2015 in Other

I recently had an issue with a virtual machine I created in Hyper-V stuck at the ‘starting windows’ screen. It wouldn’t even boot the installer – it simply hung after the loading files prompt at the ‘starting windows’ prompt. It turns out the solution was really simple. When I created the virtual machine, I selected Gen2 as the version. This only works for Windows Server 2012 or later, so I went in to the virtual machine settings an disabled Secure boot. This got me past the secure boot failure I was seeing previously, but it appears 2008 and Gen2 virtual machines do not play ball at all. The solution was simply to delete the virtual machine, create a new Gen 1 machine and everything worked as you would...

## POST file (and form data) using Fiddler

Posted by on Jun 16, 2015 in JavaScript, Other

## Enable high resolutions in Linux VM’s

Posted by on Feb 15, 2015 in Other

Something of a n00b post here, but I recently spun up an instance of the rather nice Elementary OS Linux distro and as is common with Linux, especially in a VM, the display mode was set to something horribly low that consumed a fraction of my screen. Thus, time to crack open the terminal and fix the problem: sudo nano /etc/default/grub 1 sudo nano /etc/default/grub Inside the editor change: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash” 1 GRUB_CMDLINE_LINUX_DEFAULT="quiet splash” To: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash video=hyperv_fb:1920x1080" 1 GRUB_CMDLINE_LINUX_DEFAULT="quiet splash video=hyperv_fb:1920x1080" Obviously substitute 1920×1080 for your preferred resolution. Save the file in nano and restart the VM. You should find that the VM restarts at your chosen...

## Unable to install Rails on clean Ruby

Posted by on Jan 7, 2015 in Other

I recently set up a clean install of Ruby and wanted to add rails using the usual command line: gem install rails 1 gem install rails However, doing so generates an error relating to the SSL certificate of the RubyGems server: ERROR: Could not find a valid gem 'rails' (>= 0), here is why: Unable to download data from https://rubygems.org/ - SSL_connect retur ned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed ( https://api.rubygems.org/latest_specs.4.8.gz) 1234 ERROR:  Could not find a valid gem 'rails' (>= 0), here is why:          Unable to download data from https://rubygems.org/ - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://api.rubygems.org/latest_specs.4.8.gz) it appears that there is a (fairly longstanding) issue with the SSL certificate which prevents the download happening. Thankfully, the fix for this is very simple. As it’s the official RubyGems repository, one can simply add the URL without the secure prefix as follows: gem sources -a http://rubygems.org 1 gem sources -a http://rubygems.org You’ll get a warning that this URL isn’t secure, just accept that by hitting ‘y’ and then repeat the install command: gem install rails 1 gem install rails It should now install just fine. I wouldn’t recommend this for other sources, but for the official RubyGems repository and given the limited risk of man-in-the-middle attacks, this should suffice as a...

Pushing from GIT to Heroku I recently attempted to publish a small node.js application from my local machine under source control using git, to Heroku (http://www.heroku.com). While this should have been as simple as entering: git push heroku master 1 git push heroku master I was met with the error: Permission denied (publikey) fatal: Could not read from remote repository. Public key issues are never good Public key issues are never good – even less so when the error message is prefixed with ‘fatal’ 😉 The error message seemed quite clear and explicit – it seems that my local public key didn’t match that on Heroku and thus I could not authenticate. To resolve this I deleted the existing public key in my .ssh folder (located at c:\users\\.ssh\ and generated a new one. From a command prompt: cd c:\program files (x86)\git\bin ssh-keygen.exe 12 cd c:\program files (x86)\git\binssh-keygen.exe when prompted for the path I put in the path to the .ssh folder as follows: Enter the file in which to save the key: c:\users\lee\.ssh\id_rsa I left the password blank as this is a private machine and I’m too lazy to re-enter the pass-phrase every session. This generated a new key for me. Adding to the local key store From there I needed to add the key into the local git keystore. This is needed to ensure that both Git and eventually Heroku, are using the exact same key. To accomplish this open up a bash shell (after you’ve installed git for windows you can right click any folder and select ‘Git Bash’) and enter: $eval ssh-agent -s$ ssh-add 12 $eval ssh-agent -s$ ssh-add note the back-tick (above the tab key!) not apostrophe’s and also notice the eval statement. ssh-agent alone will not work Assuming you didn’t rename your key when generating (id_rsa), ssh-add will look for the default key name in the default key path. If you did change the file name you’ll need to pass this in as a parameter. If it worked, you should be prompted with: Identity added: /c/Users/lee/.ssh/id_rsa Sync the keys with Heroku Now you have a brand new key added into your local git you can start migrating this to Heroku. If you have no other keys in Heroku, run the following commands from a command prompt: heroku restart heroku keys:clear heroku keys:add 123 heroku restartheroku keys:clearheroku keys:add Assuming all went well and the output of the last step was: Uploading SSH public key …done then you should be good to go. Executing heroku:keys 1 heroku:keys should show your newly created and uploaded key. Ready, set, go! Finally, git push herku master 1 git push herku master should now succeed and you’re good to...