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 / .e2esound.vim
Created June 16, 2012 05:31
とりあえずこれだけあれば…的な
" e2esound color scheme based on ir_black
set background=dark
hi clear
if exists("syntax_on")
syntax reset
endif
let g:colors_name = "e2esound"
<?php
class Bowling
{
public $score = 0;
public function hit($val)
{
$this->score += $val;
}
@yuya-matsushima
yuya-matsushima / gikai_nakanojyo_dl.rb
Created March 21, 2012 13:00
中之条議会だよりを掲載サイトから取得。数が多いので時間掛かる
#encoding: utf-8
require 'nokogiri'
require 'open-uri'
url = 'http://www.town.nakanojo.gunma.jp/gikai/gikaidayori/top.html'
base = 'http://www.town.nakanojo.gunma.jp/gikai/gikaidayori/'
name = '中之条議会だより'
html = Nokogiri::HTML(open(url))
@yuya-matsushima
yuya-matsushima / kouhou_higashiagatsuma_dl.rb
Created March 21, 2012 12:59
広報ひがしあがつまを掲載サイトから取得
#encoding: utf-8
require 'nokogiri'
require 'open-uri'
url = 'http://www1.town.higashiagatsuma.gunma.jp/www/contents/1320623094013/index.html'
base = 'http://www1.town.higashiagatsuma.gunma.jp/'
name = '広報ひがしあがつま'
html = Nokogiri::HTML(open(url))
@yuya-matsushima
yuya-matsushima / agatsuma_gikai_dl.rb
Created March 21, 2012 12:58
東吾妻議会だよりをリンク掲載サイトから引きぬく
#encoding: utf-8
require 'nokogiri'
require 'open-uri'
url = 'http://www1.town.higashiagatsuma.gunma.jp/www/contents/1204215018844/index.html'
base = 'http://www1.town.higashiagatsuma.gunma.jp/'
name = '東吾妻議会だより'
html = Nokogiri::HTML(open(url))
<div id="hoge">
<!--/#hoge--></div>
<!-- ↓ change -->
<div id="hoge">
<!--/#hoge--></div>
shell zsh
hardstatus alwayslastline "[%02c] %`%-w%{=b bw}%n %t%{-}%+w"
startup_message off
escape ^Z^Z
vbell off
altscreen on
# 起動時にwindow開く
screen -t db 1
screen -t log 2
# key-mode
set -g status-keys vi
set-window-option -g utf8 on
# prefix を C-z に変更する
set-option -g prefix C-z
unbind-key C-b
bind-key C-z send-prefix
^application\/((?:(?!cache|errors|logs|views).+\/.+)).*\.php$
@yuya-matsushima
yuya-matsushima / file_suffix.php
Created November 11, 2011 09:04
file_suffix.php
<?php
if ( ! function_exists('file_suffix'))
{
function file_suffix($file, $format='Ymdhis')
{
$CI = get_instance();
$file_path = FCPATH . ltrim($file, '/');
if (file_exists($file_path)) {