Skip to content

Instantly share code, notes, and snippets.

View smellman's full-sized avatar

Taro Matsuzawa aka. btm smellman

View GitHub Profile
var js="https://dl.dropboxusercontent.com/u/103855/webtis_v4_dummy.js";
var d=document;
var e=d.createElement('script');
e.src=js;
d.getElementsByTagName('head')[0].appendChild(e);
var webtisMap = new webtis.Layer.BaseMap("webtismap");
map._olMap.addLayer(webtisMap);
javascript:(function(){map._olMap.addLayer(new%20OpenLayers.Layer.OSM('%E9%9B%BB%E5%AD%90%E5%9B%BD%E5%9C%9F','http://cyberjapandata.gsi.go.jp/xyz/20131017dol/${z}/${x}/${y}.png'));})();
// ==UserScript==
// @name Lalavel - show detail title
// @namespace http://userscript.smellman.org/
// @description Replace laravel's document site's tiltle to detail title
// @include http://four.laravel.com/docs/*
// @version 1
// @grant none
// ==/UserScript==
var main_title = document.querySelector(".content > h1:nth-child(1)");
diff --git ocitysmap/draw_utils.py ocitysmap/draw_utils.py
index f1f6986..7c70cf4 100644
--- ocitysmap/draw_utils.py
+++ ocitysmap/draw_utils.py
@@ -186,7 +186,7 @@ def draw_text_adjusted(ctx, text, x, y, width, height, max_char_number=None,
layout = pc.create_layout()
layout.set_width(int(width_adjust * width * pango.SCALE))
layout.set_alignment(align)
- fd = pango.FontDescription("Georgia Bold")
+ fd = pango.FontDescription("Takao Pゴシック")
prefname AEON
北海道 28
青森県 6
岩手県 6
秋田県 7
宮城県 10
山形県 7
福島県 5
茨城県 15
栃木県 5
window.ccchart=(function(a){return{aboutThis:{version:"1.06.12.2",update:20131101,updateMemo:"http://ccchart.com/update.json",lisence:"MIT (later v1.x+ MIT, before v0.9x- Public Domain)",memo:"This is a Simple JavaScript chart that does not depend on libraries such as jQuery or google APIs.",demoCurrent:"http://ccchart.com/",demoDevelopment:"http://ccchart.org/",demo09xbefore:"http://ccchart.com/c/",writer:"Toshiro Takahashi @toshirot",see:"http://www.facebook.com/javascripting",blog:"http://ngw.jp/~tato/wp/",branched:"This project has branched from the jQchart, that made by Toshiro TakahashijQchart is the jQuery plugin. since 2007.http://archive.plugins.jquery.com/project/jQchart",module:[]},m:[],init:function c(l,k,j){this.drawing=false;if((""+l.nodeName).toLowerCase()==="canvas"){this.canvas=l;this.id=l.id}else{this.canvas=document.getElementById(l);this.id=l}if(typeof this.ids!=="object"){this.ids=[];this.cxs=[];this.ops=[];this.gcf=this.gcf||{};this.wses=[];this.wsuids=[];this.wsReCnt=[];this.idsLen=0;th
import sys
import osgeo.gdal_array as gdalarray
sys.exit(0)
#!/bin/bash
# build emacs with experimental/hackers-only patch
# usage:
# ./makeemacs.sh EMACS_VER MACPORT_VER <PRE>
# example:
# ./makeemacs.sh 24.3 4.8
# ./makeemacs.sh 24.3.90 4.90 PRE
# ref:
# - ftp://ftp.math.s.chiba-u.ac.jp/emacs/
# - http://sakito.jp/emacs/emacs24.html
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
margin: 0;
}
.map {
position: relative;
ogr2ogr.exe -s_srs "+proj=latlong +datum=WGS84 +axis=neu +wktext" -t_srs "+proj=latlong +datum=WGS84 +axis=enu +wktext" -f "ESRI Shapefile" new_shape_file gml_file
gdalbuildvrt.exe --config GDAL_CACHEMAX 2048 el_lka.vrt el\globalm\area\raster\el*.bil
gdal_translate.exe -a_srs EPSG:4326 --config GDAL_CACHEMAX 2048 el_lka.vrt el_lka.tif
gdal2tiles -r near -e -v -z 0-11 raster\el_lka.tif tms\el_lka
tms2xyz tms\el_lka tiles\el_lka