Skip to content

Instantly share code, notes, and snippets.

@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;
@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
#!/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 / 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.