Rewrite a large amount of content
This commit is contained in:
parent
d5d7908901
commit
ae0d55daf2
12 changed files with 49 additions and 50 deletions
|
@ -4,3 +4,6 @@ index:
|
||||||
|
|
||||||
projects/hipchat-emoticons-for-all:
|
projects/hipchat-emoticons-for-all:
|
||||||
header_image: https://hipchat-magnolia-cdn.atlassian.com/assets/img/hipchat/hipchat_og_image.jpg
|
header_image: https://hipchat-magnolia-cdn.atlassian.com/assets/img/hipchat/hipchat_og_image.jpg
|
||||||
|
|
||||||
|
projects/yoga-pal:
|
||||||
|
header_image: http://www.lenovo.com/images/OneWebImages/SubSeries/gallery/laptops/IdeaPad-Yoga-13-Convertible-Laptop-PC-Clementine-Orange-Closed-Cover-View-gallery-940x529.jpg
|
||||||
|
|
|
@ -18,7 +18,7 @@ export default class NavBar extends React.Component {
|
||||||
</ul>
|
</ul>
|
||||||
<ul className="nav navbar-nav" id="navigation">
|
<ul className="nav navbar-nav" id="navigation">
|
||||||
<Dropdown title="Projects">
|
<Dropdown title="Projects">
|
||||||
<Item href="/projects/pithos/" icon="ion-social-freebsd-devil">Pithos</Item>
|
<Item href="/projects/yoga-pal/" icon="ion-laptop">Yoga Pal</Item>
|
||||||
<Item href="/projects/bsod-enabler/" icon="ion-ios-monitor">BSOD Enabler</Item>
|
<Item href="/projects/bsod-enabler/" icon="ion-ios-monitor">BSOD Enabler</Item>
|
||||||
<Item
|
<Item
|
||||||
href="/projects/hipchat-emoticons-for-all/"
|
href="/projects/hipchat-emoticons-for-all/"
|
||||||
|
|
|
@ -3,11 +3,6 @@
|
||||||
{% block pageTitle %}About all the things{% endblock %}
|
{% block pageTitle %}About all the things{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="container">
|
|
||||||
<p>
|
|
||||||
There are 2 parts to this, me and my website. Information for both of which can be found using the links below.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
|
|
|
@ -1,27 +0,0 @@
|
||||||
{% extends 'content_base.html' %}
|
|
||||||
|
|
||||||
{% block pageTitle %}About my website{% endblock %}
|
|
||||||
|
|
||||||
{% block content %}
|
|
||||||
<div class="container">
|
|
||||||
<p>
|
|
||||||
My website is the culmination of all my knowledge, compiled into 1 place. It not only contains all my projects, but it in itself is a project. Making sure this website works properly is a tall order, especially considering it's self hosted. And making sure that it stays secure is also important, as it contains a large amount of personal information.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="container">
|
|
||||||
<h3>The Website</h3>
|
|
||||||
<p>
|
|
||||||
The website itself is written in python, using Django, and a PostgreSQL database. Now obviously for what I need this is massivly overkill, but it means I can use the skills and shortcuts I learn at work to make a very fast and good looking website. It also means that if I ever want to expand and add new features, then with python running the back end, it's going to be very easy!
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
I went with the Django framework because it's what I work with at work, so I have a lot of contact with it, so exposure to bugs or clean ways to write things happen on a daily basis. I also chose it because it's written in python, one of my favourite languages, and one i'm highly fluent in. I chose PostgreSQL as a database engine because it's again what we use at work, and I already had some files preconfigured with the required config.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div class="container">
|
|
||||||
<h3>The server</h3>
|
|
||||||
<p>
|
|
||||||
The website is hosted on my UK VPS. More information about it can be found <a href="">here</a>.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
|
14
templates/about/website.md
Normal file
14
templates/about/website.md
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
# About my website
|
||||||
|
My website is the culmination of all my knowledge, compiled into 1 place. It not only contains all my projects, but it in itself is a project. Making sure this website works properly is a tall order, especially considering it's self hosted.
|
||||||
|
|
||||||
|
## The Website
|
||||||
|
The website itself is written in python, using the Django framework, and a SQLite database. For what I need it's more than overkill, but hey, why not!
|
||||||
|
|
||||||
|
I went with the Django framework because it's what I use with at work, as well as the fact it's simple, clean and easy. It also allows for some server side assets, eg blogging.
|
||||||
|
|
||||||
|
The only reason I have a database is because certain sections require it. For this reason I went with SQLite, because it's really lightweight and simple.
|
||||||
|
|
||||||
|
## The server
|
||||||
|
The website is hosted on my UK VPS. Previous versions have been hosted on 1&1 and MyWindowsHosting.
|
||||||
|
|
||||||
|
The Django application itself is served using waitress. This get's it's port from a custom reverse proxy allowing me to host multiple sites on a single server easily. This is the same one I use for local development. The main web-facing server is nginx, because it's simple to setup, and damn fast!
|
|
@ -1,14 +1,15 @@
|
||||||
# Student Server
|
# Student Server
|
||||||
Back when I was in college, we needed a server for computing students to learn how to FTP, and script on a server using python CGI and [http://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/#an-analogy](PHP), 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 majorly out of date, and no one really new how to use it properly. It was up to me and my friend Alex to bring the server up to date, and make it ready for the students who needed it.
|
Back 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 majorly out of date, and no one really new how to use it properly. 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 [http://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/#an-analogy](PHP) backends, add student users, and then make sure they couldn't edit eachothers documents. In the end Alex did a server backup, and then fully reinstalled the server OS from scratch, and then pushed the documents back on, which made our lives a lot easier.
|
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.
|
||||||
|
|
||||||
Because he had worked with servers a lot in the past, and was already very fluent with the ubuntu terminal, he installed the software that was needed, and got it all configured properly, whilst I worked on the student logins and permission structure.
|
|
||||||
|
|
||||||
## User Creation
|
## User Creation
|
||||||
|
I knew we would need user accounts for all the computing teachers, the students doing A2 computing. I wasn't expecting this to amount to over 50 user accounts that needed to be created, and permissions setup for their accounts. Fortunately Alex had started writing a basic script for this, which I quickly modified.
|
||||||
|
|
||||||
I knew we would need user accounts for the computing teachers, for the students doing A2 computing, and for updating the IT site, but I wasnt expecting this to amount to over 50 user accounts that needed to be created, and permissions setup for their accounts. It was then that I realied that I would need to write a script to do this in any useful amount of time. Fortunately Alex had started writing one with a small amount of logic, so I had something to work off to get this done, as this was my first major linux project.
|
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 basis of the script was to load information about the users from a database I had created with all the required students in, create users based on this information, and configure the permissions for their 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.
|
||||||
|
|
||||||
The script I used to create these files can be found below, hosted as a gist on github. Unfortunately some of the information has been redacted to prevent giving too much information that could be considered a security threat to the server. The script may not work in this redacted state, however all the core logic has been kept.
|
## 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!
|
||||||
|
|
|
@ -7,7 +7,7 @@ I decided to write the game in Python, seeing as there were other people in the
|
||||||
## Easter Eggs
|
## Easter Eggs
|
||||||
One of the key features of this take on space invaders (and unfortunately the thing 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).
|
One of the key features of this take on space invaders (and unfortunately the thing 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 there are some really very odd ones!
|
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 there are some really very odd ones!
|
||||||
|
|
||||||
|
|
||||||
<div class="btn-group btn-group-justified">
|
<div class="btn-group btn-group-justified">
|
||||||
|
|
|
@ -4,7 +4,7 @@ For those that use Windows, the famous [Blue Screen of Death](https://en.wikiped
|
||||||
|
|
||||||
__And thus the BSOD_Enabler was born!__
|
__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 by doing things that are meant to cause a BSOD, and can therefore be dangereous to a computer, something I didn't really want. Then I stumbled upon [this article](http://www.wikihow.com/Force-a-Blue-Screen-in-Windows), which shows that you can infact envoke a BSOD without causing any errors or damage to your computer. Now to write a program that can do it too!
|
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 by doing things that are meant to cause a BSOD, and can therefore be dangerous to a computer, something I didn't really 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. Now to write a program that can do it too!
|
||||||
|
|
||||||
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. So I decided to write it in C#, and use a windows console interface.
|
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. So I decided to write it in C#, and use a windows console interface.
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
# Hipchat Emoticons for All
|
# Hipchat Emoticons for All
|
||||||
|
|
||||||
After starting my new job at Dabapps, I was introduced to the world of [Hipchat](https://hipchat.com), and it's wonderful array of emoticons, as well as the ones added. It was wonderful, it made communicating with friends and colleagues much more interesting!
|
After starting my new job at DabApps, I was introduced to the world of [Hipchat](https://hipchat.com), and it's wonderful array of emoticons, as well as the ones added. It was wonderful, it made communicating with friends and colleagues much more interesting!
|
||||||
|
|
||||||
Unfortunately, the emoticons on the other services we use, like [Github](https://github.com), were terrible in comparison. So it was after a discussion with [@JakeSidSmith](https://github.com/jakesidsmith) about him just using things like (facepalm), (notsureif), and (wat) in [Facebook messenger](https://www.messenger.com/) and hoping people understand what it means, that I decided to make 'Hipchat Emoticons for all', so people like him could use a much better set of emoticons.
|
Unfortunately, the emoticons on the other services we use, like [GitHub](https://github.com), were terrible in comparison. So it was after a discussion with [@JakeSidSmith](https://github.com/jakesidsmith) about him just using things like (facepalm), (notsureif), and (wat) in [Facebook messenger](https://www.messenger.com/) and hoping people understand what it means, that I decided to make 'Hipchat Emoticons for all', so people like him could use a much better set of emoticons.
|
||||||
|
|
||||||
The premis is very simple, whenever it sees a hipchat emoticon code, like (notsureif), it replaces it with an emoticon. If only writing the code could have been this simple! I started writing the plugin in firefox, using [Jetpack](https://wiki.mozilla.org/Jetpack), which uses Javascript. The initial stages of the code were very simple, but I encountered problems making sure that anything loaded after the page was loaded (such as a facebook message), be changed too.
|
The premis is very simple, whenever it sees a hipchat emoticon code, like (notsureif), it replaces it with an emoticon. If only writing the code could have been this simple! I started writing the plugin in firefox, using [Jetpack](https://wiki.mozilla.org/Jetpack), which uses Javascript. The initial stages of the code were very simple, but I encountered problems making sure that anything loaded after the page was loaded (such as a facebook message), be changed too.
|
||||||
|
|
||||||
|
|
|
@ -2,14 +2,14 @@
|
||||||
|
|
||||||
It's not often someone will need to decode text into morse code (and visa-versa), but if I had something like this when I needed it, it would have saved me hours of time!
|
It's not often someone will need to decode text into morse code (and visa-versa), but if I had something like this when I needed it, it would have saved me hours of time!
|
||||||
|
|
||||||
I originally wrote this code for the [Student Robotics 2015](/robotics/2015/) Entry, to convert a string message into a morse code message that would be transmitted using LEDs, for aestetics and debugging. Unfortunately due to a fixed time frame, this idea was scraped before it could be fully implemented. Fortunately the decoder worked perfectly!
|
I originally wrote this code for the [Student Robotics 2015](/robotics/2015/) Entry, to convert a string message into a morse code message 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. Fortunately the decoder worked perfectly!
|
||||||
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
In order to make it accessable for as many people in as many different languages as possible, the data is in JSON format. Just find a JSON library for your desired language, and it'll work perfectly!
|
In order to make it accessible for as many people in as many different languages as possible, the data is in JSON format. 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 githubs raw view as a hotlink.
|
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 view as a hotlink.
|
||||||
|
|
||||||
|
|
||||||
<script src="https://gist.github.com/RealOrangeOne/6dc94875c93b787e5834.js"></script>
|
<script src="https://gist.github.com/RealOrangeOne/6dc94875c93b787e5834.js"></script>
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
# Wiki Game Solver
|
# Wiki Game Solver
|
||||||
|
|
||||||
For those who dont know what the Wiki Game is: [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. Once i was shown the Wiki Game by my friend, and after i realised that I really wasn't very good at it, I looked into how the system worked, and how I could beat it.
|
For those who don't know what the Wiki Game is: [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. Once I was shown the Wiki Game by my friend, and after I realised that I really wasn't very good at it, I looked into how the system worked, and how I could beat it.
|
||||||
|
|
||||||
I couldnt see how the back end worked, but after playing a few games and checking what happened on the page,the way that the game was won was when the iframe was at the final page location, or at least a clone of it on their servers with extra querystring information.
|
I couldn't see how the back end worked, but after playing a few games and checking what happened on the page,the way that the game was won was when the iframe was at the final page location, or at least a clone of it on their servers with extra querystring information.
|
||||||
|
|
||||||
With this information, I started to write some javascript that would change the location of the iframe to the goal. Fortunately for me, there was already a link to the real winning page, so I could use that to construct the final URL, and direct the iframe to it, meaning I was able to win the game in 1 turn.
|
With this information, I started to write some javascript that would change the location of the iframe to the goal. Fortunately for me, there was already a link to the real winning page, so I could use that to construct the final URL, and direct the iframe to it, meaning I was able to win the game in 1 turn.
|
||||||
|
|
||||||
|
@ -21,6 +21,6 @@ Naturally, the source for this was written in javascript, and relies heavily on
|
||||||
|
|
||||||
If you want to win more games, just re-paste the code, it works as often as you like!
|
If you want to win more games, just re-paste the code, it works as often as you like!
|
||||||
|
|
||||||
### Disclamier
|
### 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!
|
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!
|
||||||
|
|
13
templates/projects/yoga-pal.md
Normal file
13
templates/projects/yoga-pal.md
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
# Yoga Pal
|
||||||
|
|
||||||
|
Once I started work, I bought myself a _Lenovo Yoga 3 14"_ laptop, because I needed a thin and light for trains etc. Unfortunately 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](askubuntu.com/questions/450066/rotate-touchscreen-and-disable-the-touchpad-on-yoga-2-pro-in-rotated-mode) on _Ask Ubuntu_ 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](http://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 started working on my own CLI, based off the above script, to allow me to tweak everything, so the laptop can be used as it was intended.
|
||||||
|
|
||||||
|
<div class="btn-group btn-group-justified">
|
||||||
|
<p class="center-text">
|
||||||
|
<a class="btn btn-default btn-lg" href="https://github.com/RealOrangeOne/yoga-pal">View on Github <i class="icon ion-social-github"></i></a>
|
||||||
|
</p>
|
||||||
|
</div>
|
Reference in a new issue