Skip to content

Instantly share code, notes, and snippets.

deguchi

Block or report user

Report or block deguchi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@deguchi
deguchi / Elevation
Created Sep 4, 2014
カーリルAPIとGoogle Maps APIを使って図書館の高度の一覧を作成する
View Elevation
log = (obj) ->
try
console.log obj
map = new google.maps.Map(document.getElementById("map"),
zoom: 7
center: new google.maps.LatLng(36, 138)
mapTypeId: google.maps.MapTypeId.ROADMAP
)
#google.maps.event.addListener map, "click", (mouseEvent) ->
@deguchi
deguchi / gist:1505fbce712b826a4971
Created Sep 17, 2014
OpenStreetMapを使ったジオコーディング
View gist:1505fbce712b826a4971
$('#map_search').submit ->
url = 'http://nominatim.openstreetmap.org/search'
$.ajax
url: url
type: "GET"
data:
q: $('#map_query').val()
format: "json"
dataType: "jsonp"
jsonp: "json_callback"
View Gyazo Viewer on 紙copi
OnClipboardChange:
if RegExMatch(clipboard, "^http://gyazo.com/(.*?)\.png$")
{
FileAppend, <img src="%clipboard%"><br>`n`n, C:\My Documents\Kami Data\Gyazo\index.html
}
return
@deguchi
deguchi / gist:756941
Created Dec 28, 2010
TVにつないだMacに、iPhoneからUstreamを再生させるスクリプト
View gist:756941
#利用方法: このスクリプトをTVにつないだMac上で実行、以下のブックマークレットのloccalip部分をMacのIPに変更。それをiPhoneに送ってブックマーク登録する。(ブックマークに登録後、?より前は削除)
#Bookmarklet: http://www​.google.co​m/?javascr​ipt:window​.open('htt​p://localip:9191/r​un?url='+d​ocument.ge​tElementsB​yTagName('​video')[0]​.src)
#iPhone用の配信をしているUstreamの個別ページでブックマークレットを実行。
#TVでUstreamがフルスクリーン再生される
require 'webrick'
document_root = '/Users/deguchi/Desktop/'
server = WEBrick::HTTPServer.new({
@deguchi
deguchi / app.coffee
Created Jan 4, 2011
Titanium sample on CoffeeScript
View app.coffee
Titanium.UI.setBackgroundColor '#000'
tabGroup = Titanium.UI.createTabGroup()
win1 = Titanium.UI.createWindow
title:'Tab 1'
backgroundColor:'#fff'
tab1 = Titanium.UI.createTab
icon:'KS_nav_views.png'
View gist:764548
Titanium.UI.setBackgroundColor '#000'
tabGroup = Titanium.UI.createTabGroup()
win1 = Titanium.UI.createWindow
title:'Tab 1'
backgroundColor:'#fff'
tab1 = Titanium.UI.createTab
icon:'KS_nav_views.png'
View app.js
(function() {
var ImageTab, Tab, TabGroup, Window, log, tab1, tab2, tab3, tabGroup;
var __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) {
for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; }
function ctor() { this.constructor = child; }
ctor.prototype = parent.prototype;
child.prototype = new ctor;
child.__super__ = parent.prototype;
return child;
}, __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
@deguchi
deguchi / build.rb
Created Jan 6, 2011
Titanium build server on ruby + CoffeeScript compile
View build.rb
# original https://gist.github.com/715378
# thanks hakobe!
# Macで動作確認。Windowsの場合、spawnを使うとよいらしい。 参考: https://gist.github.com/325036
require 'webrick'
server = WEBrick::HTTPServer.new({
:DocumentRoot => nil,
:BindAddress => '0.0.0.0',
:Port => 9090
@deguchi
deguchi / gist:3185964
Created Jul 27, 2012
ローカル開発環境と本番サーバーを切り替えるbookmarklet(超適当)
View gist:3185964
javascript:var calil='calil.jp',local='127.0.0.1:8080',oldhost=calil,newhost=local;if(location.host!=calil){oldhost=local;newhost=calil;}location='http://'+newhost+location.pathname+location.search;
@deguchi
deguchi / build.rb
Created Jan 4, 2011
Titanium build server on ruby
View build.rb
# original https://gist.github.com/715378
# thanks hakobe!
# Macで動作確認。Windowsの場合、spawnを使うとよいらしい。 参考: https://gist.github.com/325036
require 'webrick'
server = WEBrick::HTTPServer.new({
:DocumentRoot => nil,
:BindAddress => '0.0.0.0',
:Port => 9090
You can’t perform that action at this time.