It’s been a little while since the 25th of December when I decided to go public with this idea, a great deal of work has gone into flashcard club. Exactly 40 hours has now been dedicated to the project outside my normal 8:30-5.
It’s been quite slow going in some aspects, one particular problem is the markdown library options are numerus and vary in completion and schema that make it hard to choose one that is appropriate for this project. In the end I have settled on marked.
Another area I am struggling to decide on is how best to onboard new users, I want them to have a positive experience however not all know the markdown syntax.
Currently, Flashcard Club has the following features,
User Accounts,
It’s currently possible to create a new user account, although there is no ability to ammend or update your user account.
New users should recieve a welcome email.
New users should be logged in automatically.
New users should be able to create flashcards and flashcard sets.
Almost Unlimited Flashcards,
It is possible to create and save flashcards.
You can also update flashcards, delete them and more.
Flascards use markdown syntax so you can include pictures and a limited amount of html.
Unit Tests,
Many components of Flashcard Club have PHPunit Unit tests.
Code coverage is probably very poor.
Toast Notifications,
Toast notifications are intergrated into the website.
The best place to see these in action is in the set editor if you update the title.
Planned features include,
A Study mode, because currently it is only possible to edit flashcards but not view them without the editor.
Google Sign in (Federated identity).
Statistics, because who doesn’t love a good graph.
Account management, because currently once you make an account you cant change any of your details, oops.
I’m sure there is not many of you but I had to tell someone. As of the last few days I’ve really felt the need to get involved in something that is really what I am all about. A new baby if you will, a commercial enterprise but one I own. I’ve been working full-time on Laravel projects and I want to improve my skills to really get better at it. Its a great framework after using raw PHP and template engines like handlebars.
During this time I came to the realisation that I wasn’t totally stoked with the existing flashcard companies out there and I think now more than ever I really have the skills to get something like this off the ground, hopefully this is the first project of many!
Flashcard Club is different,
I really want a modern material feel to the website. I’m not interested in something worse than what there already is out there, I want to really help people.
I want to really build a solid brand that people want to use. Flashcard Club should be a place to really get some work done and cram for that final test and study in a safe space.
I really want to provide a platform for students to get some work done. A lot of the competition has low quality submissions. I really want people to have an effective space to learn.
I want to publicise what I’m up to, and this blog will help with that. A real leading learner approach. From conception to reality.
Although this will have options to buy products, long term I only want this project as a sort of demo of my capabilities. I want to move on to better ideas ASAP but you have to start somewhere.
This is my first “premium domain” project so consider that an invested interest in this project.
Have a look and see how I’m getting on. At the time of writing cloud flare gives out error 526 so I hope to be past that by the time this goes up a month from now.
I aim to make both a website and mobile app, however the majority of the features will be made through the app, the functionality and backend will be possible through the online version as well.
I think my target audience is 99% students so a strong app presence is a must I feel. The website will be a strong start but is just one part of the experience.
I used geocraft to generate a Minecraft map of the University of Hull, and now I am sharing it with you. You can see a short video of the map below.
The map is available as OpenStreetMap data only, or with the DEFRA (Department for Environment, Food & Rural Affairs) lidar data from, (I think) 2015, so the multi-story car-park is not included for example.
The original project is broken as the lidar data did not get included, but it was possible to fix it using the suggested changes by RobinWhitfield here in this issue.
The original licencing for this map is CC-BY-SA for the pure OpenStreetMap map and the other is the open government licence. You may use these maps as you wish within these constraints.
If you plan on running these maps on a server, you may want to turn off leaf decay as some of the trees are all leaves and do not have a wood block to prevent them from decaying, as seen in the video.
I recently have been working on a weather recording project and as part of this endeavour wanted to check that all of the variables I have posted to my API were set, it can be rather a lot of work to have to specify each
if (!isset($_GET[]))
parameter so I decided to use a function that can take any number of arguments using a ‘variadic’ function in PHP.
// Returns true if all variables are set, else returns false.
function getVariablesSet(string ...$getlinks) {
foreach ( $getlinks as $link ) {
if (!isset($_GET[$link]))
{
return false;
}
}
return true;
}
Now, when I want to use a new api ‘command’, I can simply do the following,
$browser_response = new stdClass();
$browser_response->message = "Command not specified.";
if ($_GET['command'] == "new-temperature")
{
if (getVariablesSet("datetime","temperature","humidity"))
{
$browser_response->message = "All GET variables set.";
}
else
{
$browser_response->message = "All GET variables not set.";
}
}
echo json_encode($browser_response);
This way, so long as we have specified the command and the variables required we can enter the scope, otherwise, we can kick them out until their query is formatted correctly. Having lots of variables may become problematic so you may want to use POST or even break them out into subsections to give users a better understanding of their error. I should add this only works for PHP 5.6 and above.
Hello again, this is the second in a series of my home network posts. In this edition, we’re going to be flashing another router with OpenWrt. You can read part one here.
I decided it was time to leave all the old hardware behind and move to brand new stuff. I was having problems with the ZYXEL VMG8924-B10A as the main router, it kept cutting out and was causing short minute outages that ultimately I think was due to the system running out of ram and botnets trying to break into the thing. So I decided it was time to jump ship and move to something a little bit more enterprise. At the same time, I decided now would also be a good time to leave the Netgear WNR3500L V2 to one side. Despite it serving us good for many years, its routing features won’t be necessary for the upgrade as I want to have a good crack at managed switching.
The new network
The new network is composed with the following,
A Ubiquiti EdgeRouter X
A Netgear ProSafe GS108T
A new to me MR33
I wanted to do away with having two routers on the network, it wasn’t neccisary and caused some of the upstairs equipment to be inaccessible from downstairs, the new configuration would mean that all management would be done through the EdgeRouter X which would be much cleaner and hopefully faster.
The ProSafe GS108T was a garage find, I wasn’t using it for anything and I hadn’t really implemented proper VLAN tagging before so I thought now was a better time than ever to get into it.
My new home network diagram, ignore the fact its all Ubiquiti gear, its the iconography I had loaded at the time. And I couldn’t quickly find icons for Netgear.
I also received a new to me MR33 complete with Meraki OS. Unfortunately their licencing of their hardware is not something that aligns with my principals on hardware so before we accept any software agreements I thought it best to do as always and flash OpenWRT to the thing and say goodbye to Meraki. Flashing OpenWRT onto it was no easy feat but I made sure the thing never saw access to the internet and eventually I was in.
[aidan@aidan-ld mr33]$ ssh [email protected]
BusyBox v1.28.3 () built-in shell (ash)
_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
-----------------------------------------------------
OpenWrt 18.06.1, r7258-5eb055306f
-----------------------------------------------------
=== WARNING! =====================================
There is no root password defined on this device!
Use the "passwd" command to set up a new password
in order to prevent unauthorized SSH logins.
--------------------------------------------------
root@OpenWrt:~#
root@OpenWrt:~# exit
Connection to 192.168.1.1 closed.
[aidan@aidan-ld mr33]$
A couple of configuration changes later and we’ve got a dumb ap ready for deployment.
I really wanted to play with subnets this time, before we had two but this time I thought go hard or go home, so in total there are five subnets on my home network now, that’s enough IP space on the 192 network for 1200 devices. I’ve refrained from using the 10.0.0.0/16 network class simply because I use some VPNs with the same IP space so I thought best to just keep it simple. I have to say the Ubiquiti EdgeRouter X was a little bit new to me but I like the interface, PoE was a particularly nice touch.
For the Netgear switch the plan is to take a trunked VLAN ethernet cable and have the VLAN20 on the first 7 ports and leave the remaining 8th port for the MR18. Setting it up was quite easy using the online wizard however the visualisation thingy was clearly older than useful because it seemed to use some java applet that chrome did not like.
A Little Conclusion
I like what I’ve got set up now and will probably leave it for some time. The ZYXEL VMG8924-B10A is destined for the bin but the Netgear WNR3500L V2 I’ll keep for now, it can do VLANs and probably would have worked fine, I just wanted to use a managed switch.
The new network is great. I have a printer which its driver doesn’t seem to like cross-lan communication because every time I print something, it prints fine but the software client continually reports that the communication with the printer failed. I put that down to poor software testing I guess. Wouldn’t be the first time someone had printer woes.
EdgeRouter Dashboard
Subnet
Purpose
192.168.1.0/24
Downstairs Wired (eth1)
192.168.2.0/24
Upstairs Wired (eth2.20)
192.168.3.0/24
Downstairs Wireless AP Clients (eth3)
192.168.4.0/24
Upstairs Wireless AP Clients (eth2.40)
192.168.5.0/24
4th port on router, only a printer attached.(eth4)
Because my time at university is ending I thought it best to archive the canvas pages available to me for later reference should I not be able to access canvas later if they change platforms or disable my account. I should probably add this is for archival purposes and I will not be able to share the data I was able to collect. Thankfully I was able to get the whole thing going in a few minutes and downloading took a lot longer.
The first snippet I got from here, didn’t complete the first time, it seemed some image was causing issues so I moved to another gist, at this rate we could be done in half an hour 😊.
Unfortunately it also borked out on a similar place,
FileNotFoundError
I think it is because there’s something missing or I don’t have access to it. But the real problem is that its downloading content for a course I didn’t care about because I was enrolled in it but it’s full of junk I’m not interested in, so we can remove it by using the second scrapers code and specifying the course id’s which I had to manually go through, there was about 15 of them but it didn’t take too long. Which gave me the full command.
The access token you can see above should be expired by now. You can do it yourself by downloading the same file and installing python3, pathvalidate and pycanvas. You need to generate a security token from
/profile/settings
and you can get the course id by clicking on the course like this
/courses/56149
. When you generate a new token you should receive an email about it.
Canvas online with our starred modules displated.
I decided to make a small adaptation to catch the FileNotFoundError and went off to the races. It took over an hour so I decided it was best to leave it running overnight, when I returned in the morning I had 116 errors (failed downloads) and the rest is the course content!
Our Canvas Modules saved to Windows File Explorer.
Unfortunately I don’t seem to have the submissions for each of these courses so I needed to manually download them aswell and then our archive was completed.
I thought its time I put my GNUCash Data to good use and worked out how much I spent on fuel. I loaded up a simple Cash Flow bar chart in GNUCash and selected my expenses column for Car>Petrol and voila.
Monthly petrol costs since 2017, highest at £167, lowest £10. Apparently I did not buy any petrol in July – Also checked this. Total expenses from 01/01/2017-01/01/2020 £2,659.79.
If you are astute you may have also noticed there are additional ‘fixed’ (varies annually/monthly) costs to running a car such as tax, insurance, maintenance and depreciation but I have chosen to eliminate these costs because I would like to explore the benefits of buying another car. We can use this graph based on the last 3 years to estimate this car, my 1998-1999 Vauxhall Corsa costs £73.88 monthly (excluding this month from the data)
My Car
So How far does £74/month get you?
Good Question, I’ve always used my car when I’ve needed it. I have little reason not to use it. I’ve used it to commute to University, School and Work and on days out. It’s my main mode of transport is what I’m trying to say.
Unfortunately, I don’t keep the history of my car’s odometer, however, I can use the mot history of my car to estimate the £/per mile. Using the mot history, which has the date my car was taken in for MOT for two different dates recorded in the MOT history, one in 2017 and one in 2019, we can determine in that time I did 19,205 miles so roughly 6.66k miles a year.
We can then use this 19,205 miles, which have around 1 year, 11 months between them to get (74*23) £1,702 expenditure during that time, which compared with the actual data gives £2,051.23 (over £300 diff, 21%) gives us a fairly low confidence, however we can use this to estimate my cars cost per mile on fuel alone is around £0.106 per mile. 10p per mile (2051.23/19205) or 740 miles per month, give or take 20%. That’s 24 miles per day!
Thought I’d post a quick one because I was bored. It uses Visual Studio 2019, WPF and that’s it. There’s very little business logic behind the whole thing.
🙂
TTFN, I don’t live in Dewsbury. I don’t even think I’ve been there.
I thought I’d share pictures I took when I took apart a 250GB dead hard drive.
Rest in pieces my WD2500AAKX
I got this hard drive as part of a Dell Optiplex 780 and used it as a server for my internal network. It worked great until it wouldn’t boot. I checked on it and sure enough, it was stuck in ubuntu server boot recovery. I tried to recover it but I think I did more damage than good. I decided to move to a Windows computer and tried to recover the data with Recuva which didn’t do anything because it couldn’t pick up the disk, so then I moved to TestDisk which was able to see the drive and partitions but never got past profiling the disk. So then I decided to take it apart.
The hard drive in the Dell Optiplex 780
First I unscrewed all the screws, there is another screw holding the read/write head under the label.
After that I took it apart a little more, it has one platter internally and one big old magnet which I kept.
Well, I’ve let the magic smoke out now.
Interestingly there seems to be a metal piece on the bottom and side of the hard drive which I think is for easy destruction. CrystalDiskInfo said it had 29202 hours on it and 2875 power ons, nearly exactly the same as my ST2000DM001-1CH164 T2B hard drive. The smart data also had warnings for its Reallocated Sectors Count.
I have a long standing interest in monitoring my daily doings, I previously thought about putting a GPS tracker in my car, a good idea for both tracking my position and also checking to see if it has gone walkies (is stolen). I decided against doing this a while ago due to exams and lack of time to set the whole thing up. But I did decide to have a crack at this idea later with my phone.
The way I chose to go about this power hungry task was to use an app like IFTTT to record my position to a spreadsheet. But then I heard about owntracks, a purpose-built app for tracking your position. After setting up the owntracks server, MQTT and owntracks recorder. I now have a pretty good way of determining where I am at one time or another and have been using it for about 6 months.
My phone is a OnePlus 3 and as I said the app is fairly power hungry. Currently owntracks uses ~39% of my battery’s capacity based on 1 day 1 hour uptime. Although this seems fairly high I have accepted it as a fair compromise untill I can finish another GPS project I have in the works.
Here’s my experience of such a setup so far,
Battery usage increased significantly to a point where some users may not find it acceptable.
I had to turn off battery optimization and advanced battery optimization or else the app would stop.
The app does not always capture my location all of the time, sometimes it may be a few hours before it reports a significant change despite being in move monitoring mode or significant changes mode.
The performance and recording of positions in the app isn’t as good if the app does not have internet access all the time, so if data is switched off in my phone, the recording of the position isn’t as good as if it were on all the time, sometimes there can be large gaps where there was no internet access where it drops out.
My use case was for later analysis of the data, not realtime.
Owntracks recorder is not very featured but it does the job.