Skip to content

Instantly share code, notes, and snippets.

@htakeuchi
htakeuchi / param.json
Last active December 20, 2015 00:29
RubyMotionでネットワークに置いたJSONを入力パラメタに使用 (webrick.rbはhttps://gist.github.com/Watson1978/4573005より) BubbleWrapが必要
{
"brightness": 0.07,
"saturation": 1.1,
"sharpness": 0.1
}
@htakeuchi
htakeuchi / Rakefile
Last active August 29, 2015 14:15
Rakefile for using fabric in RubyMotion
# -*- coding: utf-8 -*-
$:.unshift("/Library/RubyMotion/lib")
require 'motion/project/template/ios'
begin
require 'bundler'
Bundler.require
rescue LoadError
end
@htakeuchi
htakeuchi / login_controller.rb
Created February 21, 2015 01:47
Sample for using Fabric in RubyMotion
class LoginController < UIViewController
def viewDidLoad
super
@button = TWTRLogInButton.buttonWithLogInCompletion Proc.new {|session, error|
if error
NSLog("Error : #{error}")
else
NSLog("UserName : #{session.userName}")
class TimelineController < UIViewController
def viewDidLoad
super
@tweets = []
@table = UITableView.alloc.initWithFrame(self.view.bounds)
@table.registerClass(TWTRTweetTableViewCell, forCellReuseIdentifier: 'Cell')
@table.dataSource = self
@table.delegate = self
@htakeuchi
htakeuchi / addStyleSheet.js
Last active February 2, 2016 22:13
スタイルシートを動的に読み込む
function addStyleSheet(href) {
var link = document.createElement("link");
link.setAttribute("rel", "stylesheet");
link.setAttribute("type", "text/css");
link.setAttribute("href", href);
var head = document.getElementsByTagName("head")[0];
head.appendChild(link);
}
@htakeuchi
htakeuchi / kobito2markdown.rb
Last active July 24, 2017 05:20
KobitoのデータベースからMarkdownを抽出
# -*- coding: utf-8 -*-
require 'rubygems'
require 'sqlite3'
# ~/Library/Containers/com.qiita.Kobito/Data/Library/Kobito/Kobito.db
KOBITO_DB = "/tmp/Kobito.db"
EXPORT_PATH = "/tmp/export"
COLUMNS = %w(ZTITLE ZRAW_BODY)
db = SQLite3::Database.new(KOBITO_DB)
@htakeuchi
htakeuchi / .block
Last active March 17, 2020 12:16
Line Chart on Bar Chart (D3.js V4)
license: mit
@htakeuchi
htakeuchi / jclubs.json
Created April 7, 2018 07:37
Jリーグ登録選手・クラブ一覧(J1/J2/J3 2018年4月7日現在)
[{"name":"北海道コンサドーレ札幌","team_number":14,"category":1},{"name":"ベガルタ仙台","team_number":54,"category":1},{"name":"鹿島アントラーズ","team_number":1,"category":1},{"name":"浦和レッズ","team_number":3,"category":1},{"name":"柏レイソル","team_number":11,"category":1},{"name":"FC東京","team_number":22,"category":1},{"name":"川崎フロンターレ","team_number":21,"category":1},{"name":"横浜F・マリノス","team_number":5,"category":1},{"name":"湘南ベルマーレ","team_number":12,"category":1},{"name":"清水エスパルス","team_number":7,"category":1},{"name":"ジュビロ磐田","team_number":13,"category":1},{"name":"名古屋グランパス","team_number":8,"category":1},{"name":"ガンバ大阪","team_number":9,"category":1},{"name":"セレッソ大阪","team_number":20,"category":1},{"name":"ヴィッセル神戸","team_number":18,"category":1},{"name":"サンフレッチェ広島","team_number":10,"category":1},{"name":"サガン鳥栖","team_number":33,"category":1},{"name":"V・ファーレン長崎","team_number":47,"category":1},{"name":"モンテディオ山形","team_number":29,"category":2},{"name":"水戸ホーリーホック","team_number":94,"category":2},{"name":"栃木SC","team_number":40,"category":2},{"
@htakeuchi
htakeuchi / japan.topojson
Last active April 8, 2018 01:14
日本地図(TopoJSON)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.