Two button shutdown for Surface Pro

Just had severe issues getting my Surface Pro 3 to boot into windows. It got stuck on the Surface splash and didn’t budge from there. Tried forcing it to shut down by holding down the power-button and restarting, but didn’t help. What did help was to do a two button shutdown, which I didn’t realize was a thing…

  1. Press and hold the power button for 30 seconds.
  2. Press and hold the volume up button and the power button for at least 15 seconds.
  3. Wait 10 seconds
  4. Press the power button normally, and hope it boots properly this time…

Step #2 seems to be the key, and ignore any sort of screen flashes or such while you hold the buttons down.

Also, by the way, if you simply hold the volume up button down and press the power button normally, you will get a boot menu, which I also didn’t know about until today…

Source: Surface turns on, but Windows won’t start

PHP: Authorization header missing on Apache

I’m using a simple PHP cross-domain-proxy to be able to do some Javascript requests towards an API on a different domain. Worked great, until I needed to do basic authentication. I set the appropriate header to be passed through, 'Authorization': 'Basic ' + btoa(username+':'+password), but in the proxy script, that header had vanished.

Turns out it was Apache stripping it away. Don’t know if it’s because of security or because Apache thinks that, hey, I’m the one dealing with this stuff so no point sending it to the script. Anyways, seems you can get it back by doing the following in an .htaccess file:

RewriteEngine On
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]

Now the header is passed through to the API successfully and I’m no longer getting 401 Unauthorized back :)

Limit OneDrive bandwidth hogging

  1. Open Local Group Policy Editor.
  2. Go to User Configuration / Windows Settings / Policy-based QoS.
  3. Right-click and hit Create new policy.
  4. Set DSCP Value to 1 and/or Outbound Throttle Rate to something appropriate.
  5. Set QoS policy to apply to applications with executable name onedrive.exe (or skydrive.exe, check your process list).
  6. Reboot, perhaps.

Note sure if it’s actually working though…

With a hint of Social Ineptitude