Add most site content
This commit is contained in:
parent
9aa156732c
commit
ff517a8c73
18 changed files with 409 additions and 5 deletions
|
@ -1,4 +1,7 @@
|
|||
---
|
||||
title: About
|
||||
---
|
||||
example about content
|
||||
|
||||
In the interest of privacy, there's very little personal information here.
|
||||
|
||||
The information that is here is either not personal enough to bother protecting, or has been selectively chosen as nothing bad.
|
||||
|
|
20
content/college/student-server.md
Normal file
20
content/college/student-server.md
Normal file
|
@ -0,0 +1,20 @@
|
|||
---
|
||||
title: Student Server
|
||||
subtitle: The college needed a server, but didn't have any server admins
|
||||
---
|
||||
|
||||
When I was in college, we needed a server for computing students to learn how to use FTP, and script on a server using python CGI and [PHP](http://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/#an-analogy), as well as possibly for some students coursework.
|
||||
Fortunately, the college already had one, running the IT students microsite for extra course information. The problem was that it was rather out of date, and no one really new how to use it. It was up to me and my friend Alex to bring the server up to date, and get it ready for the students who needed it.
|
||||
|
||||
The original plan was to update the server's OS (at that stage running Ubuntu 12.04 LTS), install python and [PHP](http://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/#an-analogy) backends, add student users, and then make sure they couldn't edit each others documents. In the end, because we had no idea how the server worked, because it was setup a long time ago, we decided it was just easier to backup what we needed, then do a complete fresh install. Meaning we could set things up exactly how we wanted them, and install the tools we needed.
|
||||
|
||||
## User Creation
|
||||
I knew we would need user accounts for all the computing teachers and the students doing A2 computing. I wasn't expecting that to amount to over 50 user accounts. Fortunately Alex had started writing a basic script for this, which I quickly modified to permission their home directories and setup passwords.
|
||||
|
||||
The basis of the script was to load information about the users from a database I had created (by hand) with all the required students in, create users based on this information, and configure the permissions for the user and their home directory. The script also allowed for manual entering of users with the same permission template, in case single users needed to be created. An additional feature that I added which has proved useful now that I've left is the ability to delete users manually, and from that original database, to make sure that no student will have access to the server once they have left, well, other than me that is!
|
||||
|
||||
### The script
|
||||
Because a lot of the accounts are still active, and that new user accounts are being created in the same way the exact script cannot be shown, for security reasons.
|
||||
|
||||
## What next?
|
||||
Now that I've left college, I've passed on the server to other people, although I do still have an account. From what I hear, fewer students are using the server. However, they have made the microsite look infinitely better!
|
16
content/college/wall-of-sheep.md
Normal file
16
content/college/wall-of-sheep.md
Normal file
|
@ -0,0 +1,16 @@
|
|||
---
|
||||
title: Wall of Sheep
|
||||
subtitle: Hacking is fun!
|
||||
---
|
||||
|
||||
Personally, I dislike being limited by technology. If there's a system in place like a proxy filter, network restrictions, or even any remote control software, I just have to try and break through it or work around it.
|
||||
|
||||
Throughout my time there, I was able to break through many parts of their network, mostly the sections involving keeping us students on task. The hardest part of this was doing it in such a way that it couldn't be traced back to me, just in case they didn't appreciate me _testing_ their systems. Whilst I don't condone doing this, it is certainly a lot of fun, and I learnt a whole lot through it. To this day, they still have no idea I did any of it, unless they're reading this, in which case, __Hi__!
|
||||
|
||||
|
||||
<!--- make this dynamic at some point! -->
|
||||
|
||||
## College Sheep
|
||||
|
||||
#### [LanSchool](/wall-of-sheep/LanSchool/)
|
||||
The tool of choice of my college to monitor students usage of computers. Turns out it's not particularly robust!
|
|
@ -1,4 +0,0 @@
|
|||
---
|
||||
title: Test
|
||||
---
|
||||
test content
|
44
content/posts/protonmail-replace-your-email.md
Normal file
44
content/posts/protonmail-replace-your-email.md
Normal file
|
@ -0,0 +1,44 @@
|
|||
---
|
||||
title: ProtonMail - Can it replace your email provider?
|
||||
date: 2016-06-28
|
||||
image: https://protonmail.com/images/main-banner.jpg
|
||||
subtitle: Incredibly secure, easy to use, but are it's trade-offs worth it?
|
||||
---
|
||||
|
||||
Throughout my life, I've had many different email providers, starting with hotmail almost 10 years ago. In more recent years, I've been focusing more on ways I can secure my emails. No, I may not have anything to hide, but that doesn't mean I don't want the information I to have to be accessible easily.
|
||||
|
||||
Originally I thought the best way to keep things secure, and out of the hands of any government body was to host it all myself. This came with a number of problems, mostly due to my lack of experience running anything like this, which lead to problems with my spam filter blocking legitimate emails, and any emails I did send ending up in their spam folder. It was after this I decided to look into hosted options, I'm happy to pay money to have someone else look after the email servers for me, even if that's at the cost of using another companies infrastructure.
|
||||
|
||||
After searching around for a while, I stumbled on a company called _ProtonMail_, who claimed to be the most secure email host ever. Reading into the technologies they use, and watching one of their team members on a TED talk, I realised they weren't lying, their platform really was secure!
|
||||
|
||||
ProtonMail use a combination of open-source technologies, a closed-access platform, and swiss data centers to protect emails better than anyone else! The only way you can access your emails is by using their custom apps for Android, iOS, and web. Whilst this is annoying, it does mean the system isn't accessible through conventional protocols such as IMAP and POP3, which would considerably lower the security. The web portal itself is entirely open-source, and highly encourages any contributions, which should help make the platform even more secure, and help pump out features fast.
|
||||
|
||||
Back in April, I signed up to ProtonMail's _Plus_ tier, and switched all my domains to use their servers as an email provider. The setup process itself was incredibly simple, it showed you every DNS record you needed to create, so all you had to do was copy-paste! It also showed you extra records you could add to aid the security of your emails, and protect against people sending out emails using your domain, including DKIM signatures, and SPF records.
|
||||
|
||||
|
||||
### The Problems
|
||||
|
||||
When I first started using ProtonMail, before I committed, I knew there were a lot of features missing, but I thought I wouldn't need these. Now my email traffic has increased, I'm starting to find myself needing / wanting these features more and more.
|
||||
|
||||
Now, 3 months on, I'm starting to get a little annoyed at ProtonMail, mainly at their lack of features. Yes the security is great, really great, but the fact I have to open a website and login every time I want to check my emails is a little tiring, and their mobile app, whilst fully functional and capable of the basics, has some bugs had glitches out sometimes.
|
||||
|
||||
Another problem is the lack of basic features. Whilst the client does have labels, and _'+ aliases'_, both of which are great features for those like me that like to keep things organised. The platform is missing out on some other key features, like:
|
||||
|
||||
- Custom message filter (currently in beta)
|
||||
- IMAP / POP3 support, for external clients
|
||||
- Custom PGP certificates
|
||||
- Quick folder filters (see only unread...)
|
||||
- Reading your emails offline (even through the mobile app)
|
||||
|
||||
|
||||
These problems are taken for granted in most other mail platform, but because ProtonMail is built from the ground up, and is still a reasonably new product, it's missing a lot of these key features. I have no doubt that eventually, they will have all these features and more, but in the mean time, because I want these features now, I think it's time to look into another platform.
|
||||
|
||||
## _"Didn't you just waste your money?"_
|
||||
|
||||
Yes, this does mean I've paid for a service I'm technically no longer using. Which does annoy me, but considering it'll be used to help out the platform in the future, and I have every intention of switching back once it's got all the features I need, I can live with it.
|
||||
|
||||
## Next Steps
|
||||
After looking around the internet for a suitable replacement, I settled on [FastMail](https://fastmail.com/?STKI=14665249) for a while, so I could get all the features I actually need, unfortunately sacrificing security.
|
||||
|
||||
##### __Update__
|
||||
After being with [FastMail](https://fastmail.com/?STKI=14665249) now for almost a year, I'm moving back to ProtonMail. All issues listed above have now been fixed, and IMAP / SMTP support is currently in closed beta! I can finally have my security back!
|
17
content/posts/react-native-intro-dev-meeting.md
Normal file
17
content/posts/react-native-intro-dev-meeting.md
Normal file
|
@ -0,0 +1,17 @@
|
|||
---
|
||||
title: React-Native intro dev meeting
|
||||
date: 2016-03-16
|
||||
subtitle: Introducing React-Native to the rest of the office
|
||||
---
|
||||
|
||||
Recently, at DabApps, we've been migrating our mobile app workflow over to using [react-native](https://facebook.github.io/react-native/) rather than [Ionic](http://ionicframework.com/), mainly because of its near native performance. For the first few projects, there were only a couple of us that knew how to use React Native effectively, and work around the _qwerks_ it has. With the number of app projects growing, we needed to get more people up to speed with the react native workflow, as quickly as possible.
|
||||
|
||||
The workflow that we needed to adopt to use react native is an odd one. To keep the quality of our code at the highest possible, whilst keeping the codebase as maintainable as possible. The workflow we use was created by 4 of us, through experiences with both work and personal projects using the framework, and it works rather well. The only problem was that only 4 of us actually knew it.
|
||||
|
||||
After a colleague wanted to know more about react-native, and with a couple of potential app projects on the horizon, I set about creating a talk for our (_usually_) bi-weekly dev meetings, With the aim of trying to get everyone up to speed all in 1 go.
|
||||
|
||||
The slides from my talk are available on my [GitHub](https://github.com/RealOrangeOne/react-native-intro-dev-meeting) page, and whilst they are primarily relevant to our workflow, I hope they will be able to help anyone else looking to get started with React Native.
|
||||
|
||||
React Native is a tricky platform to get started on, but once you understand the _qwerks_, I believe it truly is the future of cross-platform mobile development!
|
||||
|
||||
[Click here to view the slides](http://realorangeone.github.io/react-native-intro-dev-meeting/)
|
33
content/posts/security-month-2016.md
Normal file
33
content/posts/security-month-2016.md
Normal file
|
@ -0,0 +1,33 @@
|
|||
---
|
||||
title: Cyber Security Month 2016
|
||||
date: 2016-10-01
|
||||
subtitle: The best time to upgrade the security on my projects!
|
||||
---
|
||||
|
||||
As it's [Cyber Security Month](https://cybersecuritymonth.eu/), now's the perfect time to work on improving the security on my websites, projects, and servers. But, upgrading them for now isn't good enough for me, I want to add a way of scanning projects automatically during unit tests, to check for any new vulnerabilities.
|
||||
|
||||
As most of my projects revolve around NodeJS and Python, these are the languages I'll be concentrating on.
|
||||
|
||||
## Express Server
|
||||
Express is one the most popular JS servers, and fortunately, they have a [security guide](http://expressjs.com/en/advanced/best-practice-security.html), that contains some of best ways to write secure servers. One of the best and simplest ways is to add the [helmet](https://www.npmjs.com/package/helmet) middleware, which contains various other middleware that drastically increase security. It's incredibly easy to add too, at just 3 lines of change, [like this](https://github.com/RealOrangeOne/host-container/commit/90adfd04aed2f2065d803623c297dc1a8ae71632)!
|
||||
|
||||
You can use [securityheaders.io](http://securityheaders.io/) to check if any headers are being sent by your server that shouldn't be, As well as see how you can improve.
|
||||
|
||||
## NodeJS Dependencies
|
||||
One of the easiest ways to keep secure is make sure your dependencies are secure. If your code is secure, but one of your dependencies isn't, it's a waste! Fortunately there's a tool to check this, [nsp](https://www.npmjs.com/package/nsp). It checks the [Node Security Project](https://nodesecurity.io/) for known vulnerabilities in your dependencies, and reports them.
|
||||
|
||||
If you don't want to add `nsp` to your dependencies, they offer a [CI service for GitHub](https://nodesecurity.io/#pricing) which will run the checks for you on their own servers.
|
||||
|
||||
### Checking for updates
|
||||
Keeping dependencies up to date is generally a good thing, and likely to help with the above. Upload you `package.json` to [npm.click](http://npm.click/), and it'll tell you what's out of date, and what the most recent version is!
|
||||
|
||||
## Python Code
|
||||
Any of the projects I work on that are more advance that a simple static server, are probably Django, written in Python. Checking the python code itself is nice and simple thanks to [bandit](https://github.com/openstack/bandit). It checks your code to make sure you're writing it properly, and are catching errors.
|
||||
|
||||
### Dependencies?
|
||||
As with NodeJS, there's a tool that checks dependencies for security issues. But, unlike `nsp`, [safety](https://pypi.python.org/pypi/safety) not only checks your dependencies, but also their dependencies.
|
||||
|
||||
It's also possible to check for updates using [pypiup](https://pypi.python.org/pypi/pypiup/). Working in much the same way as npm.click (and written by the same person), except it's a CLI rather than a website.
|
||||
|
||||
## Checking
|
||||
To check your hard work has made a difference, [seositecheckup](http://seositecheckup.com/) contains a helpful section on security, as well as the previously mentioned [securityheaders.io](http://securityheaders.io/). I've enabled these tricks on my website, and you can see their results here for [securityheaders.io](https://securityheaders.io/?q=https%3A%2F%2Ftheorangeone.net&followRedirects=on) and [seositecheckup](http://seositecheckup.com/seo-audit/theorangeone.net).
|
50
content/posts/steam-igpu-linux.md
Normal file
50
content/posts/steam-igpu-linux.md
Normal file
|
@ -0,0 +1,50 @@
|
|||
---
|
||||
title: Fix steam under linux with an iGPU
|
||||
subtitle: Fixing "`libGL error failed to load driver i965`"
|
||||
---
|
||||
|
||||
Running steam on linux is great, besides for the game support obviously. But running it on an iGPU has recently been causing me problems, mainly under Arch.
|
||||
|
||||
## Stacktrace:
|
||||
```
|
||||
jake@***:~$ steam
|
||||
~/.local/share/Steam/steam.sh: line 154: VERSION_ID: unbound variable
|
||||
~/.local/share/Steam/steam.sh: line 154: VERSION_ID: unbound variable
|
||||
Running Steam on antergos 64-bit
|
||||
~/.local/share/Steam/steam.sh: line 154: VERSION_ID: unbound variable
|
||||
STEAM_RUNTIME is enabled automatically
|
||||
Installing breakpad exception handler for appid(steam)/version(1468023329)
|
||||
libGL error: unable to load driver: i965_dri.so
|
||||
libGL error: driver pointer missing
|
||||
libGL error: failed to load driver: i965
|
||||
libGL error: unable to load driver: i965_dri.so
|
||||
libGL error: driver pointer missing
|
||||
libGL error: failed to load driver: i965
|
||||
libGL error: unable to load driver: swrast_dri.so
|
||||
libGL error: failed to load driver: swrast
|
||||
```
|
||||
|
||||
## The solution
|
||||
I have no idea why it works, or why it works, but speaking to some people online, this is the best solution:
|
||||
|
||||
```bash
|
||||
LD_PRELOAD='/usr/$LIB/libstdc++.so.6 /usr/$LIB/libgcc_s.so.1 /usr/$LIB/libxcb.so.1 /usr/$LIB/libgpg-error.so' /usr/bin/steam %U
|
||||
```
|
||||
|
||||
I have no idea why it works, but it works perfectly for me! Steam client runs with no problems.
|
||||
|
||||
```
|
||||
jake@***:~$ LD_PRELOAD='/usr/$LIB/libstdc++.so.6 /usr/$LIB/libgcc_s.so.1 /usr/$LIB/libxcb.so.1 /usr/$LIB/libgpg-error.so' /usr/bin/steam %U
|
||||
~/.local/share/Steam/steam.sh: line 154: VERSION_ID: unbound variable
|
||||
~/.local/share/Steam/steam.sh: line 154: VERSION_ID: unbound variable
|
||||
Running Steam on antergos 64-bit
|
||||
~/.local/share/Steam/steam.sh: line 154: VERSION_ID: unbound variable
|
||||
STEAM_RUNTIME is enabled automatically
|
||||
Installing breakpad exception handler for appid(steam)/version(1468023329)
|
||||
```
|
||||
|
||||
Unfortunately, it doesn't seem to work if you add it to the `steam.desktop` file, for reasons I don't quite understand. But, just edit `/usr/bin/steam` to include the variable, and that works perfectly!
|
||||
|
||||
```bash
|
||||
export LD_PRELOAD='/usr/$LIB/libstdc++.so.6 /usr/$LIB/libgcc_s.so.1 /usr/$LIB/libxcb.so.1 /usr/$LIB/libgpg-error.so'
|
||||
```
|
15
content/projects/astrill-extractor.md
Normal file
15
content/projects/astrill-extractor.md
Normal file
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
title: Astrill Extractor
|
||||
repo: https://gist.github.com/RealOrangeOne/050da86871fb952ba7bfe97eece8555c
|
||||
---
|
||||
|
||||
Astrill, my VPN of choice, allows you to export OpenVPN config files for all it's VPNs, allowing you to connect on platforms it doesn't provide clients for, which albeit isn't many. The AUR package `astrill` has started becoming really unstable on my machine recently, so I decided to switch it out for `ovpn` files, as gnome has excellent support for OpenVPN.
|
||||
|
||||
The export step is really simple, you just login to the web portal, create an entry for your machine, and export the config files. Their tutorial for this can be found [here](http://wiki.astrill.com/index.php/Astrill_Setup_Manual:How_to_configure_OpenVPN_with_Network_Manager_on_Linux). The only problem is that some applications won't accept the certificates embedded into the file like astrill provide. (Gnome does, but I only realised that whilst writing this).
|
||||
|
||||
<script src="https://gist.github.com/RealOrangeOne/050da86871fb952ba7bfe97eece8555c.js"></script>
|
||||
|
||||
The above script will split out the files and save them into separate directories for each config file. These files can then be imported and used in an openvpn-compatable application.
|
||||
|
||||
### Is it even needed?
|
||||
Certain network managers do support importing `.ovpn` files directly, and sets everything up for you, including the files for the keys etc, without needing to extract them before. Gnome's `network-manager` does this. This does make my script useless to me, but hopefully someone will find it useful!
|
14
content/projects/attack-on-blocks.md
Normal file
14
content/projects/attack-on-blocks.md
Normal file
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
title: Attack on blocks game
|
||||
repo: https://github.com/RealOrangeOne/attack-on-blocks/
|
||||
download_link: https://github.com/RealOrangeOne/attack-on-blocks/archive/master.zip
|
||||
---
|
||||
|
||||
Attack on Blocks is a space invaders style game I wrote for my IT coursework, for the games development unit. We could make any game we wanted, provided it could be done within the time limits, was very easy to play, and easily run on the college computers (which were pretty terrible).
|
||||
|
||||
I decided to write the game in Python, seeing as there were other people in the college that could help me bug report and test features, and because it was already installed on the college computers. I used PyGame for the game engine, because it's really simple to use, and there is a lot of support and documentation online.
|
||||
|
||||
## Easter Eggs
|
||||
One of the key features of this (and unfortunately the part I spent the most time on), is the easter eggs. There are a few dotted around the game, which make the game either much easier, or way more fun! At the moment, there are 3 main easter eggs, the first enabling the other 2. If you would like to know what they are, click the button below. If not, pay the game and try and find them, or search through the source to find them (it's not too hard through the source).
|
||||
|
||||
As you will see (If and when you find the easter eggs), most of them are completely useless, and completely unrelated to the game or anything else. The main reason they were put in was because I'm friends with people that pester to the point it's just easier to give in, hence they are really rather odd!
|
14
content/projects/bsod-enabler.md
Normal file
14
content/projects/bsod-enabler.md
Normal file
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
title: BSOD Enabler
|
||||
subtitle: Call a _Blue Screen of Death_ on demand! It's more fun than it sounds
|
||||
---
|
||||
|
||||
For those that use Windows, the famous [Blue Screen of Death](https://en.wikipedia.org/wiki/Blue_Screen_of_Death) is an annoyance that plagues computers, causing error, frustration, and even data loss. They happened to me a lot whilst I was trying to configure my computer, and I thought _I wonder who else I can annoy with one of these_...
|
||||
|
||||
__And thus the BSOD_Enabler was born!__
|
||||
|
||||
After researching into it for a while, it turns out that there are a few different ways to cause a BSOD, unfortunately most of which are the reason a BSOD is there in the first place, which could potentially damage the target machine, something I didn't want! Then I stumbled upon [this article](http://www.wikihow.com/Force-a-Blue-Screen-in-Windows), which shows that you can in fact raise a BSOD without causing any errors or damage to your computer.
|
||||
|
||||
Obviously there are many different ways, and probably far better ways of doing this, but I wanted something that was simple to use, fast, and could be done by anyone, no matter how technically illiterate. I decided to write it in C#, and use a windows console interface so the whole thing could be done with a few key presses.
|
||||
|
||||
Unfortunately I can't find the original source, or a copy of the executable. Once I find them, I'll update this post!
|
22
content/projects/dotfiles.md
Normal file
22
content/projects/dotfiles.md
Normal file
|
@ -0,0 +1,22 @@
|
|||
---
|
||||
title: My Dotfiles
|
||||
repo: https://github.com/RealOrangeOne/dotfiles/
|
||||
subtitle: How I set up my machines just the way I like them!
|
||||
---
|
||||
|
||||
### What are dotfiles?
|
||||
Dotfiles are a way for people to store settings and preferences to make setting up a new computer that much easier. I use both my laptop, desktop and work machine almost every day, and want them to be setup in an almost identical way.
|
||||
|
||||
Most people I've seen store their dotfiles on GitHub. This is a great solution as it's possible to add authentication before accessing them, and stores a complete version history. This solution doesn't really work for me, having to run `git pull` is just too much effort to update files!
|
||||
|
||||
## How I did it
|
||||
I used my nextcloud server to sync all my dotfiles between my devices, and then used symlinks to split out some of the files into the right locations. This means that changes can be updated live between machines
|
||||
|
||||
This worked brilliantly, config files were automatically synced as soon as I made a change, just as soon as they connected to a network.
|
||||
|
||||
After I got this all setup, I started committing the files to my GitHub too, so they could be publicly accessibly. I had to use the `.gitignore` to stop some parts being public like SSH config, but the rest is completely open!
|
||||
|
||||
### Atom
|
||||
The main problem was with atom packages, I had to manually store what packages were installed, then manually install them on the other machine from the saved file. This was made easier by `apm` allowing me to list them and automatically save it to a file, but it wasn't perfect.
|
||||
|
||||
Eventually, after looking into possible solutions, I came across the [`Sync settings`](https://atom.io/packages/sync-settings) package, which was the answer to my prayers! It saved all my config data for atom into [a gist](https://gist.github.com/RealOrangeOne/9f9a4dd799ad01aa0502a09f06cbf454/), which I could then backup and restore too from within the application. It also warned me when my local data was out of date from the remote, and prompt me to download the updated data.
|
17
content/projects/morse-code-decoder.md
Normal file
17
content/projects/morse-code-decoder.md
Normal file
|
@ -0,0 +1,17 @@
|
|||
---
|
||||
title: Morse code decoder
|
||||
repo: https://gist.github.com/RealOrangeOne/6dc94875c93b787e5834
|
||||
subtitle: A JSON file to help decode morse-code
|
||||
---
|
||||
|
||||
It's not often people need to decode text into morse code (and visa-versa), but if I had something like this when I needed to, it would have saved me hours of time!
|
||||
|
||||
I originally needed this for the [Student Robotics 2015](/robotics/2015/) entry, to convert a string message into morse code that would be transmitted using LEDs, for aesthetics and debugging. Unfortunately due to a fixed time frame, this idea was scraped before it could be fully implemented. However, the decoder worked perfectly!
|
||||
|
||||
## Usage
|
||||
|
||||
In order to make it accessible for as many people in as many different languages as possible, I converted our code from python to JSON. Just find a JSON library for your desired language, and it'll work perfectly!
|
||||
|
||||
The source of the library is on GitHub as a gist. I recommend downloading the file to use yourself, however for testing you can use GitHub's raw file as a hotlink.
|
||||
|
||||
<script src="https://gist.github.com/RealOrangeOne/6dc94875c93b787e5834.js"></script>
|
34
content/projects/wiki-game-solver.md
Normal file
34
content/projects/wiki-game-solver.md
Normal file
|
@ -0,0 +1,34 @@
|
|||
---
|
||||
title: Wiki Game solver
|
||||
repo: https://gist.github.com/RealOrangeOne/7da9a3dd1bf90ecdf7be
|
||||
subtitle: Simple script to win the Wiki Game
|
||||
---
|
||||
|
||||
[The Wiki Game](http://thewikigame.com) is an online game where you attempt to navigate through wikipedia from a start page to a goal page using as few other pages as possible.
|
||||
|
||||
Not long after I was shown the it, I realised that I _really_ wasn't very good at it. After about 15 minutes of coming in last place all the time, I started to wonder how it worked, and how I could beat it.
|
||||
|
||||
As it turns out, it really isn't very hard! It does require injecting some JS into the page, but it's not that much.
|
||||
|
||||
## Usage
|
||||
|
||||
1. Start a [new game](http://thewikigame.com/speed-race), __don't__ press start!
|
||||
2. Open your browser's developer console. This will vary from browser.
|
||||
3. Paste the compact version of the code (`wiki-game-solver.min.js`), and execute it (press enter)
|
||||
4. Congratulations, you just won!
|
||||
|
||||
|
||||
## How it works
|
||||
The game isn't open source, so I couldn't see how the back end worked, but after playing a few games and checking what happened on the page, I worked out what it was doing.
|
||||
|
||||
The game was won when the iframe was at the final page location, or at least a clone of it on their servers with some extra querystring information.
|
||||
|
||||
With this, I started to write something that would change the location of the iframe to the goal. Fortunately for me, the goal URL was on the page. So all it took was a little switcheroo to win!
|
||||
|
||||
### Source
|
||||
The source for this was written in pure JS, and relies heavily on the fact that the wiki game uses jQuery so I can plug into components and events really easily. The code can be found in the GitHub gists below. Both the standard and compact versions are available.
|
||||
|
||||
<script src="{{ article.repo }}.js"></script>
|
||||
|
||||
### Disclaimer
|
||||
As I experienced whilst developing this, the people that play Wiki Game don't tend to like people cheating. There were a lot of people getting very annoyed whilst I was developing and testing. So please use this at your own risk! At the moment I don't think there is any kind of banning system, but be warned!
|
30
content/projects/yoga-pal.md
Normal file
30
content/projects/yoga-pal.md
Normal file
|
@ -0,0 +1,30 @@
|
|||
---
|
||||
title: Yoga Pal
|
||||
repo: https://github.com/RealOrangeOne/yoga-pal
|
||||
subtitle: Control screen rotation, touch screen, and trackpad using the terminal
|
||||
---
|
||||
|
||||
Once I started work, I bought myself a _Lenovo Yoga 3 14"_ laptop, because I needed a thin and light laptop for trains and the office. This came with windows, which within 10 minutes was running Ubuntu Gnome! Ubuntu greatly increased the performance, but I had to sacrifice all the screen, touchpad and keyboard customisation when changing 'modes'.
|
||||
|
||||
I found [this thread](https://askubuntu.com/questions/450066/rotate-touchscreen-and-disable-the-touchpad-on-yoga-2-pro-in-rotated-mode) with someone else trying to find a solution to this, to find a nice way of rotating the screen when in tablet mode. On the thread was a really nice simple [script](https://askubuntu.com/a/485685/432138) that rotated the screen perfectly, and did the touchscreen too.
|
||||
|
||||
This script worked great, doing exactly what it said it did, nicely and quickly, however it wasn't a great solution for me. Yes it worked, but it didn't allow me to change anything else, like the touchpad.
|
||||
|
||||
So I wrote my own CLI, based off the above script, that would allow me to tweak everything, so the laptop can be used as it was intended. With a simple command, I could swap the _mode_ of the laptop to match how I was using it.
|
||||
|
||||
eg:
|
||||
|
||||
```bash
|
||||
$ yoga mode tablet # Set to tablet mode
|
||||
$ yoga mode laptop # Reset to laptop mode
|
||||
```
|
||||
|
||||
After writing this, It ended up finding an accidental usage. The touchscreen started glitching out, causing ghost presses on the screen, making the mouse move all over the screen and switch focus all over the place. Fortunately, I'd already written a command to disable the touch screen and prevent this:
|
||||
|
||||
```bash
|
||||
$ yoga disable touch
|
||||
```
|
||||
|
||||
Problem solved!
|
||||
|
||||
Whilst I've only tested this on my laptop, there's no reason it shouldn't work on others too! If it doesn't, submit an [issue]({{ article.repo }}/issues/)!
|
30
content/setup/desktop.md
Normal file
30
content/setup/desktop.md
Normal file
|
@ -0,0 +1,30 @@
|
|||
---
|
||||
title: Desktop
|
||||
image: /static/img/header.jpg
|
||||
---
|
||||
|
||||
|
||||
My setup is everything, I use my computer at least once a day to browse the internet, work on projects, even update this website, so it's very important that everything works perfectly and the fastest it can. Obviously this machine is probably a little too powerful for someone that does almost primarily web development, but it means when I want to do things like video editing, 3D modelling, or anything else that would require a high end computer, I can, because my computer is equipped to handle it.
|
||||
|
||||
Over the years, my setup has evolved from a single monitor i5 machine, to a triple monitor AMD FX-based monster of a computer.
|
||||
|
||||
##### [Current Parts list]()
|
||||
|
||||
### Next Generation
|
||||
|
||||
I've been using the current generation for around 5 years now, and it's worked perfectly for all of this. The main reason I'm upgrading is to get more features, The 990FX chipset is very old, and my motherboard is missing a few key features, such as dynamic fan control.
|
||||
|
||||
The next generation of my build isn't actually a thing yet, but I'm actively working on what it's going to look like and the components inside it. You can find the current parts list at the link below, the list is always changing.
|
||||
|
||||
##### [Next-Gen Parts List]()
|
||||
|
||||
#### OS
|
||||
I use Arch Linux on all my machines now, But some days I miss my windows-only applications and games, so I plan to use a virtual machine running windows, with a graphics card hardware pass-through to it to run windows applications, and play windows-only games. I got the idea for doing this from this amazing [video](https://www.youtube.com/watch?v=16dbAUrtMX4).
|
||||
|
||||
## Previous Generations
|
||||
|
||||
The first generation was the first custom build I'd ever done. When I first built it, I wasn't really into gaming, or any kind of heavy workflow for that matter, so it wasn't particularly powerful, although compared to my old [Dell Inspiron 1525](http://www.pcworld.com/product/31104/dell-inspiron-1525.html), it was pretty damn incredible!
|
||||
|
||||
You can find the full list of parts over on the PCPartPicker link below. Unfortunately due to the lack of catalog, or bad memory on my part, not all the parts are there, but there are as many as possible.
|
||||
|
||||
##### [Previous Parts List]()
|
7
content/setup/public.md
Normal file
7
content/setup/public.md
Normal file
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
title: Public web server
|
||||
---
|
||||
|
||||
My public server one of the VMs on my dedicated server. This VM actually runs [Dokku](http://dokku.viewdocs.io/dokku/), allowing me to easily deploy applications no matter what they're written in! There are currently several containers running on this server, some public websites, some applications just for me to use.
|
||||
|
||||
The best feature of [Dokku](http://dokku.viewdocs.io/dokku/) is the easy integration with [LetsEncrypt](https://letsencrypt.org/), so I can easily add https connection to applications, even if they don't natively support it!
|
42
content/wall-of-sheep/LanSchool.md
Normal file
42
content/wall-of-sheep/LanSchool.md
Normal file
|
@ -0,0 +1,42 @@
|
|||
---
|
||||
title: LanSchool
|
||||
subtitle: The tool of choice of my college to monitor students usage of computers. Turns out it's not particularly secure!
|
||||
---
|
||||
|
||||
LanSchool was the software of choice for my college to monitor and control computer usage. It allows teachers to see students screens, interact with them, and even block certain functionality like the internet and removable storage.
|
||||
|
||||
By far the worst feature of LanSchool was the screen blocking. At will, a teacher could show an overlay on your screen, usually consisting of test saying _"Eyes front"_ etc. There was no way to hide this product, it just appeared suddenly and forced you to stop using your computer.
|
||||
|
||||
Within a few weeks, A friend of mine discovered how to get around it in a really primitive way: just unplugging the ethernet. It's rather incredible this worked, but it had some problems:
|
||||
|
||||
- It took around 10 seconds after disconnect before the screen was restored, not a major problem, but still annoying.
|
||||
- With all documents and programs bring stored on the network, you couldn't access any programs and documents you didn't already have open.
|
||||
- When you reconnect the cable, the screen returns to the state of everyone else.
|
||||
- Your computer would suddenly disappear from the list of machines on the teachers screen. If they were observant, they'd notice!
|
||||
|
||||
This solution worked, but wasn't ideal. Another solution was to log out (using the `ctrl + alt + delete` shortcut, which still worked for some reason), and log in again. Our network was slow, so sometimes it wasn't worth the wait if your screens were only disabled for a short period of time. However the main issue was that it didn't always work, only around 30% of the time.
|
||||
|
||||
#### The best fix
|
||||
|
||||
The original idea for this came from someone else, but the implementation and refinement was mine, so I like to think it was mostly me.
|
||||
|
||||
Using an ubuntu live CD loaded onto a USB drive, we booted to ubuntu, and renamed the LanSchool executable. This meant the program wouldn't be able to run on start up, and so the client couldn't communicate with the teacher to lock our computers. __Result!__
|
||||
|
||||
This method worked almost perfectly, however had a few problems:
|
||||
- It took at least 10 minutes to go from completely enabled, to completely disabled
|
||||
- It worked for every user account on that computer, so it had to be done on each computer I used.
|
||||
- A teacher would notice, as you would never show up on their list.
|
||||
|
||||
Fortunately this last point is a non-issue, as usually the teachers put it down to the software messing up, not a student breaking it intentionally. Another key problem with this is that it's rather obvious when everyone else's is disabled.
|
||||
|
||||
#### The silver lining
|
||||
|
||||
Disabling the client on a machine also allowed for another feature that I had never thought of, but was by far the greatest feature of disabling LanSchool: __Teacher Mode!__
|
||||
|
||||
Due to me being able to have access to a teachers computer one evening, I was able to copy the executables for the teachers console onto a USB drive, and then run them later on my computer. Obviously I know most software won't work in this way, but I'm so glad this one did!
|
||||
|
||||
Now, I had access to everything the teacher did, which made lessons much more exciting. I could block peoples screens, send them messages, or even take complete control of their computer, it was great! Eventually a few more in my class knew [I had the power](), and I became a tool for trolling people, which was made extra simple by the fact I had access to all student computers in the college, not just my class. The only downside to this (something I didn't realise until I tried to prank a friend), is that it comes up with your name on the client computer if you try and take control of one that's not in your class, an annoying and dangerous feature.
|
||||
|
||||
#### Phase 2
|
||||
|
||||
While writing this, over 2 years after leaving, I realised I could improve it considerably. Writing some kind of wrapper program, to detect my username, and run LanSchool for users other than me, would be harder to work out there was a problem with the computer, as well as prevent it disabling LanSchool for every user.
|
Loading…
Reference in a new issue