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
| .bgimage { | |
| background: #fffff url(image-path('css/background.png')) repeat-x; | |
| } |
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
| # color | |
| autoload -Uz colors | |
| colors | |
| # left prompt | |
| case ${UID} in | |
| 0) | |
| PROMPT="# " | |
| PROMPT2="%_# " | |
| SPROMPT="%{${fg[red]}%r%} %{$reset_color%}is correct? [n,y,a,e]: " |
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
| # right prompt | |
| autoload -Uz add-zsh-hook | |
| autoload -Uz vcs_info | |
| zstyle ':vcs_info:*' enable git svn hg bzr | |
| zstyle ':vcs_info:*' formats '[%b]' | |
| zstyle ':vcs_info:*' actionformats '[%b|%a]' | |
| zstyle ':vcs_info:(svn|bzr):*' branchformat '%b:r%r' | |
| zstyle ':vcs_info:bzr:*' use-simple true |
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
| Process: ruby [60151] | |
| Path: /Users/USER/*/ruby | |
| Identifier: ruby | |
| Version: ??? (???) | |
| Code Type: X86-64 (Native) | |
| Parent Process: ruby [60090] | |
| Date/Time: 2012-05-11 16:15:34.942 +0900 | |
| OS Version: Mac OS X 10.7.3 (11D50b) | |
| Report Version: 9 |
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
| # -*- coding: utf-8 -*- | |
| require './age_calc' | |
| require 'date' | |
| describe AgeCalc do | |
| before do | |
| @age_calc = AgeCalc.new | |
| end | |
| it "birthdayで誕生日が設定できること" do |
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 AgeCalc | |
| attr_accessor :birthday | |
| def age | |
| @age ||= calculate_age | |
| end | |
| def calculate_age | |
| if @birthday | |
| (Time.now.strftime("%Y%m%d").to_i - @birthday.strftime("%Y%m%d").to_i) / 10000 |
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
| # ~/.tmuxinator/rails_app.yml | |
| # you can make as many tabs as you wish... | |
| project_name: rails_app | |
| project_root: ~/src/rails/rails_app | |
| tabs: | |
| - main: | |
| layout: even-horizontal | |
| panes: | |
| - #shell |
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
| PATH=$HOME/.rvm/bin:$PATH | |
| [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" |
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
| (Date.new(2001,1,1)..Date.new(2019,12,31)).select { |x| | |
| str = x.to_s.gsub('-0','') | |
| str.split('').uniq.size == str.size | |
| }.size | |
| => 210 |
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
| ruby -r 'webrick' -e 'include WEBrick;HTTPServer.new(Port: 8888, DocumentRoot: "public_html/").start' |