RSS feed for blog Linkin Skype Mail Me Twitter

Stickfight

Blog Category: status

Remote Desktop while away

In a few weeks I pop off on my first holiday for 2 years, for this trip I really do not want to take my laptop, this would seem odd as the darn things have been practically glued to me for the last 20 Years, but:

  1. Time to learn to take a break.
  2. As a Member of LDCVia I need to learn to know when to share the work, and how to hand over.1
  3. Errr… welll… There are now countries that were once thought to be friendly, that have now shown a distressing habit of being hostile at their borders and now want to take your clients private data away and look at it for “Reasons” and I figured this would be a great dry run for having to travel to such a country again.

But I’m not insane, nor can I leave my clients, sooo I needed to retain access in some way so that I can support as and when it is needed. someone sort of cloud desktop that I can reach from a cheap laptop or tablet seemed like an obvious answer.

Requirements

  1. It must be able to run a form of VMWARE as each of my clients has to their own separate VM machine(s) with separate security.
  2. It must support Android (large and small screen) and Linux as clients.
  3. Must not cost a bleeding fortune.

Contenders

AMAZON Workspaces: This looked a perfect fit to start with and I use AWS for lots of other services including this blog, but the setup was a right faff was slow and cumbersome and then I realised that it would not allow VMWARE or any virtualisation, undaunted I though I would at least check out the performance, only discover that despite stating “just connects from anything” it only meant large android screens (not my phone) and not from Linux at All.. so in the bin it went.(shame really)

VMWARE Remote Console: Wince!!..I have to own to a bit of paranoia here my self, direct access to the Clients VM’s is just too much of a risk from external, it just stops there. sorry VMWARE, I tried to mentally run through the conversation explaining my actions to clients, and none of them went well.

I started to look at Citrix then got a grip and thought, “OH COME ON” its just one machine. Just get another machine load your VM’s on it and get a good secure remote client… cue another 30 mins wasted looking at online hosting and then a small local server and more swearing comes from the office as I realise “JUST USE YOUR BLOODY LAPTOP YOU TWIT YOU WON’T HAVE IT WITH YOU”…. fsss.

So it just comes down to a good remote connection software

The 3 that stood out were:

Logmein : From my point of view easy to discount as it does not support Linux guests but would have been discarded anyway as it has a small company feel which you again make it a difficult sell to clients

Team Viewer : Used by many of my clients and supports a lot of nice security features, but a bit on the pricey side.

VNC Connect : I was attracted to this as I use the free version for my Raspberry Pi’s, I also like the VNC standard and it has been security hardened by many a grumpy sys admin and dev over the years, the VNC Connect platform provided by Real VNC ticks all the boxes.

I was actually hard pressed to pick between Team Viewer and VNC Connect, on paper they provided all the features/platforms and security that I could want, but in the end VNC Connect won though partly because of price (its is £422 a year vs £384) but mainly the fact that the android viewer on team studio does not support the use of a mouse via Android.3

Security

OK, lets get the elephant in the room out of the way, how are we handling security.

Well VNC Connect is nicely paranoid about security so to get to my laptop now requires 2 logons both different 12 digit ones (1 to login to VNC Connect and 1 to get to my laptop ) then each VM is encrypted and requests a login appropriate to the OS used, then of course the normal password for each client to connect via VPN/Programs etc etc.

I ran that though potential questions via any of my clients and it came out OK.

Phyisical Setup

I have attempted to do this kind of thing before and obviously used remote software all of my career, and thus have sworn at my fair share of thin clients, phones, and tablets

Requirements

  1. Lighter than just taking my laptop
  2. Resolution of a decent Screen
  3. Good keyboard
  4. Good mouse
  5. Either not a silly price or very reusable.

I looked at Chrome books but frankly all in the price range were poo, Microsoft surface laptops were too expensive and I’m not in the IOS ecosystem, So an Android Tablet it is, that meant a Nexus or Pixel as few of the other vendors keep the security patches up to date, thankfully the Pixel C was on special offer (most likely due to being replace in the next month or so) that meant I could get a good tablet with a great screen and a very pleasant keyboard, paired with the new Logitech tracker ball I had something that was very usable thank you.


RemoteDesktop01.png

Testing

So I did 2 basic tests, performance and usability

Performance: I connected my laptop to a VPN in Japan, then tethered the tablet to my phone, then connected via the remote and sat down to work, it was totally usable , there was that slight lag on the mouse you get on any remoting software but no more than I get when I VPN into any clients network, and that was going to be the real test, using a VM via another VPN while remoting to the host PC, here I have to say I cheated like a devil, as my laptop is in the comms room of the office where it has access to the AWESOME least line we use (and is physically secure), so in fact it was actually faster and more responsive than normal, which was a more than pleasant surprise

Usability: Not bad, not perfect but not bad, it worked as well as any remote program, with a couple of extra qwerks, it does not re-size the client desktop as it is a genuine KVM rather than creating a new session, which is both good and bad and easy to work around, the other qwerk I’m still working on, is that the top and bottom bars for the Real VNC client triggers very easily and they don’t always retract cleanly without an extra click, I would like it if you could allocate a special gesture to the client to stop it working in modal form, the same as VMWARE client, perhaps a 3 finger swipe from the top or something like that

Conclusion

OK, I have been doing dry runs of leaving my laptop in the office and just taking the tablet and mouse home at night then working on that and I have to say I am now comfortable just going to Japan without the laptop, this setup works…. wish me luck.. :p


  1. I get told off about this about once a month. 

  2. They do do a cheaper version but I wanted the higher level encryption. 

  3. But I do have to give the Team viewer client credit for handling screen render better than VNC it would have been nice to get the best of both worlds, and I hope VNC improves on that front. 

New Logitech TrackBall

I moved to a trackball instead of a mouse about 22 years ago when I got a twinge of RSI in my shoulder and the best one on the market at the time was the Logitech ps2 Marble TrackMan, since then I have upgraded with each new model resulting in the current M570, a week ago on an off chance and needing a blue tooth trackball I checked the Logitech site, squeeking with surprise I saw the new MX Ergo trackball was just out

A few days later it arrives in my sweaty hands and I discover that someone at Logitech seems to be a mind reader and has added just about everything I wanted. So this review is going to be a bit unbalanced but I will try to point out the good and the bad.,

Good

  • Lots more grip: the M570 had 4 little rubber feet that had a habit of coming off and disappearing into the ether, meaning the mouse would rock slightly until you replaced them, the MX Ergo has a solid rubber foot that nearly glues you to any surface with NO sliding.
  • Multi-Multi connection: the MX ergo uses both Bluetooth and the Logitech Unified Receiver as well as supporting 2 devices swappable with a button click, this means I can swap between my laptop and tablet very easily and with no messing around to re-pair, it is JUST want I wanted and works flawlessly.
  • Easy precision switch: there is another little button that swaps between fast and high precision mode, another feature I have wanted and expect to come in useful.

Bad

  • The Little devil is more than twice as heavy as the M570, which is both good and bad, good in that it feels far more solid to use, bad as in I carry the sod around all the time.
  • Fragile: now I don’t actually think it actually IS any more fragile, but as it feels more complicated I think it could get grubby pretty quick and the base plate would fall off in my bag
  • Expensive: An extra £30~ over the M570 + £20 for the case I feel I needed, makes this a pricy old mouse.


MXErgo02.png

Size and Feel is nearly identical to the M570 (which just shows they got it right the first time) with the addition of the 2 position rocker (Hand flat and hand at 20°)


MXErgo04.png

The underneath of the MX Ergo vs one of my well-worn M570’s you can see the solid foot and absence of battery hatch, the MX Ergo just recharges via USB meaning I no longer have to carry around any spare batteries.


MXErgo03.png

The detachable foot, with sticks on the MX Ergo with 2 magnets, cant say I’m in love with the solution and would like the option to leave it off but there is no denying that it sticks on well and gives both weight and stability.


MXErgo01.png

Given the cost, less rugged nature and “waiting to fall off” base, the investment of a case seemed a prudent Idea I went with a Hard Travel Case by co2CREA

Conculstion

I love this mouse, I REALLY love this mouse, yes it costs more than its predecessor, yes you cant just bung it in your laptop bag anymore, but to use and in particular to use on different platforms, it is just a pleasure, comfortable, responsive and smooth…… Happy Sigh

Unlimited Test Email Addresses

A silly tip that has saved me tons of hours and make clients happy is having an Email domain that has “catch-all” routing on it.

Basically this is having a domain that any address that you use with it automatically routes to a central email address, mine is the “energywins.co.uk” domain, anything you send to that domain ends up at my main address, be it “clientTest1@energywins.co.uk” or “fakeUser200@energywins.co.uk”, this did not used to be that useful when all apps were internal, but in the world of cloud apps and PARTICULARLY with the Salesforce/Pardot world that only allows an email to be registered once it is invaluable and helps you to keep clients separated (they also love to have you use emails address that are specific to them ie “MicrosoftTEST@energywins.co.uk”

This can be done easily with just about any email provider, but I use Gmail for domains as it is easy, fast and cheap1.

Strangely the Gmail for Domain instructions keep changing, are oddly poor for Google and the setting is buried REALLY deep which I assume means they don’t really want you to do it. so if things change, just search for “Gmail Catch All” in the meantime:

  • From your inbox, Click on the little cog on the right-hand side and select “Manage this Domain”


CatchAll01.png

  • Then select “Apps”


CatchAll02.png

  • Then select “G Suite”


CatchAll03.png

  • Then select “Gmail”


CatchAll04.png

  • Then scroll down to the bottom and select “Advanced Settings”


CatchAll05.png

  • Then scroll nearly down to the bottom and under “Routing” you will see the setting for “Email routing”, change the radio button for “Unknown mailbox account messages” to “Route to catch-all address”, and put in your main email address for this domain.


CatchAll06.png

That’s it, for most people this is not a suitable setting because it just slightly increases your spam content, but for me and anyone who needs a constant stream of individual email address and to not lose track of old ones used one 6 months ago, it’s invaluable.


  1. Some of my colleges use temp email domains such as http://www.throwawaymail.com but I have found that such things have a habit of being needed again in 6 months when the client comes back for more work. 

A Change in Headphones

Anyone who knows me will find the idea of me not wearing a set of headphone at all times a strange one, and for the last 6+ years I have been a faithful purchaser of the Sennheiser PXC range, gently working my way through the range over the years from the 360 to the 550, however when it came to buying a spare battery (after a spate of losing the devils) I found out that the style that I had been used to years had been changed, not a problem, all designs change and grow i’ll just get the new version…. Ah no I won’t… because the new ones are angled and that is a deal breaker, it means I can’t wear them the wrong way round 1 and I cant tuck one behind an ear which I NEED if I am on a client site as there is nothing that gets headphones banned faster than managers not being able to call you when they want.

Requirments

  • Over-ear Design.
  • Bluetooth + Wired.
  • Standard Ports: I fecking hate proprietary ports of all types, you use your own ‘Special’ port so you can sting me for replacement accessories then you are on my s**t list.
  • Vertical alignment: headphones must be vertically aligned, not tilted.
  • No Noise Limiters: I’m not bloody 5 and I Like loud music.

The Choice

I looked at the new Sennheiser PXC but they failed because of the tilt issue raised above and their other suitable models tipped the hipster scale too far, Bose cost too much and just feel like they are not going to last long under the strain of my life and Plantronics are huge and just fall off my head, so enter an outsider in headphones but a venerable name in music: Marshall and their Monitor Bluetooth


MonitorHeadpones01.png


MonitorHeadpones02.png

The Good

  • The Bluetooth is much much stronger than the Sennheiser, I can leave my phone on my desk and wander round the flat with no issue, a great improvement.
  • Snug fit: The headphone are a very tight snug fit, far too tight for my wife, but a positive for me.
  • Sound Quality: richer and far louder than the Sennheiser a huge improvement
  • Duel Input: When working I am always using the Pomodoro timer from my phone via blue tooth, but am often wired in at the same time for things like calls and such, the Marshall headphones handled both of these at the same time which is a pleasant upgrade.

The Bad

  • No Lateral Movement at all: was not really expecting any given their classic design and the absence of an extra join sure makes the whole structure stronger, but without one I can feel the extra pressure when I tuck a headphone behind one ear.
  • Control knob: a poor gimmick, not a knob but a mini joystick which is both fiddly and unintuitive, the volume should have been changed by TURNING the knob!

The Unexpected

  • The replaceable headphone pads are easy to swap: My beard and stubble shreds headphone pads so I was forever replacing the Sennheiser pads, and boy were they a PITA to replace, the Marshal ones are magnetic and nice and easy.
  • The Marshall headphones gave me a total blast from the past to my dads old Pioneer SE-205 which I loved from years ago, true retro.


DadsHeadphones.jpg

The Conclusion

It’s still early days and the Marshals are not quite as easy on my ears as the Sennheisers but the sheer upgrade in nearly all features blows that out of the water, Recommended.


  1. Which I want to do when I want the the cable or buttons on a certain side, or if the Bluetooth signal is having problems with my head!! 

Salesforce and Third Party Calls

This is just a post to help other Salesforce devs who have to face the same repeat question time and time again and the same disbelief in the answer, So they can prove to the client that they are telling the truth.

Dear Sir/Madam
If you are reading this then someone has sent you to this post because you have asked about linking to a third parties data “on the fly” or “in Real time” or “before it opens” on Salesforce and wanting for such data to arrive before showing the page to your users…

the simple answer is this

Salesforce will never make the speed of their website dependent on anyone else!!!

It will never wait for anyone else before opening a page
It will never wait for anyone else before saving a page
It will never wait for anyone else to do ANYTHING

Yes, you can call just about anything with Salesforce, but it will do this asynchronously, so it will make the call to the Third Party, then get on with its own stuff without waiting for an answer.

You just have to write your Salesforce code/page/whatever to deal with the result when it comes back from the Third Party, it’s well documented, there are lots of ways to deal with it: Batch runs, Ajax etc and plenty of neat solutions.. but none of them is “can’t it just wait”

Fin.

Omnicharge

The Omnicharge is the second “mains supply” battery backup that I have backed on kickstarter what seems years ago, and the second one to turn on in the last month

Heralded as far more advanced and adaptable compared to its competitors such as the ChargeTech Plug but it has a far lower output wattage (100Watt), so will it still be any use to me with my monster laptops?

—V The Omnicharge comes in a very nice compact box, minimal packing that survived the air trip perfectly.


Omnicharge01.jpg

The Omnicharge accessories match the amazing build quality of the main unit, with the adaptor tip being of especially high quality for some reason (not that im complaining)


Omnicharge02.jpg

One thing that bit me slightly is that if you are outside of the US you can’t order the accessories afterward so if you were dumb like me and did not order the DC cable or looked at the dirt magnet that is the case with its raised power button and realised a case is a mandatory requirement then poot to you.

When the Omnicharge arrived, I did not have a 90Watt power supply at hand, so I plugged my 130Watt in to see how it handled the extra load expecting a polite cut off message, but NOOOO, everything just worked, I glared at the info screen to see what was going on to discover that the giant power adaptor was ACTUALLY only drawing about 39Watts, let’s hear it for modern adaptive power supplies, this means I can use my P50 with the Omnicharge and my normal charger, sweet!!!, after a bit of experimentation, I found could make the Omnicharge peek at about 81 Watts (4 VM’s running, with me working in 1 of them) this is perfectly usable, I suppose I could have popped the limit if I have done something like video encoding, but that is not the goal.

—V The part of the Omincharge that sets it apart is that it will accept a very very wide range on its input charge, from USB solar panels up to monster power supplies (4.5V to 36V), if this circuit and it matching detailed control screen was built into actual laptops it would be a HUGE game changer but I will take it in any form at the moment.


Omnicharge03.jpg

—V The Omnicharge is only 20.4K mAh, about the size of my laptop battery, meaning it would only add about 2 hours to my battery life, then I had a realisation that I could charge the Omnicharge with the big Anka USB battery I normally carry at the same time it is providing power to the laptop, which should mean it should charge my laptop about 40% longer than it should on its own (on average my laptop takes about 40 Watts).


Omnicharge05.jpg

—V As you can see it works, but as you can also see the temp is rather on the high side, indeed its only 3 degrees short of the cut off temp with its little fan going for all its worth


Omnicharge04.jpg

conclusion The Omnicharge is truly a very smart bit of kit, by far the cleverest battery I have ever owned, again if a laptop provider incorporated this tech into their laptops it would be a massive game changer, but for the time being it is an essential bit of kit… just don’t forget to buy your accessories…

Cold Brewed Coffee?


cold_coffee_01.png

I must first apologise for the lack of technical blogs recently, but real life has interesting bits in it at the moment.

As I mentioned earlier this year, life has been utter chaos and I have been drinking more and more caffeinated soft drinks. When I started seeing a litre’s-worth of cans on my desk each day, I decided it might not be as healthy as I might like — and it was costing a fortune too, so cold coffee it is!! I have tried cold coffee before and it tastes… well like coffee you have made then put in fridge. It has a nasty bitter aftertaste: perhaps I was just making it wrong?

Turns out there is this thing called “cold-brewed coffee.” I’ve had seen it online obviously, and it’s typically made in £40+ Kickstarter coffee pots then served in handcrafted mason jars… Meh. I dismissed as an over-priced fad.

Thankfully it turns out that large parts of the world have been making it for ages, and I could get a Japanese single litre glass pot that fits in the fridge door for a far more sane £17.

It turns out that pre-ground coffee is not suitable, after a period of suspicion I discovered that this is indeed correct: you get a lot of grit at the bottom of the pot with pre-ground coffee, <sigh> so how much is a fecking coffee grinder? Well about £9.50, and approximately 10 minutes of one’s time to prep. enough coffee for the week. That is bearable (ohh and un-ground coffee is a bit cheaper that ground, on a brand-by-brand basis). Sold!

You are supposed to use filtered water AS WELL (this is starting to sound like stone soup). Well, I drink London water so I can see their point there,. “But I’m not buying a water filter!” says I… Hang on, didn’t we get one when they had one of those “buy one cartridge get 10 free + plus the jug” deals a while back? <rummages in a back cupboard> Bingo! OK, we have filtered water. For more filters, Robert Dyas always has sales on.

Let’s finally make the stuff. It seems you use 80 grams of rough ground coffee for a litre (8 normal coffee spoons), pouring the water slowly over the coffee in a spiral just like with a normal filter coffee. Give it a good stir and pop it in the fridge for at least eight hours before attempting to drink (I have found a simple 24 hours works best). I wash out the filter and make the next batch as I put today’s in the thermos.

I normally have my coffee with lots of sugar and milk but found I did not need the milk at all as the coffee is far less bitter. The sugar on the other hand was a small pain as it obviously does not dissolve well in cold coffee, so I now make a batch of sugar syrup and keep it in the fridge with the coffee. I make the syrup like so:

Sugar syrup

  1. Put 1 cup of water in a pan.
  2. Add 1 cup of sugar
  3. Bring to boil while stirring until all the sugar has dissolved (it will go clear).
  4. Take straight off the stove as soon as it boils, cool it then bung it in the fridge.

Apparently sugar syrup lasts up to a month in the fridge so there is no worry there.

How does it all taste after this faff? It tastes really, really good — clean and fresh and just what I wanted as a replacement to an energy soda. Obviously you need to use a thermos to keep it cool. I use Chillys water bottles which work perfectly. Whilst I was initially worried about the coffee tainting the water bottle so I would no longer be able to use it for normal water, turns out the cold coffee doesn’t seem to do that as much as hot coffee. Even if there was some taint, a tablespoon of bicarbonate of soda filled up with water overnight seems to remove any remaining taste.

cold_coffee_02.png

Total costs:

Equipment

Coffee filter: £17

Coffee Grinder: £9

Water Filter Jug: £20 (I already had one)

Thermos or Chillys water bottle: £20 (I already had one)

total: £56

Running Costs

Coffee: A 1kg pack of good coffee beans costs about £13, 1 litre of coffee takes 80g, so a week is about a fiver.

Water Filters: £36 for 12 months (according to Robert Dyas) so a week is less than a pound.

Sugar: I go through 2 cups of sugar a week, i.e. 400 grams, so about 25 pence

total per week: £6.41 (let’s say £6.50 with a bit for electricity and water)

Conclusion Energy drinks were costing me £4 - £5 per day, so we are onto a winner after about 3.5 weeks. Nice!

An added benefit, that appeared later, is that too many soft drinks were making me cough! I had a nagging and persistent cough for about 6 months, and just thought it was a left-over from a chest infection, and that I would deal with it when I had time. Turns out a week after I moved to cold-brewed coffee it just packed in. When I switched back to soft drinks for a few days it returned. Well OK then: coffee is here to stay.

Engage 2017 From A Distance


Engage2017-01.jpg

Watching Engage from a distance a few weeks ago was an exercise in misery, far more than even IBM Connect, Theo Heselmans had put on an extra special show and I was gutted to be missing it.

The conference looked like its exceptional mix of excellent content plus good socializing and in my personal opinion is the best of the ICS related conferences.

An extra wince for me this year is letting Theo down on the presentation of my session, thankfully Matt White stepped in and gave my session for me so a huge apology and much gratitude to him

Engage 2017 - Choose your own adventure from Mark Myers


Engage is always important to LDC Via as is our anniversary time, this time everybody else had to pick up the slack (Ben had to do the speed sponsoring I normally do) so I am in the team dog house.

I was sent freebies back from the various vendors, but freebie of the conference goes to Teamstudio with their Tile which according to my wife will save me about 15 years of my life

That’s it just a Slide Deck Post and a groveling apology




P.S. Many thanks to Amanda Bauman IBMs token sane person, for sending over some IBM swag (which I had completely failed to order) as well as the Champion Connect Tshirt


IBMSwap2017-01.jpg


IBMSwap2017-02.jpg


IBMSwap2017-03.jpg

ChargeTech Plug

Kickstarter/Indiegogo projects seem to fail rather a lot, but I have long wanted a battery I could charge a monster laptop from and so I could not resist the ChargeTech as they promised a 250 Watt output, which would handle the 130-170 Watt power supplies that nearly all my laptops have. after the delays that are now run of the mill with the outsourced production that is common on Kickstarter projects, they did actually deliver, my wonderful monster battery came in a very smart box and inside the battery in all its glory but with a huge yellow label on it1


Plug-01.jpg

The Plug its self has the size and feel of an extremely bottom heavy hardback book, it has a quality feel about it.


Plug-02.jpg

The business end of the Plug, I have used a lot of these universal sockets, they often feel fragile and like they are going the break if I push the plug in hard, these, however, feel just perfect. the blue LEDs on the USB are a tad on the bright side, there is also a usb-c and a barrel charge port on the left-hand side.


Plug-03.jpg

The accessories you get are basic but expected, I also got a car charger (not shown), I will talk about the charger later, the bag is perfectly satisfactory if a bit tight but in a nice touch it has a hole on the side so you can charge the Plug while it is still in the Bag

Usage

Using the Plug is logical and simple, turn it on at the front and get shown a little LED % readout, and then there is a separate switch to turn on the AC power, the % indicator remains on during use, I plugged in my laptop and then every USB port, and it just took it like a champ, happily worked on it for a few hours till the % readout read 00 and then it turned off,I unplugged my stuff and then plugged in the included charger, the % counter then slowly counted back up till it read 99 then FF (for full)…… don’t know what I expected but it behaved perfectly.

Notes

  • Not for Planes : Now this thing is not to be taken on a plane either in hand luggage on checked in, it’s well over the limit (which I think is 27,000Mah), but that is OK, there are plenty of battery packs that handle that area of the market (ChargeTech themselves makes one, and I have the omnicharge from another Kickstarter coming soon anyway <looks guilty>

Niggles

Even though the Plug is a product from an existing company and not just a Kickstarter newbie it does have a couple of bits that are not perfect

  • Charger The charger that comes with the the Plug is a basic off the shelf job and it shows, particularly in contrast to the build quality of the Plug its self, it’s a 43W charger in the case of 75W/90W charger and this is a special crime in a product that is designed to be portable, however all is not lost, the plug uses the most common barrel power connector and I suspected it uses the same charge circuit as their other AC power products which will accept an input voltage of between 19.5v and 24v according to their manuals, this was supported by the fact that the AC charger provided is 24v but the car charger is 20v, a brief dig around in the old cables box unearthed an old 40Watt Lenovo charger that worked perfectly was better build quality and was a fraction of the size, for shame ChargeTech, for shame!!


Plug-04.jpg

  • Charge Levels The charge % on the front has a couple of numbers it seems a bit fond of, mine, in particular, seems very fond of 9% and 64% I don’t know why, but the first couple of times using it I actually thought it was broken.

  • Power Low After a week in my bag, I took the Plug out and checked the % …. it was at 70%, WTF!!! … after a minor panic, I realised that because the on/off button is a raised one on the front, it was simply getting turned on in my backpack, so I will have to get a couple of small rubber glue on feet to stick either side of the button to prevent this, perhaps make this button recessed in a future release.

Conclusion

I like the Plug, it’s a slightly strange beast, it has the feeling of something that was designed and build by Techs, then finished off by accountants, the 250 Watt outage is done perfectly and will make a real difference to my remote working, though I wish you could do a trickle charge off USB-C or some other method.

The sheer size of the 54,000mah battery was a joy, taking a few hours of my Lenovo P50 running flat out plus all the USB ports in use to kill it, it fills a gap in the battery market that has been open for a long time and I am glad I now have one.


  1. This worried me for a second but it just turned out to be a REALLY pushy registration card….. so frankly it can get stuffed… 

Basic Authentication logout issues

A quite interesting bit of work I am doing at the moment is building an AngularJS app running on an IBM ISeries, this has presented a whole series of odd little challenges but the one that bit us hard by corporate standards was logout and session expiring, The system and its sessions are on an Apache box sitting on an ISeries, it has turned out that not only was the Apache logout URL not present but that the Apache session expiry did not take effect1.

So what to do….

I have done a nasty little JavaScript solution but one I think fits the circumstances.

  1. As this is for an AngularJs app, no jquery or such
  2. I did not want this solution to actually be built into the angularjs app, as in a perfect world the underling issues will be fixed and I want it easily ripped out, also I don’t want the code mentioned in each controller etc etc.
  3. The server that the app is running on has no facility to handle log off and does not have session based authentication (or even a login page)

Basic authentication does not really handle log off very well. For everything but Internet explorer you basically have to perform a fake login.

function detectIE() {
    var ua = window.navigator.userAgent;
    console.log('In detectIE');

    var msie = ua.indexOf('MSIE ');
    if (msie > 0) {
        console.log('IE 10 or older');
        // IE 10 or older => return version number, but I just want true
        //return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);
        return true;
    }

    var trident = ua.indexOf('Trident/');
    if (trident > 0) {
        console.log('IE 11');
        // IE 11 => return version number, but I just want true
        var rv = ua.indexOf('rv:');
        //return parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);
        return true;
    }

    var edge = ua.indexOf('Edge/');
    if (edge > 0) {
        console.log('Edge (IE 12+)');
        // Edge (IE 12+) => return version number, but I just want true
        //return parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);
        return true;
    }

    // other browser
    return false;
}


function ClearAuthentication(LogOffPage)
{
    if (!LogOffPage) {
        LogOffPage = location.pathname;
    }

    if (detectIE() == true)
    {
        console.log('In IE');
        // Logoff Internet Explorer
        document.execCommand("ClearAuthenticationCache");
        window.location = LogOffPage;
    }
    else
    {
        console.log('Not IE');
        var xhr = new XMLHttpRequest();
        xhr.open('GET', location.pathname);
        xhr.setRequestHeader('Authorization','Basic XXXXXXXXXXXXXXXX');
        xhr.onload = function() {
            if (xhr.status === 200) {
                console.log('did not log you off');
            }
            else {
                console.log('should be logged out')
                window.location = LogOffPage;
            }
        };
        xhr.send();

    }
}



Followed by a very iffy 30 min log off timer, that surprising works rather well

var inactivityTime = function () {
    var t;
    window.onload = resetTimer;
    // DOM Events
    document.onmousemove = resetTimer;
    document.onkeypress = resetTimer;

    function logout() {
        ClearAuthentication();
    }

    function resetTimer() {
        clearTimeout(t);
        t = setTimeout(logout, 1800000)
        // 30 min till logout
    }
};

(function() {
    inactivityTime();

})();

  1. but even if it had, it would have screwed up the Internal application that most people use to have an Iseries Session via a browser. 

Latest Blogs