Skip to content

Instantly share code, notes, and snippets.

@lewtds
lewtds / polygon-with-a-hole.geojson
Last active May 17, 2019 10:42 — forked from andrewharvey/polygon-with-a-hole.geojson
A GeoJSON Polygon with a hole
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/bin/sh
convertibles=('À' 'Á' '' 'Ã' '' '' '' '' '' '' 'Ă' '' '' '' '' '' 'Â' 'È' 'É' '' '' '' '' '' '' '' '' 'Ê' 'Ì' 'Í' '' 'Ĩ' '' 'Ò' 'Ó' '' 'Õ' '' '' '' '' '' '' 'Ô' '' '' '' '' '' 'Ơ' 'Ù' 'Ú' '' 'Ũ' '' '' '' '' '' '' 'Ư' '' 'Ý' '' '' '' 'Đ' 'à' 'á' '' 'ã' '' '' '' '' '' '' 'ă' '' '' '' '' '' 'â' 'è' 'é' '' '' '' '' 'ế' '' '' '' 'ê' 'ì' 'í' '' 'ĩ' '' 'ò' 'ó' '' 'õ' '' '' '' '' '' '' 'ô' '' '' '' '' '' 'ơ' 'ù' 'ú' '' 'ũ' '' '' '' '' '' '' 'ư' '' 'ý' '' '' '' 'đ')
#Usage: convertTo charsetName id
function convertTo() {
printf "${convertibles[$2]}" | ./uvconv -f UTF-8 -t $1 | hexdump -e '1/1 "%02x"'
}
#Usage: makeTable charsetName
@lewtds
lewtds / battleship.py
Last active December 10, 2015 16:39 — forked from itsjef/battleship.py
#!/usr/bin/env python3.2
"""
Simple Battleship game
TODO
- Networked multiplayer
- GUI (with pygame)
- Sound (with pygame)
- Localization
@lewtds
lewtds / io.c
Created December 19, 2012 08:26 — forked from anonymous/io.c
#include "stdio.h"
int main(int argc, char const *argv[])
{
FILE *f;
char buffer[4096];
f = fopen("bits.txt", "w");
while(1) {
fwrite(buffer, 4096, 1, f);
}
return 0;