Skip to content

Instantly share code, notes, and snippets.

View yuya-matsushima's full-sized avatar
🏢
Working from Office

Yuya Matsushima yuya-matsushima

🏢
Working from Office
View GitHub Profile
@yuya-matsushima
yuya-matsushima / RTrim.vim
Last active December 10, 2015 00:39
保存時に実行する末尾スペース削除処理のうち、Markdownだけ都合がわるいのでちょっと変える
function! RTrim()
let s:cursor = getpos(".")
if &filetype == "markdown"
%s/\s\+\(\s\{2}\)$/\1/e
match Underlined /\s\{2}/
else
%s/\s\+$//e
endif
call setpos(".", s:cursor)
endfunction
"十字キー無効化
inoremap <Right> <Nop>
inoremap <Left> <ESC>
inoremap <Up> <Nop>
inoremap <Down> <Nop>
nnoremap <Right> <Nop>
nnoremap <Left> <Nop>
nnoremap <Up> <Nop>
nnoremap <Down> <Nop>
require "nokogiri"
require "open-uri"
require "date"
class Nakanojyo
def initialize
@base = "http://www.town.nakanojo.gunma.jp/~info/"
@url = @base + "shinchaku.html"
@data = Array.new
self.get
@yuya-matsushima
yuya-matsushima / nakanojyo_gikai_table.html
Created November 4, 2012 05:53
中之条町議会だよりのページをnokogiriでcss('table table talbe table')でスクレイピングした時の結果1つ
<table border="0" width="98%">
<tbody>
<tr>
<td>
<a href="no160-s.pdf" target="_blank">
<b>第160号</b>
<font size="-1">平成24年8月10日発行(PDF:2.4MB)</font>
</a>
</td>
</tr>
@yuya-matsushima
yuya-matsushima / base.scss
Created October 28, 2012 15:05
base.scss
@import url(http://fonts.googleapis.com/css?family=Karla);
html {
background:url("#{$img}/stucco.png");
body {
width:900px;
margin:0 auto;
color:$color;
}
a {
class Duration
def initialize(since, untill)
@since = since
@untill = untill
end
#setter, getter
#attr_accessor :since, :untill
def since; return @since end
# def since(value = value); @since = value end ?
var MarkdownViewModel = function () {
"use strict";
this.textData = ko.observable('edit markdown');
this.displayHtml = ko.computed(function () {
return markdown.toHTML(this.textData());
}, this);
};
@yuya-matsushima
yuya-matsushima / gist:3148307
Last active October 7, 2015 10:07
configure php5 on mac
./configure \
--prefix=/usr \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--sysconfdir=/private/etc \
--with-apxs2=/usr/sbin/apxs \
--enable-cli \
--with-config-file-path=/etc \
--with-libxml-dir=/usr \
--with-openssl=/usr \