Skip to content

Instantly share code, notes, and snippets.

@siwasu17
siwasu17 / gist:4434529
Created January 2, 2013 13:16
KeyRemap4MacBookで、Ctrl+j を esc キーへ変換するための、private.xml
<?xml version="1.0"?>
<root>
<list>
<item>
<name>absolute ctrl+j to esc</name>
<identifier>remap.absolute_ctrl_j_to_esc</identifier>
<autogen>--KeyToKey-- KeyCode::J, ModifierFlag::CONTROL_L, KeyCode::ESCAPE</autogen>
</item>
</list>
</root>
#!/usr/bin/env ruby
# coding: utf-8
#
# http://www.apple.com/itunes/affiliates/resources/documentation/itunes-store-web-service-search-api.html
#
require 'rubygems'
require 'json'
require 'open-uri'
require 'uri'
@siwasu17
siwasu17 / callOpenWeatherMap.rb
Last active December 19, 2015 03:39
Open Weather Map http://openweathermap.org/ を呼び出す練習
#!/usr/bin/env ruby
# -*- encoding: utf-8 -*-
require 'open-uri'
require 'json'
# 池袋
#緯度:35.728926 経度:139.71038
lat=35.7280926
lon=139.71038
function Sleep( T ){
var d1 = new Date().getTime();
var d2 = new Date().getTime();
while( d2 < d1+1000*T ){ //T秒待つ
d2=new Date().getTime();
}
return;
};
var Cell = function(){