Skip to content

Instantly share code, notes, and snippets.

@chomy
chomy / 2017-05-21_karuizawa.geojson
Created May 21, 2017 13:30
2017-05-20, 21 Touring route of Karuizawa
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@chomy
chomy / 2017-05-06_hitachi.geojson
Created May 7, 2017 06:09
2017-05-06 Hitachi Seaside Park Touring Course
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@chomy
chomy / 2017-04-17_okutama.geojson
Created April 19, 2017 15:27
2017-04-17 Touring Course, Okutama
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@chomy
chomy / 2017-04-12_yokohama-yokosuka.geojson
Created April 19, 2017 15:19
2017-04-02 Touring Course, Yokohama - Yokosuka
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@chomy
chomy / 2017-04-02_mother-farm.geojson
Created April 2, 2017 11:09
2017-04-02 Touring Course, Mother-farm and Futtsu-misaki
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@chomy
chomy / 2017-03-19_choshi-touring.geojson
Created March 24, 2017 16:07
2017-03-19 Choshi Touring Course
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@chomy
chomy / gpx_distance.py
Created March 24, 2017 16:04
calculate distance from GPX file
#!/usr/bin/python
from osgeo import ogr
from osgeo import osr
import xml.sax
import xml.sax.handler
import sys
class Handler(xml.sax.handler.ContentHandler):
def __init__(self):
@chomy
chomy / jmv-paser.py
Last active August 21, 2016 02:52
JMV3.0 Parser for JTWC
#!/usr/bin/python3
import datetime
import sys
def info_parser(lines, result):
row = lines[0].split(' ')
result['name'] = row[2]
result['number'] = int(row[5])
result['time'] = datetime.datetime(
@chomy
chomy / totp-test.cc
Last active July 24, 2016 17:09
Time based one time password generator, based on RFC6238
// Unit test for totp.cc using CppUTest
#include <iostream>
#include <iomanip>
#include <cstring>
#include <array>
#include "CppUTest/CommandLineTestRunner.h"
#include "totp.h"
using namespace std;
@chomy
chomy / otp.py
Created July 2, 2016 09:19
Time based one time password generator, based on RFC6238 and Google Authenticator
#!/usr/bin/python
import array
import base64
import hmac
import math
import sha
import time
from hashlib import sha1