Wednesday, April 13, 2022

Website confirmation field paste-block script

 Drop this into the dev console using F12.


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

var allowPaste = function(e){

  e.stopImmediatePropagation();

  return true;

};

document.addEventListener('paste', allowPaste, true);

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


If you are a web dev and you block pasting, you are an arsehole.

Monday, January 27, 2020

Random ticket drops into my work queue, raised with an IT template for a system that directs it to us, but the comments in the ticket are for nothing I am familiar with.

The requester is offline in mesaging.  Ring the requester, messagebank.  Leave message, after more detail, please call back.  Ticket goes into hold pending client response.


Come in two mornings later to a snotty e-mail from some self-important helpdesk management dickhead demanding to know why the ticket hasn't been actioned and is in hold, don't I know the sky is falling?

I reply back with both barrels that:

(a) It has been actioned, fuck you very much.
(b) It's in client hold because the requester was not contactable when more detail was required.
(c) It's not a service or network outage that I recognise so it's a P3 ticket to me regardless of whose world is ending personally, and no I don't really care.
(d) Fuck you, you don't set my work priorities.


Now begins the inevitable e-mail war.


Helpdesk management dickhead: Can't I contact the requester RIGHT NOW and demonstrate some urgency?

Me: Well I could, but since it's 5am in the time zone where the requester lives, I'm not going to.  Maybe they could reply to the message I already left for them, instead of whining?


8 o’clock local time arrives.  Ring requester.


Me: Hi, calling about this ticket that makes no sense to me whatsoever, please enlighten me.

Requester: I’ve got some spreadsheet that I have no idea who wrote, and less idea how it functions, that pulls data from some unknown source, that isn’t working.

Me: Riiight.  Just so you know, I'm from [insert_system] support, and I'm only looking at your ticket because you raised it with an [insert_system] template.  I'm not sure your issue is related to [insert_system].

Requester:  WELL I CAN'T WORK WITHOUT THIS.  THE SKY IS FALLING, and it's just TYPICAL that you people don't care!

Me:  It's largely true that I don't care, but that aside I'll fix it if it is my responsibility and within my ability to do so.  The latter is somewhat compromised by my not seeing how your spreadsheet can possibly interact with the system I support, so I suspect your ticket has been misdirected.  It was raised as an [insert_system] ticket, which is why it came to me.  Who raised it using that template?

Requester:  THIS IS ALL TOO HARD.  I couldn't figure out what ticket template to use, so I just picked the first one, it's your problem to sort it out.  (What a surprise, [insert_system] starts with A, so it is first in the menu.)

Me:  OK, I'm going to reassign your ticket to the helpdesk as it's nothing to do with the system I support, so I can't assist you myself.

Requester:  HOW LONG WILL THAT TAKE?!?

Me:  I have no idea.  I don't work for that team or under their processes.  I have no idea who supports the tool you are using, or what they will need to do to assist you.  Again, we're only talking at all because you raised the ticket with the wrong IT template.

Requester:  THIS IS ALL YOUR FAULT I CAN'T WORK AND WE WILL MISS OUR DEADLINES!  I'll be raising a formal complaint against you!

(Rightyho, gloves off then.)

Me:  Yeah, good fucking luck with that.  You'll be raising a complaint against someone who has no part to play in the resolution of your issue, because you have no idea how your tools work and you created the ticket incorrectly, weren't contactable when I tried to clarify the situation, and then added a day's delay to the process by not responding to the message I left.  And that's all before I now have to pass the ticket back to the helpdesk, who won't have a fucking clue who to assign it to, because you can't tell them who developed or supports your mission critical system.  Have fun with your complaint, my management need a laugh occasionally.

/Reassigns ticket to helpdesk with notes saying that there will be blood if I ever see the thing again.

Monday, December 16, 2019

Diversity

Anyone who thinks diversity is automatically a good thing has clearly never tried loading and tying down furniture in a ute with their wife "helping".

How the hell I got out of that one with no furniture damage, a ute returned on time and an intact marriage remains a mystery.

Saturday, November 2, 2019

Physiology lesson for the day

Want to learn something weird about how your brain works?

There's a physical problem with our eyes - we move them in short fast bursts called saccades. These are very quick, synchronized movements, which allow the eye to scan across your field of vision for what it thinks are the critical points of reference.



By "quick", think in the order of 900°/s angular movement speed - the eyeball could rotate fully nearly three times a second, if that was possible.  The problem is that leads to blurred vision during motion.  Having your vision turn into a blurry mess every time you move your eyes is obviously not a good idea, so our brains hide it from us.

Imagine you're an engineer and you have this problem.  What are some solutions to this issue?

1. Make vision go black during movement. (Some VR games actually use this method.)
2. Just keep showing the last thing we saw prior to movement, until a blur-free image is again available.

Both are possible options that work, although with different downsides, but your brain uses neither of these options.

When a saccade occurs, your brain puts your visual system on "pause". You're not seeing blackness, you're just not seeing anything - full stop.  You literally have no vision while this is occurring.  (Yes, this is happening to you right now.  Cool, hey?)  When you finish your saccade, you see what you now see at the new eye orientation. But what happened in the meantime?  What's freaky is that your brain now pretends it can time travel.  It doesn't just show you the image at the current time, but it time-shifts it backwards so that you think you were seeing it the whole time your eyes were moving.

This works because your brain has no independent clocking reference, so if it feels like fooling itself by distorting linear time - it can.  You can see this effect happen for yourself if you watch an analog clock with a ticking second hand.  (Here's one I prepared earlier:  https://www.youtube.com/watch?v=G735Q4amKZc).  Watch the second hand, then look away (move just your eyes, not your head), then look back to the second hand.  It will seem to take longer than a second to initially move, then it resumes moving as normal.  That's your brain and visual system lying to you about linear time to cover up for the physical limitations of your eyes.  This effect has been known for over a century, it's called "saccadic masking" or chronostasis. Your visual system can distort time by up to half a second to mask the effect of saccade blurring.

An engineer would also wonder why a vision-pausing system wouldn't cause all sorts of weird effects with moving objects.  Wouldn't they appear to stutter when they move?  No, because your brain has a second perception hack to avoid you perceiving this.  You can again see this happening by looking at a clock with a smoothly moving (as opposed to ticking) second hand like this: https://www.youtube.com/watch?v=iAr3e7VoKv8.  Try the same experiment as before with looking at the second hand, looking away, and back again.  In this instance, the second hand doesn't exhibit the initial pause like the ticking hand, because your brain recognizes it's moving and adjusts what you see to make sure it sees the "right" thing.  The perception hack is only really obvious with periodically moving things like a clock hand, because it's not moving constantly (so not triggering the movement-during-chronostatis hack) but it moves at a set rate, so you can still perceive that that rate appears to change.

Because we all think we've got a fair sort of handle on how the world works, it's tempting to think of your eyes and visual system as a camera dumping a video feed into your conscious brain where you sort out what's happening for yourself, but that's very, very much not the case.  What you think you see and what your eyes actually see are two completely different things.

The first and biggest is the blind spot.  Vertebrate eyes are wired backwards so we've got a blind spot in each eye were the nerves enter into the back of the eye. About 6 degrees of your vision in each eye is just not there, as there's no light sensitive cells present in that part of the eye.  But you don't see a blind spot, assuming your eyes are undamaged.  Does the other eye perhaps fill in the blank spot for you?  Try it, close one eye - there's now no way for the other eye to fill in the gap.  You still won't see a blind spot... your visual system is again lying to you, and making up content it thinks is there. You literally cannot see what you think you see.

The second is colour vision.  You can see in colour, right?  All of your vision is colour, edge to edge?  What's interesting is that most of your cone cell light receptors (which are the ones sensitive to colour) are in the fovea, a little spot in the center of your vision:



Outside of that center-of-vision spot, you have very little color perception. There's some but it's very limited compared to your main colour vision.  But if you shift your attention to your peripheral vision right now, it's in colour - how?  Again, your vision system is lying to you.  It's remembering what colours things are and guessing and filling in the gaps. It's basically doing a colorisation process on your non-central vision.



Then there are other interesting effects like "action-specific perception". If you get a number of white balls of various sizes and toss them at someone, then ask them to estimate the size of the balls thrown at them, they'll have a certain size estimate, right?

Now repeat the experiment but ask them to try to hit the balls back with a bat, and suddenly all the estimates shift larger.  They actually see the ball as bigger because they need to hit it.  Their vision system exaggerates object size to make it easier to see, based on need.

As mentioned above, your vision is not a camera.  Perfect accuracy is not one of its goals, and objective reality is not very important.  What is important to the evolution of the visual system is any trick that helps you survive, no matter how strange or weird it is.  So if you want an accurate visual representation of what things look like - use a camera. Not your eyes.

Now you know about your eyes and visual system being poor cameras that lie to you, you might still think that at least they're consistent, time-wise.  They don't screw with your sense of time passing, just to make up for visual defects, right?

Nope - if you can't get it done in time, just turn back the clock and pretend you did. That's a perfectly good solution to your visual system.

Want another example of saccadic masking?  Go and look into a mirror.  No matter how close you bring it to your eyes, and how much you look around, you will never see your eyes move.  How is that the case?  Simple, you're blind during those moments.  But you still think you are seeing.

More proof?  Try the same thing again, but using your phone's selfie camera.  It's not a mirror, there's a slight delay between the camera "seeing" the image and it being displayed on the screen - so now you can see your eyes performing saccades.

Look at wikipedia's example of the blindspot below.  Stare at L with only your left eye, adjust the distance, and the R will disappear. You don't see "nothing" or "black", you see the background, because you expect to, so your brain fills in the space with what you expect to see.



This is why laser damage your retina can be so dangerous.  Your visual system already hides "holes" in your vision, what's one more to hide?  You can damage a small spot of your retina and your visual system covers it up.  The problem is you don't realise the damage has been done, until eventually you accumulate so much damage that your visual system simply cannot hide it all and your vision rapidly degrades.

The other reason many lasers are so dangerous is that they don't trigger the same responses as regular incoherent light.  Your pupil reflex is only triggered by some special cells in the center of your eye, so an off-center laser might not trigger an aversion reflex and cause your iris to contract.  Infrared laser light outside your visual range of perception is just as dangerous as visible laser light, but can't trigger your blink reflex, so damage is still done to your light perception system.

Cephalopods actually have their eyes structured differently to vertebrates; their nerve fibres run behind the retina, so they have no blind spot.



Want another examples of how crazy your vision system is?

There was an experiment back in 1890 where someone wore glasses made with internal mirrors to flip their vision laterally.  After about 8 days, they could see just fine with them on. Their vision system had started "flipping" the image to compensate.  It only took them a few hours to get back to normal after taking these glasses off, though.

This is strange enough, but what is really freaky is that - your eyes already do this. Based on how our vision is wired, we actually see everything upside down.  Your visual system flips it vertically for you, so what you "see" aligns with the world as you interact with it via your other senses like touch.

So if you every wonder if you really saw something, it's possible you didn't - you just think you did!

Monday, July 1, 2019

Sick people's guide to drugs

Given I'm currently incapable of speaking three words without coughing uncontrollably, I though it would be timely to post something I saw a while ago:

Do I have pain? A headache? Take a pain reliever.  Acetaminophen (Tylenol) or Ibuprofen (Advil) as you prefer.

Runny nose? Itchy, watery eyes? Drainage? A cough?  Basically, it's leaking and it shouldn't be?  You want an antihistamine.  Usually diphenhydramine (Benadryl), sometimes chlorpheniramine or brompheniramine.

Nose stuffy? My head congested?  Basically, if it's not running and it should be?  You want the good stuff - the pseudoephedrine - from behind the pharmacy counter.  Nothing else works much.  Sudafed is the go.

Am I coughing? Is it dry?  Get an antihistamine. Most OTC products will be based on dextromethorphan.  This does bugger all.

Am I hacking up bits from my lungs? Get something with guaifenesin.  Sold as Robitussin.  This will make you cough up disgusting amounts of mucus and assorted crap, it's pretty revolting but that is what it's supposed to do.  Not recommended for use in offices.

Saturday, May 25, 2019

Things I am not allowed to do around the house

Things I am not allowed to do around the house:

Construct an artificial tarantula out of pipe cleaners and place it into the letterbox for the wife to discover when she checks the mail.

Saturday, November 3, 2018

This week's delight

To my absolute delight (warning: may contain large chunks of sarcasm) I received the below in my e-mail a couple of days ago, apparently sent by myself to myself.

Sensitive details have been changed to protect the privacy of the aforementioned sarcastic.


I greet you!

I have bad news for you.
06/28/2018 - on this day I hacked your operating system and got full access to your account [username@domain.com] On that day your account ([username@domain.com]) password was: [password]

It is useless to change the password, my malware intercepts it every time.

How it was:
In the software of the router to which you were connected that day, there was a vulnerability.
I first hacked this router and placed my malicious code on it.
When you entered in the Internet, my trojan was installed on the operating system of your device.

After that, I made a full dump of your disk (I have all your address book, history of viewing sites, all files, phone numbers and addresses of all your contacts).

A month ago, I wanted to lock your device and ask for a small amount of money to unlock.
But I looked at the sites that you regularly visit, and came to the big delight of your favorite resources.
I'm talking about sites for adults.

I want to say - you are a big pervert. You have unbridled fantasy!

After that, an idea came to my mind.
I made a screenshot of the intimate website where you have fun (you know what it is about, right?).
After that, I took off your joys (using the camera of your device). It turned out beautifully, do not hesitate.

I am strongly belive that you would not like to show these pictures to your relatives, friends or colleagues.
I think $996 is a very small amount for my silence.
Besides, I spent a lot of time on you!

I accept money only in Bitcoins.
My BTC wallet: 15ZHnf1MPn6ybb8yUeAoCQ1AJtiKhg3NrP

You do not know how to replenish a Bitcoin wallet?
In any search engine write "how to send money to btc wallet".
It's easier than send money to a credit card!

For payment you have a little more than two days (exactly 50 hours).
Do not worry, the timer will start at the moment when you open this letter. Yes, yes .. it has already started!

After payment, my virus and dirty photos with you self-destruct automatically.
Narrative, if I do not receive the specified amount from you, then your device will be blocked, and all your contacts will receive a photos with your "joys".

I want you to be prudent.
- Do not try to find and destroy my virus! (All your data is already uploaded to a remote server)
- Do not try to contact me (this is not feasible, I sent you an email from your account)
- Various security services will not help you; formatting a disk or destroying a device will not help either, since your data is already on a remote server.

P.S. I guarantee you that I will not disturb you again after payment, as you are not my single victim.
 This is a hacker code of honor.

From now on, I advise you to use good antiviruses and update them regularly (several times a day)!

Don't be mad at me, everyone has their own work.
Farewell.



Apart from being a well-known internet scam, this kind of fails the credibility test when you consider that it apparently took three months for them to try extorting me, the two day "threat" somehow starts after I open a text e-mail, somehow "hacking a router" enabled them to compromise my operating system, and none of my PCs have webcams - only my phone and tablet, and good luck hacking those.

The e-mail came from 51.37.3.164 which is in Vodafone Ireland's RIPE block, but who knows if it was a script kiddy user or the end of a VPN tunnel.

inetnum:         51.37.0.0 - 51.37.15.255
netname:         VODAFONE-IRELAND-INFRA
descr:           Vodafone Ireland Limited
country:         IE
org:             ORG-EL3-RIPE
admin-c:         AD2783-RIPE
tech-c:          AD2783-RIPE
status:          LEGACY
mnt-by:          EIRCELL-ASNMNT
created:         2016-10-27T12:23:39Z
last-modified:   2016-10-27T12:23:39Z
source:          RIPE



What's irritating is that the password was correct.  It's one I've used for years for low-grade crap I don't really care about like internet forums and e-tailers.  Some idiot has had their database stolen and sold, and now every script kiddy out there is e-mailing the contact details on it, hoping someone is credulous and stupid enough to actually pony up some cash.

So after dumping the contents out of Lastpass and sadly staring at all the instances of [password], I got to spend a merry three hours logging into every one of the 37 resources where I used it, changing the password to a complex unique one, updating Lastpass, and testing everything.

At least the next time around I will be able to tell who the data leak is from by the unique password.