Starbeamrainbowlabs

Stardust
Blog


Archive


Mailing List Articles Atom Feed Comments Atom Feed Twitter Reddit Facebook

Tag Cloud

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

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>
<html>
    <head>
        <meta charset='utf-8' />
        <title>Test page</title>
    </head>
    <body>
        <p>Page content here</p>

        <!---------------->
        <script src="tomatoes.js"></script>
    </head>
</html>

Find treasure with sound

The Audio Treasure hunter

Hello again!

Today I have a small minigame to show you. There is some treasure hidden in your browser window, so naturally it is your job to find it. Make sure your sound is turned on and then press <space> to hear where the treasure is. Then click somewhere on the page and listen to the sound that each location makes. Try and match the sound you hear from clicking with the sound you hear when pressing space.

Link: Audio Treasure Hunter

The sound that is made consists of two tones. The first one is tied to the horizontal position of your cursor. The left side has a low sound, and the right side has a high sound. The second tone is tied to the vertical position of your cursor. As you would expect, the bottom of your screen has a low sound and the top, a high sound.

If your are finding it too easy or hard, your can cycle through the different modes by pressing <m>. The harder modes decrease the time between the two tones and reduce the size of the treasure.

I can do it in ~3-4 clicks if I try hard enough. What is your best?

Art by Mythdael