Skip to content

Instantly share code, notes, and snippets.

Avatar

Masahiro TAMURA tamoot

  • とやまし
  • Toyama, Japan
View GitHub Profile
@tamoot
tamoot / doc2rstcsvtable.rb
Created Feb 19, 2016
共有サーバ上の仕様書の状況をreStructuredTextのcsv-tableで標準出力へ
View doc2rstcsvtable.rb
# -*- coding: utf-8 -*-
require 'kconv'
require 'digest/md5'
require 'date'
KOKYAKUSAMA = '○○様'
JOGAI = "^00|OLD|old|~|調査|mock|\.\d\d\d\d\d\d\d\d|品質監査|Thumbs.db|参考|bak|.zip$"
@tamoot
tamoot / gist:9f322752340c781bbfb9
Created Jan 18, 2016
RHEL6.5にdocker入れるときのコマンド
View gist:9f322752340c781bbfb9
rpm -U http://vault.centos.org/6.6/updates/x86_64/Packages//device-mapper-libs-1.02.90-2.el6_6.3.x86_64.rpm http://vault.centos.org/6.6/updates/x86_64/Packages//device-mapper-event-1.02.90-2.el6_6.3.x86_64.rpm http://vault.centos.org/6.6/updates/x86_64/Packages//device-mapper-event-libs-1.02.90-2.el6_6.3.x86_64.rpm http://vault.centos.org/6.6/updates/x86_64/Packages//device-mapper-1.02.90-2.el6_6.3.x86_64.rpm
@tamoot
tamoot / instagram.rb
Created Oct 23, 2015
#tDiary instagram プラグイン 統合版 + 認証付きproxy版
View instagram.rb
# -*- coding: utf-8 -*-
#
# instagram.rb - embed your photo/videos in instagram to a diary
#
# Author: Tatsuya Sato
# License: GPL
require 'cgi'
require 'json'
require 'uri'
require 'net/http'
View instagram.rb
# -*- coding: utf-8 -*-
#
# instagram.rb - embed your photo/videos in instagram to a diary
#
# Author: Tatsuya Sato
# License: GPL
require 'cgi'
require 'json'
require 'uri'
require 'net/http'
@tamoot
tamoot / kankore_2015_summer_event_memo.rst
Last active Aug 29, 2015
艦これ2015夏イベントメモ
View kankore_2015_summer_event_memo.rst
View bookmarklet.js
javascript:prompt('Title%20+%20URL', '[[' + document.title+'%5Cn'+location.href + ']]')();
@tamoot
tamoot / sample.java
Created May 2, 2015
素人がGenericsを使おうとしたさんぷる
View sample.java
package sample;
public class HogeClient {
private Adapter adapter;
private static Class<? extends Adapter> staticAdapter;
public Adapter getAdaper() {
if ( staticAdapter != null){
try {
this.adapter = staticAdapter.newInstance();
@tamoot
tamoot / tabelog.rb
Created Apr 22, 2015
tDiary用食べログ店舗情報埋め込みプラグイン
View tabelog.rb
require 'uri'
def tabelog_badge(url, name)
id = File::basename(URI::parse(url).path)
script_url = %Q|http://tabelog.com/badge/google_badge?escape=false&rcd=#{id}|
return %Q|<div><strong><a href="#{url}" target="_blank">#{h(name)}</a></strong><br><script src="#{script_url}" type="text/javascript" charset="utf-8"></script></div>|
end
View sampl.html
<!doctype html>
<!--[if lt IE 7 ]><html lang="ja" class="no-js ie6"><![endif]-->
<!--[if (gt IE 6)|!(IE)]><!-->
<html lang="ja" class="no-js">
<!--<![endif]-->
<head>
<meta charset="utf-8">
<title>SDD全国こども書道コンクール2015|JD共済</title>
<meta name="keywords" content="飲酒運転撲滅,書道,習字,コンクール,SDD,FM大阪,ジェイ・ディ共済協同組合">
@tamoot
tamoot / part_of_dot_xyzzy
Created Jan 21, 2015
.xyzzyでのrest2html.bat実行用定義
View part_of_dot_xyzzy
(defun rst2html ()
(interactive)
(let* ((rst-file (get-buffer-file-name))
(html-file (concat (directory-namestring rst-file)
(pathname-name rst-file)
".html")))
(call-process (concat "D:\\App\\python_2_7_5\\python D:\\App\\python_2_7_5\\Scripts\\rst2html.py "
rst-file
" "
html-file