Mailing List Articles Atom Feed Comments Atom Feed Twitter Reddit Facebook

Tag Cloud

3d account algorithms android announcement architecture archives arduino artificial intelligence artix assembly async audio bash batch blog bookmarklet booting c sharp c++ challenge chrome os code codepen coding conundrums coding conundrums evolved command line compilers compiling compression css dailyprogrammer debugging demystification distributed computing documentation downtime electronics email embedded systems encryption es6 features event experiment external first impressions future game github github gist gitlab graphics hardware hardware meetup holiday holidays html html5 html5 canvas infrastructure interfaces internet io.js jabber jam javascript js bin labs learning library linux lora low level lua maintenance manjaro network networking nibriboard node.js operating systems performance photos php pixelbot portable privacy problem solving programming problems projects prolog protocol protocols pseudo 3d python reddit redis reference release releases resource review rust searching secrets security series list server software sorting source code control statistics storage svg technical terminal textures three thing game three.js tool tutorial tutorials twitter ubuntu university update updates upgrade version control virtual reality virtualisation visual web website windows windows 10 xmpp xslt

Make your linux learning experience painless with tldr-pages!

If you've been learning linux for a little while, you'll probably have encountered man pages. They are the complete documentation of all the tools, commands(, and kernel functions) available on the system you're currently on (read them online here!). If you have encountered them, you'll also know that they usually are somewhat... verbose.

Enter stage left: tldr-pages!

tldr-pages is an ongoing effort to create a repository of simplified man pages, that document the most common usages of a command. How about this, for the tar command?

# tar

> Archiving utility.
> Often combined with a compression method, such as gzip or bzip.

- Create an archive from files:

`tar cf {{target.tar}} {{file1 file2 file3}}`

- Create a gzipped archive:

`tar czf {{target.tar.gz}} {{file1 file2 file3}}`

- Extract an archive in a target folder:

`tar xf {{source.tar}} -C {{folder}}`

- Extract a gzipped archive in the current directory:

`tar xzf {{source.tar.gz}}`

- Extract a bzipped archive in the current directory:

`tar xjf {{source.tar.bz2}}`

- Create a compressed archive, using archive suffix to determine the compression program:

`tar caf {{target.tar.xz}} {{file1 file2 file3}}`

- List the contents of a tar file:

`tar tvf {{source.tar}}`

...or this for git reset?

# git reset

> Undo commits or unstage changes, by resetting the current git HEAD to the specified state.
> If a path is passed, it works as "unstage"; if a commit hash or branch is passed, it works as "uncommit".

- Unstage everything:

`git reset`

- Unstage specific file(s):

`git reset {{path/to/file(s)}}`

- Unstage portions of a file:

`git reset -p {{path/to/file}}`

- Undo the last commit, keeping its changes (and any further uncommitted changes) in the filesystem:

`git reset HEAD~`

- Undo the last two commits, adding their changes to the index, i.e. staged for commit:

`git reset --soft HEAD~2`

- Discard any uncommitted changes, staged or not (for only unstaged changes, use `git checkout`):

`git reset --hard`

- Reset the repository to a given commit, discarding committed, staged and uncommitted changes since then:

`git reset --hard {{commit}}`

For those learning linux and the terminal, I think it's an invaluable tool. It helps you out by showing you how to perform common tasks. As you get more experienced though, it becomes useful in another way: showing you how to do those things that you don't do often enough to remember off the top of your head.

I'm probably a bit biased, since I've been contributing to the project for a while (and the nice folks over there recently promoted me to the rank of maintainer :D), so you should check it out for yourself! There's even an online client that you can use without installing anything :-) Once you're ready to install a client directly in your terminal, there's an extensive list of clients documented on the repository wiki, with one available for every environment and platform.

If you encounter a command that hasn't been documented yet, then they've also made it easy to contribute a page yourself.

I think the idea is rather cool, actually - as you've probably guessed by now! Let me know what you think of it in the comments.

Arduino Runtime Exception List

Just yesterday I was at the Hardware Meetup at C4DI, and I (along with a few other people - thank you for helping :D) was attempting to fix a series of nasty runtime errors. All it gave me was a message in the serial monitor that an exception had occurred, an error code, and a raw stack dump. This wasn't very helpful at all. Even more unhelpful was the lack of help out there on how to decode this information.

I did, however, manage to find a page that contains a list of the different error codes and their meanings. It's not much, but it's a start. It helped us at least to work out what was wrong with it :-)

Arduino Exception Reference

The Visual Micro Logo

If you're running Windows, then Microsoft have created Visual Micro - a what looks like a perfectly brilliant debugger for the arduino. Apparently you can inspect variables, see the digital pin statuses, and get intellisense lovelyness :D Since I'm running linux, I can't get my hands on it - hopefully someone will build an alternative for linux and other OSes soon!

I also discovered a weird oddity with UDP Multicast in C#. I'm going to investigate further and write up another post that will (hopefully) follow this one.

Arduino quick reference guide

The arduino logo

This post was going to be about how I connected my robot to a WiFi network and controlled it wirelessly, but I've been having some issues with getting that to work :-( Since I wanted to make a post anyway, I thought I'd post about a quick reference guide I found instead :-)

An arduino quick reference guide.

(Download as: png, svg | Original source)

I found this decided to print it out and laminate it. It's been really useful - I'm really glad I decided to print it out now. It was originally made by a guy called Mark Liffiton. You can find its Github repository here. The version I have posted here is tweaked very slightly to have colour on the reset button, which the original doesn't have.

Next I'm going to attempt to find a similar sort of thing for the esp8266 (upon which the Wemos D1 R2 is based) API, because I'm constantly having to look up various functions all over the place and it wastes a lot of time :-)

Have you found a handy reference sheet? Post about it in the comments below!

Test your next web based idea with RawGit

All too often I find myself wanting to test something web based quickly without starting a local web server (this is how my procedural castle generator started for example).

While a quick Github Gist or a Github Repository would be a great place to host things like this Github serves your code with the mime type text/plain, and the X-Content-Type-Options: nosniff header. Without the extra header your browser will inspect the content that is being sent by the server and automatically determine the actual content type - but the above header disables this functionality, rendering both Github Gist and a Github Repository useless for anything other than sharing code.

Thankfully all is not lost. Some time ago ago I discovered RawGit. RawGit is a service that lets you enter the raw view url of either a Github gist or a file in a Github repository, and it will serve it with the correct content type, allowing you to use gist and Github repositories to house your latest and greatest experiment.

It has a different url for development and production use, too. The development url doesn't cache anything and updates instantly, whereas the production url is cached indefinitely and is delivered via a CDN (content delivery network).

Because different files in the same folder or gist generate a similar url, you can include them in your HTML page in the same way as if you were doing it locally:

<!DOCTYPE html>
        <meta charset='utf-8' />
        <title>Test page</title>
        <p>Page content here</p>

        <script src="tomatoes.js"></script>

Using the ca-bundle to prevent certificate errors in curl

When you first download and install curl and you try to request something over https, it's likely that you will get an error along these lines:

curl: (60) SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

You might think that you can bypass this with the --insecure or -k option, but this is insecure as it means that curl isn't checking the identity of the remote server before downloading the the file in question, leaving you open to a man in the middle attack. The solution: Point curl at a bundle of root certificates that it can use to verify a server's identity.

Since curl doesn't pay attention to the certificate store on windows, we have to provide it with a file that contains these root certificates instead. This can be done by running a script provided by the curl develoeprs that automatically downloads the certificates from Mozilla Firefox's source code and compiles them into a format the curl can understand.

Here's a direct link to the script:

Simply download and run that script, and it will generate a file called ca-bundle.crt in the current directory. Rename it to curl-ca-bundle.crt, and copy it to the directory that you installed curl to. Curl will find it when you next request something over https.

Alternatively, you can set the CURL_CA_BUNDLE environment variable to the full path to the ca-bundle.crt file. If you can't copy it to the folder that you installed curl to.

If you can't run the above script, then you can download a ready-made version from this website. My server will update it automatically at 1am UK time every Saturday.

Here's a link: ca-bundle.crt

I am hosting the enable1.txt wordlist

Hello again. This is just a quick post to let you know that I am hosting the enable1.txt wordlist on this site. The only copy I could find on the internet is on Google Code, which is shutting down.

I don't know where this wordlist originated (leave a comment below if you know!), but I believe it is licensed under the public domain. If this is not the case, please leave a comment below letting me know what the real license is.

This wordlist looks like a good starting point for many word based programming projects - and I don't want to loose this wordlist when Google Code shuts down for good.

You can find it here: enable1.txt

If you know if any other wordlists that would be useful for programmers (password cracking lists will NOT be considered), leave a comment with a link and a description below and I will look into hosting it here as well. Perhaps I can build up a collection of useful wordlists.

Cool Resources: Subtle Patterns

An example of a pattern from

I have a different sort of post for you today: A post about pair of websites that I have found that are really quite useful. Quite often when I am creating a website or webpage for some reason or other (today I needed one for bloworm), I keep finding that it always looks a bit plain. These websites that I have found today help to partially solve that problem. They are full of simple tileable textures that look great as backgrounds in many different contexts.

The first is called It contains a bunch of free to use textures that go well in the background of something without standing out.

The second is called It is similar to the website above - but the textures it provides are transparent so that you can overlay them on top of something else. These are good when you have a colour in mind, but want to add a little something to it to make it look a little less plain.

Art by Mythdael