Skip to content

Instantly share code, notes, and snippets.

View hfu's full-sized avatar

Hidenori hfu

View GitHub Profile
@hfu
hfu / postgistr.rb
Created September 8, 2008 13:48
Extend Ruby String to support PostGIS
require 'rubygems'
require 'postgres'
class String
def sql(&block)
result = PostGIS::sql(self).result[0]
return result unless block
result.each do |r|
yield r
end
require 'postgres'
module PostGIS
class Connection
def initialize(pghost, pgport, pgoptions, pgtty,
dbname, login, passwd)
@conn = PGconn.connect(pghost, pgport, pgoptions, pgtty,
dbname, login, passwd)
end
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hfu
hfu / a.geojson
Created February 26, 2016 23:41
GeoJSON scratch
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hfu
hfu / 1.geojson
Last active April 20, 2016 21:08
土地崩壊分布図(4/16撮影分) by 国土地理院、accessed 2016-04-21T06:00+09:00、see http://maps.gsi.go.jp/#10/32.854788/130.925446/&base=std&ls=std%7C_20160414kumamoto_handoku1&disp=11&lcd=toshiken_katsudansouzu&vs=c1j0l0u0f0&d=vl
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hfu
hfu / LICENSE
Last active May 6, 2016 13:10
simple i18n in html
CC0 1.0 Universal
Statement of Purpose
The laws of most jurisdictions throughout the world automatically confer
exclusive Copyright and Related Rights (defined below) upon the creator and
subsequent owner(s) (each and all, an "owner") of an original work of
authorship and/or a database (each, a "Work").
Certain owners wish to permanently relinquish those rights to a Work for the
@hfu
hfu / LICENSE
Created May 6, 2016 22:07
JavaScript InternationalString ;-)
CC0 1.0 Universal
Statement of Purpose
The laws of most jurisdictions throughout the world automatically confer
exclusive Copyright and Related Rights (defined below) upon the creator and
subsequent owner(s) (each and all, an "owner") of an original work of
authorship and/or a database (each, a "Work").
Certain owners wish to permanently relinquish those rights to a Work for the
CC0 1.0 Universal
Statement of Purpose
The laws of most jurisdictions throughout the world automatically confer
exclusive Copyright and Related Rights (defined below) upon the creator and
subsequent owner(s) (each and all, an "owner") of an original work of
authorship and/or a database (each, a "Work").
Certain owners wish to permanently relinquish those rights to a Work for the
@hfu
hfu / nrt2tos.geojson
Last active May 15, 2016 11:04
Route to Tromso
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hfu
hfu / LICENSE
Created May 15, 2016 19:43
ジオ+ウェブの標準化、最近の進捗
CC0 1.0 Universal
Statement of Purpose
The laws of most jurisdictions throughout the world automatically confer
exclusive Copyright and Related Rights (defined below) upon the creator and
subsequent owner(s) (each and all, an "owner") of an original work of
authorship and/or a database (each, a "Work").
Certain owners wish to permanently relinquish those rights to a Work for the