Skip to content

Instantly share code, notes, and snippets.

View tombl's full-sized avatar

Tom tombl

  • Australia
  • 07:07 (UTC +08:00)
View GitHub Profile
@tombl
tombl / README.md
Last active May 3, 2022 10:18
sqlite gaming

sqlite gaming

this is a minimal example of running sqlite in the browser.

this automatically persists the database in the browser.

these two files need to be placed in the same folder on a static web server.

@tombl
tombl / README.md
Last active May 12, 2021 13:09
raccoDB

raccoDB

Very sime plen nodeejs database.

Install

Copy either racco.js or racco.ts straight into your project folder, depending on if you use javascript or typescript. You must then set the DATA_DIR variable at the top to the path to the folder which will contain the data, relative to the racco.js file.

How?

import microbit as mb
import radio
PHASE_SELECT_PLAYER = 1
PHASE_PLAYING_GAME = 2
current_phase = PHASE_SELECT_PLAYER
this_player = 0
radio.config(channel=68, data_rate=radio.RATE_2MBIT)

Keybase proof

I hereby claim:

  • I am tomblcode on github.
  • I am tombl (https://keybase.io/tombl) on keybase.
  • I have a public key ASBfQPqHkTKh54oaMV7wG9DFJ1gCArg5uR-Udy5DnvUmmAo

To claim this, I am signing this object:

@tombl
tombl / README.md
Last active June 10, 2020 18:53 — forked from eugenet8k/Readme.md
Getting `nvm` support in the `fish` shell

Getting nvm support in the fish shell

How to get nvm to run inside the fish shell.

Step 0: Ensure fish and nvm are installed

See the following for instructions:

Step 1: Install fisher

@tombl
tombl / adfly.sh
Last active March 5, 2019 08:42 — forked from MadanThangavelu/unshorted-adf.ly
Unshorten a adfly url
#!/usr/bin/env bash
# Just for fun, a commandline unshortner.
# When googling, I found an out of date adf.ly unshortener, so I took it upon myself to create a new one
x=$(curl -i $1 | grep Location)
let "y = ${#x} - 9"
echo "$x" | tail -c "$y"