After a year of waiting (and hard work improving it), Pepperminty Wiki is now on WikiMatrix.org!
WikiMatrix is a brilliant site that lets you compare many different pieces of wiki software with each other in order to figure out which one best meets your needs. Unfortunately, the admins are rather difficult to get hold of, and so new wikis get added rarely.
If you're looking to set up a a small wiki, I recommend checking out my project Pepperminty Wiki. It's inspired by am2064's Minty Wiki that he posted on /r/tinycode, and is designed to be uploaded to a web server and just work (after configuring it, of course!). It's packed into a single file and currently weighs in at ~160kb, so you won't have to wait around for ages for it to download or unpack.
Notable features include multiple users, subpages, templates, file uploads, a full text search engine, page protection, and more! New features are being added all the time - an up to date list can be found in the Github README (link below). Features can be added or removed at any time, too - Pepperminty Wiki sports a module based approach, letting you decide on what features your wiki has enabled.
This is a short announcement post to tell you that I've created an account on Codepen. Codepen is a site that lets you experiment with HTML, CSS and Javascript (or their compiled variants) and share your creations with the world.
I've already created something on there - I'll be blogging about that soon.
Right now though I'm rather ill though, so please don't be disappointed if I don't post right away (although I'll certainly try to get it out asap).
The other day I was asked by someone to add some share buttons to my blog. After taking a little look into it, I found that it really wasn't that difficult to do. Now you'll find three share buttons at the bottom of each post. To start with I picked Twitter, Facebook and Evernote, but if you would like to see any other services just leave a comment down below.
The new sharing buttons are surprisingly simple. All they are is an image wrapped in a specially constructed hyperlink:
Simply replace <url> with your url, <text> with your text, and <via> with your twitter handle (without the @ sign). Don't forget to run everything through rawurlencode() though, otherwise some special character might sneak through and break the link.
This post marks the end of my Ecmascript 6 features series of posts for now. While there are a few more topics I could cover, I don't feel that there is enough support in today's javascript engines to do them justice. At some point in the future I will come back to this series and finish off those topics that I've skipped out on this time.
Before I end this series though, I found a Javascript feature support table that you might find useful. It shows you which ES5/6/7 features are supported by which browsers and preprocessors.
Hello again - Today's post is a public service announcement instead of the usual ES6 post. Hopefully that will be coming out on Thursday.
This website is now powered by a new piece of web server software: Nginx (pronounced engine-x). Ever since I started this website, I have been using lighttpd. While lighttpd has been my favourite web server software for ages (mainly because of the flexible configuration file syntax, the light footprint, and the speed), it seems that development of lighttpd's core codebase has been moving too slowly for me. Lighttpd, while fast and light, has been missing several features that I would rather like to have - and no release date for the next has been announced yet either.
Nginx, on the other hand, is much more feature-complete. It will support HTTP/2 by the end of 2015, and has a slew of other features to play around with. While, it's configuration files are kind of a pain (it only matches against one location block per request), I feel that Nginx is a better solution for this website in the long run. If development resumes on lighttpd, perhaps I will move back to it - but only if I am sure that development will actually continue.
So the switch has been made! Please notify me if you notice any issues and/or problems with the new setup and I will fix them as soon as I can.
I have just discovered that the Coding Conundrums 3 has been released by Rob Miles on his Python Site. He hasn't put it up on the Coding Sharepoint site yet, so I thought that I would post about it here since I didn't notice until now.
I've been meaning to add a mailing list to my blog here for a while now, and I've finally gotten around to writing one. After an afternoon's work, you can now subscribe here. Once you have subscribed, my blog will email you every time it releases a new post. Because of the way that I've implemented it, you'll still get an email when I mess up the date on posts that I write and quickly fix them again, although I'll try really hard not to do this :)
Yesterday I added email notifications to the blog comments. You may have noticed that there is an extra optional field for you to put your email address in when commenting. If you do so, anybody who replies to your comment will trigger an email notification which will go to the email address that you specified.
Currently the only method I have for you to unsubscribe from these emails is to email emails at starbeamrainbowlabs dot com, and I will process your request manually. Make sure that you include a copy of the email that you don't want anymore, since it contains information about the comment that you posted that I will have to edit. In the future I hope to have an automated system that you will be able to use.
If you notice any issues with this, please leave a comment below.
The other thing that I added is email notifications for myself. Now, every time somebody comments on my blog I will receive an email notification telling me about it. This is mainly because I forgot to check for new comments - you should receive a reply to your comment much faster now :)
This time I have written it in javascript. The challenge was to validate an ISBN-10 number. To validate an ISBN-10 number, you add 10 times the first number to 9 times the second number to 8 times the third number and so on. This total should leave no remainder when divided by 11. In addition, the letter X stands for a value of 10.
Here is my solution:
function validate_isbn(isbn) {
var i = 10,
tot = isbn.replace(/-/g, "").split("").reduce(function (total, char) {
if (char.toLowerCase() == "x")
total += i * 10;
else
total += i * parseInt(char);
i--;
return total;
}, 0);
if (tot % 11 === 0)
return true;
else
return false;
}
I minified it by hand too:
function validate_isbn(a){var i = 10;if(a.replace(/-/g,"").split("").reduce(function(b, c){if(c.toLowerCase()=="x")b+=i*10;else b+=i* parseInt(c);i--;return b;},0)%11==0)return true;else return false;}
I should probably attempt the next challenge in C♯ so that I keep practising it.