Categories
Uncategorised

Forced to Care About Internet Explorer: lazy loading

If you work in the public sector you’ll be forced to care about IE and especially speed and as is the public sector you need to spend as little time as possible time on any project.

So we tried every lazy load library we could find and consistently found issues with all of them using modern Javascript so I decided to just make a simple script using old Javascript and it just works


Notice: Undefined offset: 1 in /var/www/vhosts/liamanderson.co.uk/blog.liamanderson.co.uk/wp-content/themes/liamanderson/template-parts/content.php on line 54

Notice: Trying to get property 'name' of non-object in /var/www/vhosts/liamanderson.co.uk/blog.liamanderson.co.uk/wp-content/themes/liamanderson/template-parts/content.php on line 54

Notice: Undefined offset: 1 in /var/www/vhosts/liamanderson.co.uk/blog.liamanderson.co.uk/wp-content/themes/liamanderson/template-parts/content.php on line 58

Notice: Trying to get property 'name' of non-object in /var/www/vhosts/liamanderson.co.uk/blog.liamanderson.co.uk/wp-content/themes/liamanderson/template-parts/content.php on line 58
Categories
Uncategorised

A Concept for Generating Random Seeds with AI on Light Weight Devices

Obviously, this is nothing new, but I was thinking about the potential NSA backdoor in intel’s random number generator RDRAND and the vulnerabilities in the UNIX PRNG.

Many suggestions to get around this problem uses taking photos of something with natural randomness for “True Randomness” like Cloudflare’s LavaRand or Bruno Sanguinetti’s Quantum random number generation on a mobile phone proposal.

So this problem has been solved for years now so why did I even think about it?

I currently use an encrypted thumb drive to store keys and similar mission-critical data and was looking for better solutions and came across a DIY solution using an arm processor and that got me thinking about using a little camera sensor, maybe pointing at some gell in a box that you shake up to make bubbles but that would be quite large.

giving the device a cellular connection introduces its own problems but makes the device pocketable and inconspicuous, imagine you’re at work and you plug this big box and cable into your workstation you’re gonna get looks.

The bellow code has many issues one being using base64 to encode the only image allows for and entropy of 65536000000(with my dyslexic brain I can’t even read that number) and the code for that particular AI generation is open source but it also requires that you have the same model set and still the results still might not result in the same outcome but the idea is you run your own AI generation and handshake with your personal device.


Notice: Undefined offset: 1 in /var/www/vhosts/liamanderson.co.uk/blog.liamanderson.co.uk/wp-content/themes/liamanderson/template-parts/content.php on line 54

Notice: Trying to get property 'name' of non-object in /var/www/vhosts/liamanderson.co.uk/blog.liamanderson.co.uk/wp-content/themes/liamanderson/template-parts/content.php on line 54

Notice: Undefined offset: 1 in /var/www/vhosts/liamanderson.co.uk/blog.liamanderson.co.uk/wp-content/themes/liamanderson/template-parts/content.php on line 58

Notice: Trying to get property 'name' of non-object in /var/www/vhosts/liamanderson.co.uk/blog.liamanderson.co.uk/wp-content/themes/liamanderson/template-parts/content.php on line 58
Categories
Uncategorised

Image ALT Scraping for Accessibility Reporting

In my last employment we had someone who’s job it was to update alt tags on images and shareholders and management needed reports on progress so I built a small script to just that as well as another to make suggestions for the alt tag using the google vision API.


import requests
import json
import sys
import time
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.firefox.options import Options

URLS = [line.rstrip('\n') for line in open('urls')]

options = Options()
	
options.set_headless(True)
	
driver = webdriver.Firefox(options=options)

#driver = webdriver.Firefox()

print(URLS)

imageslist = []

i = 0
while i < len(URLS):
	
	print(URLS[i])
	
	try:
	
		driver.get(URLS[i])
	
		imageLen = driver.execute_script("return document.images.length;")
	
		b = 0
	
		while b < imageLen:
		
			imageslist.append(driver.execute_script("if(document.images[" + str(b) + "].alt == '' | 'null'){ return document.images[" + str(b) + "].src}"))
		
			print(imageslist[b])
		
			b += 1
	
		images = '\n'.join(str(e) for e in imageslist)
	
		with open("images", "a+") as file:
			file.write(URLS[i] + ': ' + images + '\n')
	
		i += 1
	
	except:
		
		print('Failed')
		
		i += 1

driver.quit()


Notice: Undefined offset: 1 in /var/www/vhosts/liamanderson.co.uk/blog.liamanderson.co.uk/wp-content/themes/liamanderson/template-parts/content.php on line 54

Notice: Trying to get property 'name' of non-object in /var/www/vhosts/liamanderson.co.uk/blog.liamanderson.co.uk/wp-content/themes/liamanderson/template-parts/content.php on line 54

Notice: Undefined offset: 1 in /var/www/vhosts/liamanderson.co.uk/blog.liamanderson.co.uk/wp-content/themes/liamanderson/template-parts/content.php on line 58

Notice: Trying to get property 'name' of non-object in /var/www/vhosts/liamanderson.co.uk/blog.liamanderson.co.uk/wp-content/themes/liamanderson/template-parts/content.php on line 58
Categories
Uncategorised

CSS-only Responsive Navigation Menu

In one of the many unsuccessful job applications, I have completed this one required me to build a navigation menu as a technical test.

I decided to build one entirely in CSS rather than using a JavaScript library like jQuery which was “allowed”.

I didn’t get the job but I can always display what I completed here.


Notice: Undefined offset: 1 in /var/www/vhosts/liamanderson.co.uk/blog.liamanderson.co.uk/wp-content/themes/liamanderson/template-parts/content.php on line 54

Notice: Trying to get property 'name' of non-object in /var/www/vhosts/liamanderson.co.uk/blog.liamanderson.co.uk/wp-content/themes/liamanderson/template-parts/content.php on line 54

Notice: Undefined offset: 1 in /var/www/vhosts/liamanderson.co.uk/blog.liamanderson.co.uk/wp-content/themes/liamanderson/template-parts/content.php on line 58

Notice: Trying to get property 'name' of non-object in /var/www/vhosts/liamanderson.co.uk/blog.liamanderson.co.uk/wp-content/themes/liamanderson/template-parts/content.php on line 58
Categories
Uncategorised

CRT Boot Animation – CSS

Recently I had an idea for a simple .io game based on the thought of merging a game I used to play, back in the day called hack the game by chaozz and all those wait timer, checkbox, textbased multiplayer facebook games.

as I’m writing this I’ve just discovered chaozz is working on his own version, but right now I’m showcasing the animation I built while tinkering.


Notice: Undefined offset: 1 in /var/www/vhosts/liamanderson.co.uk/blog.liamanderson.co.uk/wp-content/themes/liamanderson/template-parts/content.php on line 54

Notice: Trying to get property 'name' of non-object in /var/www/vhosts/liamanderson.co.uk/blog.liamanderson.co.uk/wp-content/themes/liamanderson/template-parts/content.php on line 54

Notice: Undefined offset: 1 in /var/www/vhosts/liamanderson.co.uk/blog.liamanderson.co.uk/wp-content/themes/liamanderson/template-parts/content.php on line 58

Notice: Trying to get property 'name' of non-object in /var/www/vhosts/liamanderson.co.uk/blog.liamanderson.co.uk/wp-content/themes/liamanderson/template-parts/content.php on line 58
Categories
Uncategorised

Gesture-based controls for OBS-Studio in Virtual Reality

This Project is hosted here

Working with the applet functionality provided by OVR-Toolkit provides useful methods for in-game multi-tasking through its ability to access your minimised windows as virtual displays in the VR playspace or what I’m exploring the Chromium Embedded Framework.
Not only does OVR-Toolkit have CEF they have built an API to pull data from your VR Headset and VR Controls and this inspired me to work on this applet.

one of the many challenges with this project I wanted to tackle was making setting persistent some people may immediately think to use the steam API to store and retrieve settings but that would myself to support and maintain a database that would contain IDs and potentially fingerprintable information, so I decided to load and save a JSON Config file through JavaScript.

THIS BLOG IS ONGOING…


Notice: Undefined offset: 1 in /var/www/vhosts/liamanderson.co.uk/blog.liamanderson.co.uk/wp-content/themes/liamanderson/template-parts/content.php on line 54

Notice: Trying to get property 'name' of non-object in /var/www/vhosts/liamanderson.co.uk/blog.liamanderson.co.uk/wp-content/themes/liamanderson/template-parts/content.php on line 54

Notice: Undefined offset: 1 in /var/www/vhosts/liamanderson.co.uk/blog.liamanderson.co.uk/wp-content/themes/liamanderson/template-parts/content.php on line 58

Notice: Trying to get property 'name' of non-object in /var/www/vhosts/liamanderson.co.uk/blog.liamanderson.co.uk/wp-content/themes/liamanderson/template-parts/content.php on line 58