- Information
- Schedule
- Download
- Documents
This file contains hidden or 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 has('vim_starting') | |
| set nocompatible | |
| set runtimepath+=~/.vim/bundle/neobundle.vim/ | |
| endif | |
| if !has('gui_running') | |
| set t_Co=256 | |
| endif | |
| call neobundle#begin(expand('~/.vim/bundle')) |
This file contains hidden or 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
| require 'open-uri' | |
| require 'nokogiri' | |
| # date | |
| date = '20131213' | |
| # open tv.so-net.ne.jp and parse it by Nokogiri | |
| target = 'http://tv.so-net.ne.jp/chart/23.action?head=' + date + '0000&span=24' | |
| doc = Nokogiri::HTML(open(target)) |
This file contains hidden or 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
| require 'nokogiri' | |
| require 'open-uri' | |
| require 'pp' | |
| html = open('') | |
| sleep 10 | |
| doc = Nokogiri::HTML(html) |
This file contains hidden or 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
| mysql_config --socket |
This file contains hidden or 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
| @import 'compass'; | |
| * { | |
| @include box-shadow(0px 0px 10px black, 0px 0px 10px black); | |
| } |
This file contains hidden or 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
| gem 'sass-rails', '~> 4.0.0' | |
| gem 'compass-rails', github: 'Compass/compass-rails', branch: 'rails4-hack' |
This file contains hidden or 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
| # Global configuration has been removed, as it was not threadsafe. | |
| # Without this, you will face an error saying: NoMethodError: undefined method `configure' for Twitter:Module | |
| client = Twitter::REST::Client.new do |config| | |
| config.consumer_key = "YOUR_CONSUMER_KEY" | |
| config.consumer_secret = "YOUR_CONSUMER_SECRET" | |
| config.access_token = "YOUR_ACCESS_TOKEN" | |
| config.access_token_secret = "YOUR_ACCESS_SECRET" | |
| end |
This file contains hidden or 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
| class Post < ActiveRecord::Base | |
| # posts table から、public が 1 なレコードの id 一覧を取得する | |
| def self.public_post_id_list | |
| Array(select('id').where(public:1).order('id desc')).map{|a| a.id.to_i} | |
| end | |
| end |
This file contains hidden or 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
| <?php | |
| /** | |
| * 降水量をもとに、雨の強さを気象庁風に表現する | |
| * 参考: 気象庁 | 雨と風の表 http://www.jma.go.jp/jma/kishou/know/yougo_hp/amehyo.html | |
| * | |
| * @example | |
| * <code> | |
| * echo getRainstatus(15); // => 'やや強い雨' | |
| * </code> |