This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
find ./ -type f -name "*.html" | while read i | |
do | |
nkf -w $i > $i._backup | |
done | |
find ./ -type f -name "*._backup" | while read i | |
do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// coffeeだったら文字列展開できるもん | |
$(function(){ | |
// 追加 | |
// $(document)をあとでかえる | |
$(document).on('ajax:complete', 'a.ajax_link_add', function(data, ajax, xhr){ | |
response = $.parseJSON(ajax.responseText); | |
$("#book_" + response.id).fadeOut("fast", function(){ | |
$("#book_" + response.id).remove(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if yes?('Use Template?') | |
add_source('https://rails-assets.org') | |
gem 'rails-assets-bootstrap' | |
remove_file './test' | |
gem_group :development, :test do | |
gem 'pry-rails' | |
gem 'pry-doc' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"新しい行のインデントを現在行と同じにする | |
set autoindent | |
"バックアップファイルを作るディレクトリ | |
set backupdir=$HOME/vimbackup | |
"ファイル保存ダイアログの初期ディレクトリをバッファファイル位置に設定 | |
set browsedir=buffer | |
"クリップボードをWindowsと連携 | |
set clipboard=unnamed | |
"Vi互換をオフ | |
set nocompatible |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://mojolingo.com/blog/2013/tests-mocks-rspec/ | |
mock_http = double('http') | |
mock_response = double('response') | |
Net::HTTP.should_receive(:start).with(uri.host, uri.port).and_yield(mock_http) | |
mock_http.should_receive(:get).with("/").and_return(mock_response) | |
mock_response.should_receive(:code).and_return('302') | |
uri = URI.parse("http://google.com") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: Shift_JIS | |
require "pry" | |
class String | |
def remove!(string) | |
gsub!(string, "") | |
end | |
end | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/zsh | |
for file in `ls /home/dep/www/**/*.html` | |
do | |
echo $file | |
# hokkaido | |
source='<a [^>]*>北海道|宮城県|福島県</a>' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yakusus = {} | |
RANGE = 1000 | |
TARGER_YAKUSU_COUNT = 5 | |
RANGE.times do |outer_i| | |
yakusu_count = 0 | |
outer_i.times do |i| | |
if(outer_i % (i + 1) == 0) | |
yakusu_count += 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# return : [{"count"=>"7", "kana"=>"え"}, {"count"=>"7", "kana"=>"も"} .....] あ〜(濁点文字含む51要素の配列) | |
# 辞典の読み方カラムの頭文字で集計した結果を返す | |
sql = <<-EOF | |
select | |
count(kana), | |
substr(kana, 1, 1) as kana | |
from | |
words | |
where |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
OP daze | |
3話 挿入歌 メカクシコード | |
http://www.youtube.com/watch?v=o4owr0pxdV8 | |
4話 挿入歌 カゲロウデイズ | |
http://www.youtube.com/watch?v=IDMGbCOXO4U | |
6話 | |
ヘッドフォンアクター |
OlderNewer