Run grammar check on projects
This commit is contained in:
parent
98a92f483c
commit
5386bb519e
10 changed files with 24 additions and 21 deletions
|
@ -3,13 +3,13 @@ title: Astrill Extractor
|
||||||
gist: 050da86871fb952ba7bfe97eece8555c
|
gist: 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.
|
Astrill, my VPN of choice, allows you to export OpenVPN config files for all its 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).
|
The export step is really simple, you just log in 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 realized that whilst writing this).
|
||||||
|
|
||||||
{{< gist >}}
|
{{< gist >}}
|
||||||
|
|
||||||
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.
|
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-compatible application.
|
||||||
|
|
||||||
### Is it even needed?
|
### 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!
|
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!
|
||||||
|
|
|
@ -8,6 +8,9 @@ Attack on Blocks is a space invaders style game I wrote for my IT coursework, fo
|
||||||
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.
|
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
|
## 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 three main easter eggs, the first enabling the other two. 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 (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 three main easter eggs, the first enabling the other two. If you would like to know what they are, click the button below. If not, play the game and try to 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!
|
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!
|
||||||
|
|
||||||
|
{{% repobutton %}}
|
||||||
|
|
|
@ -3,13 +3,13 @@ title: CircleCI Artifact Proxy
|
||||||
repo: RealOrangeOne/circleci-artifact-proxy
|
repo: RealOrangeOne/circleci-artifact-proxy
|
||||||
---
|
---
|
||||||
|
|
||||||
My favourite feature of [CircleCI](https://circleci.com/), besides the fact it's the fastest CI I've used, and support docker natively, is artifacts. Artifacts allow you to store files from your build, and download them from the web interface. This means you can use the interface to build mobile apps, installers, or even disk images! The artifacts can be easily downloaded from the web UI, however the URLs aren't discoverable, which makes automatically generating links to builds difficult.
|
My favourite feature of [CircleCI](https://circleci.com/), besides the fact it's the fastest CI I've used, and support docker natively, is artifacts. Artifacts allow you to store files from your build, and download them from the web interface. This means you can use the interface to build mobile apps, installers, or even disk images! The artifacts can be easily downloaded from the web UI, however the URLs aren't discoverable, which makes automatically generating links difficult.
|
||||||
|
|
||||||
A very important missing feature, is the ability to just get a download link for the latest build available. This would make using CircleCI as a file host for documents, or various other things, great!
|
A very important missing feature, is the ability to just get a download link for the latest build available. This would make using CircleCI as a file host for documents, or various other things, great!
|
||||||
|
|
||||||
My proxy enables both these features. URLs become discoverable, and allow referencing the latest build. Using the [CircleCI API](https://circleci.com/docs/api/v1-reference/), it gets the less-discoverable URLs from the artifacts, and stream it back to the client.
|
My proxy enables both these features. URLs become discoverable, and allow referencing the latest build. Using the [CircleCI API](https://circleci.com/docs/api/v1-reference/), it gets the less-discoverable URLs from the artifacts, and stream it back to the client.
|
||||||
|
|
||||||
The URLs take the structure `<org>/<repo>/<build>/<path>`, allowing easy editing of links, as they're very human readable. You can also use `latest` as the build number to get the most recent build automatically. Streaming the artifact rather than redirecting allows keeping the nicer URLs, which is especially nice for files viewed in the browser, like PDFs.
|
The URLs take the structure `<org>/<repo>/<build>/<path>`, allowing easy editing of links, as they're very human-readable. You can also use `latest` as the build number to get the most recent build automatically. Streaming the artifact rather than redirecting allows keeping the nicer URLs, which is especially nice for files viewed in the browser, like PDFs.
|
||||||
|
|
||||||
The server is written in [Rust](https://rust-lang.org/), using [rocket](https://rocket.rs), because I'd never written a web server in rust. With Rust, the resulting binary is incredibly small (`4mb`), but also is lightweight at runtime, and incredibly fast! The resulting binary should require no additional dependencies, and binds to port `5000` (or `$PORT`).
|
The server is written in [Rust](https://rust-lang.org/), using [rocket](https://rocket.rs), because I'd never written a web server in rust. With Rust, the resulting binary is incredibly small (`4mb`), but also is lightweight at runtime, and incredibly fast! The resulting binary should require no additional dependencies, and binds to port `5000` (or `$PORT`).
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ If you're using scripts hosted by yourself, then SRI can help prevent against ma
|
||||||
|
|
||||||
SRI has been around for a while, as has Django, but no one has put the two together it seems. That's where [`django-sri`](https://github.com/{{< param "repo" >}}/) comes in.
|
SRI has been around for a while, as has Django, but no one has put the two together it seems. That's where [`django-sri`](https://github.com/{{< param "repo" >}}/) comes in.
|
||||||
|
|
||||||
By installing and configuring it correctly, you're given a new `sri_static` template tag, which outputs a fully formed `script` or `link` tag, with the required integrity checks setup.
|
By installing and configuring it correctly, you're given a new `sri_static` template tag, which outputs a fully formed `script` or `link` tag, with the required integrity checks set up.
|
||||||
|
|
||||||
```
|
```
|
||||||
{% sri_static "index.js" %} <!-- Will output "<script src='/static/index.js' integrity='sha256-...'></script>" -->
|
{% sri_static "index.js" %} <!-- Will output "<script src='/static/index.js' integrity='sha256-...'></script>" -->
|
||||||
|
@ -22,4 +22,4 @@ By installing and configuring it correctly, you're given a new `sri_static` temp
|
||||||
|
|
||||||
The integrity hash is calculated at request time, but is cached in memory to improve performance. The hashing is dome with `hashlib`, which is both fast and won't block the [GIL](https://docs.python.org/3/glossary.html#term-gil).
|
The integrity hash is calculated at request time, but is cached in memory to improve performance. The hashing is dome with `hashlib`, which is both fast and won't block the [GIL](https://docs.python.org/3/glossary.html#term-gil).
|
||||||
|
|
||||||
interested in giving it a try? [Go install it](https://github.com/{{< param "repo" >}}/#installation)! This integration doesn't support remote assets, but that's coming!
|
Interested in giving it a try? [Go install it](https://github.com/{{< param "repo" >}}/#installation)! This integration doesn't support remote assets, but that's coming!
|
||||||
|
|
|
@ -4,14 +4,14 @@ repo: RealOrangeOne/dotfiles
|
||||||
tags: [arch, linux]
|
tags: [arch, linux]
|
||||||
---
|
---
|
||||||
|
|
||||||
[Dotfiles](https://wiki.archlinux.org/index.php/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.
|
[Dotfiles](https://wiki.archlinux.org/index.php/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 set up in an almost identical way.
|
||||||
|
|
||||||
Most people store their dotfiles in version control. This is a great solution as it's possible to add authentication before accessing them, and stores a complete version history. It also means they're public
|
Most people store their dotfiles in version control. This is a great solution as it's possible to add authentication before accessing them, and stores a complete version history. It also means they're public.
|
||||||
|
|
||||||
## _My_ Dotfiles
|
## _My_ Dotfiles
|
||||||
[My Dotfiles](https://github.com/RealOrangeOne/dotfiles) are built using [Ansible](https://www.ansible.com/). Ansible is an open-source configuration management tool designed to help administer many servers with a single configuration. As people started using Ansible for configuration of the local machine (as I am), Ansible made some optimisations so commands run better locally.
|
[My Dotfiles](https://github.com/RealOrangeOne/dotfiles) are built using [Ansible](https://www.ansible.com/). Ansible is an open-source configuration management tool designed to help administer many servers with a single configuration. As people started using Ansible for configuration of the local machine (as I am), Ansible made some optimizations so commands run better locally.
|
||||||
|
|
||||||
I synchronise these files with git, and publish them [on GitHub](https://github.com/RealOrangeOne/dotfiles).
|
I synchronize these files with git, and publish them [on GitHub](https://github.com/RealOrangeOne/dotfiles).
|
||||||
|
|
||||||
### Previous iterations
|
### Previous iterations
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ To create a presentation with RevealJS, you'll still need a server to run the pr
|
||||||
Microsoft's [PowerPoint](https://products.office.com/en-gb/powerpoint) is well regarded as the best and most popular presentation tool. The issue is, I'm primarily a Linux user, so PowerPoint isn't especially an option (besides doing odd things with [wine](https://www.winehq.org/)). There are alternative tools out there, such as [LibreOffice](https://www.libreoffice.org/), [OnlyOffice](https://www.libreoffice.org/), and [WPS Office](https://www.wps.com/), but the fact I can't edit them in any editor I want, edit them with simple plain-text, and present them with nothing more than a web browser, is kind of annoying.
|
Microsoft's [PowerPoint](https://products.office.com/en-gb/powerpoint) is well regarded as the best and most popular presentation tool. The issue is, I'm primarily a Linux user, so PowerPoint isn't especially an option (besides doing odd things with [wine](https://www.winehq.org/)). There are alternative tools out there, such as [LibreOffice](https://www.libreoffice.org/), [OnlyOffice](https://www.libreoffice.org/), and [WPS Office](https://www.wps.com/), but the fact I can't edit them in any editor I want, edit them with simple plain-text, and present them with nothing more than a web browser, is kind of annoying.
|
||||||
|
|
||||||
## Static site generators
|
## Static site generators
|
||||||
Static site generators have been around for many years, and I'm a big fan of them. In simple, it converts an simple markup format, usually markdown, into HTML, using templates to reduce code duplication. This happens as a compilation step, and outputs exactly what needs to be served to the client.
|
Static site generators have been around for many years, and I'm a big fan of them. In simple, it converts a simple markup format, usually markdown, into HTML, using templates to reduce code duplication. This happens as a compilation step, and outputs exactly what needs to be served to the client.
|
||||||
|
|
||||||
### [Hugo](https://gohugo.io/)
|
### [Hugo](https://gohugo.io/)
|
||||||
Hugo is my static site generator of choice, it's powering [this website](https://github.com/realorangeone/theorangeone.net). It converts markdown into HTML just like any other static file server, only it does it incredibly quickly! Hugo also has some additional nifty features which make site development much simpler, like image resizing and live reloading!
|
Hugo is my static site generator of choice, it's powering [this website](https://github.com/realorangeone/theorangeone.net). It converts markdown into HTML just like any other static file server, only it does it incredibly quickly! Hugo also has some additional nifty features which make site development much simpler, like image resizing and live reloading!
|
||||||
|
@ -20,12 +20,12 @@ Hugo is my static site generator of choice, it's powering [this website](https:/
|
||||||
If we combine revealjs and a static site generator, we get many benefits. Besides the obvious fact we get to write our content as markdown rather than raw HTML (revealjs does natively support this, but conversion is done in the browser), we also get the ability to use the niceties they offer to make content development easier.
|
If we combine revealjs and a static site generator, we get many benefits. Besides the obvious fact we get to write our content as markdown rather than raw HTML (revealjs does natively support this, but conversion is done in the browser), we also get the ability to use the niceties they offer to make content development easier.
|
||||||
|
|
||||||
## `hugo-theme-revealjs`
|
## `hugo-theme-revealjs`
|
||||||
`hugo-theme-revealjs` is a theme for Hugo which combines the two: a powerful static site generator, with a powerful presentation framework. The theme makes writing content east, especially for those who like content organised. Each slide is a separate markdown file, which can be grouped into sections to form the vertical slide groups Reveal is famous for. All settings and configuration options for Reveal are accessible through this theme, in an attempt to make it versatile and usable by all people.
|
`hugo-theme-revealjs` is a theme for Hugo which combines the two: a powerful static site generator, with a powerful presentation framework. The theme makes writing content east, especially for those who like content organized. Each slide is a separate markdown file, which can be grouped into sections to form the vertical slide groups Reveal is famous for. All settings and configuration options for Reveal are accessible through this theme, in an attempt to make it versatile and usable by all people.
|
||||||
|
|
||||||
The source for the theme is on [GitHub](https://github.com/RealOrangeOne/hugo-theme-revealjs), and can be [installed](https://gohugo.io/themes/installing-and-using-themes/) as if it were any other theme.
|
The source for the theme is on [GitHub](https://github.com/RealOrangeOne/hugo-theme-revealjs), and can be [installed](https://gohugo.io/themes/installing-and-using-themes/) as if it were any other theme.
|
||||||
|
|
||||||
{{< iframe src="https://hugo-theme-revealjs.netlify.com/" >}}
|
{{< iframe src="https://hugo-theme-revealjs.netlify.com/" >}}
|
||||||
Example presentation, which shows off some of the features of the theme.
|
Example presentation, which shows off some features of the theme.
|
||||||
{{< /iframe >}}
|
{{< /iframe >}}
|
||||||
|
|
||||||
I plan on using this for any presentations I have to do in future.
|
I plan on using this for any presentations I have to do in the future.
|
||||||
|
|
|
@ -8,7 +8,7 @@ It's not often people need to decode text into morse code (and visa-versa), but
|
||||||
|
|
||||||
## Usage
|
## 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!
|
In order to make it accessible for as many people in as many 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.
|
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.
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ Everyone knows that you should lock your devices when you're not using them, but
|
||||||
|
|
||||||
Personally, I _always_ (or at least 99.9999% of the time) lock my devices, even if I'm the only person around in a locked, private building. Some call it strange and paranoid, I call it reinforcing a good habit. I do however quite enjoy trolling those who leave their machines unlocked, even just to educate them about the fact they shouldn't do it. It's also rather fun, but I do think there could be even greater fun in trolling the potential trolls.
|
Personally, I _always_ (or at least 99.9999% of the time) lock my devices, even if I'm the only person around in a locked, private building. Some call it strange and paranoid, I call it reinforcing a good habit. I do however quite enjoy trolling those who leave their machines unlocked, even just to educate them about the fact they shouldn't do it. It's also rather fun, but I do think there could be even greater fun in trolling the potential trolls.
|
||||||
|
|
||||||
[`pranklock`](https://github.com/RealOrangeOne/pranklock) is a simple lock screen alternative designed to catch out those who may want to interfere with your unlocked computer. By making your computer seem like it's unlocked, it entices said trolls. On any user input (keyboard or mouse), it captures an image from the webcam, and re-locks the screen using that, so you know who tried to troll you. In the interest of not capturing yourself, pressing `Escape` will simply revert back to your default lock screen, so you can enter your password properly.
|
[`pranklock`](https://github.com/RealOrangeOne/pranklock) is a simple lock screen alternative designed to catch out those who may want to interfere with your unlocked computer. By making your computer seem like it's unlocked, it entices said trolls. On any user input (keyboard or mouse), it captures an image from the webcam, and re-locks the screen using that, so you know who tried to troll you. In the interest of not capturing yourself, pressing `Escape` will simply revert to your default lock screen, so you can enter your password properly.
|
||||||
|
|
||||||
`pranklock` is a single bash script, with very few [dependencies](https://github.com/RealOrangeOne/pranklock#dependencies), so should be very simple to integrate with your existing system, and should support any desktop environment (tested working with i3). It's designed to be as fast and secure as possible, to ensure a seamless experience. The webcam is only watching once triggered, so there's no obvious light to give the game away. Both stages use `i3lock` to ensure that even when in a trolling state, your machine is still actually protected in case of any issues.
|
`pranklock` is a single bash script, with very few [dependencies](https://github.com/RealOrangeOne/pranklock#dependencies), so should be very simple to integrate with your existing system, and should support any desktop environment (tested working with i3). It's designed to be as fast and secure as possible, to ensure a seamless experience. The webcam is only watching once triggered, so there's no obvious light to give the game away. Both stages use `i3lock` to ensure that even when in a trolling state, your machine is still actually protected in case of any issues.
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ 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.
|
[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.
|
Not long after I was shown it, I realized 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.
|
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.
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ The game was won when the iframe was at the final page location, or at least a c
|
||||||
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!
|
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
|
### 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 gist below. Both the standard and compact versions are available.
|
The source for this was written in pure JS, and relies heavily on the fact that the wiki game uses jQuery. The code can be found in the GitHub gist below. Both the standard and compact versions are available.
|
||||||
|
|
||||||
{{< gist >}}
|
{{< gist >}}
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ subtitle: Control screen rotation, touch screen, and trackpad using the terminal
|
||||||
tags: [linux]
|
tags: [linux]
|
||||||
---
|
---
|
||||||
|
|
||||||
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'.
|
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 customization 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.
|
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.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue