PG::ConnectionBad at /
could not connect to server: Connection refused
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5432?
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
@fizzbuzz = {fizz: 3, buzz: 5} | |
# 除算の結果が1増えるタイミングでFizzBuzz言う | |
def timing(x, y) | |
x / y - (x - 1) / y == 1 | |
end | |
# FizzBuzz言うぞ! | |
def call(x) | |
@fizzbuzz.each do |key, value| |
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
def eval_string(x, y) | |
(x / y.to_f).to_s.slice(/\..*/) == ".0" | |
end | |
(1..20).each do |x| | |
if eval_string(x, 5) && eval_string(x, 3) | |
puts "FizzBuzz" | |
elsif eval_string(x, 5) | |
puts "Buzz" | |
elsif eval_string(x, 3) |
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
<head> | |
<meta charset="utf-8"> | |
<title>カレーのレシピ</title> | |
</head> | |
<body> | |
<article> | |
<h1>カレーのレシピ</h1> | |
<p> | |
誰でもできる、美味しいカレーの作り方です。旦那も息子もこのカレーが大好物。 |
例えば3つ前のcommitをやり直したいとき
git rebase -i HEAD~~~
または
git rebase -i HEAD~3
(~~~の数だけHEADから遡れる)
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
/* balloon | |
=balloon-left($size: 6px, $color: #FFF, $top: 6px) | |
position: relative | |
&:after | |
position: absolute | |
content: "" | |
display: block | |
border: $size solid transparent | |
border-right: $size solid $color | |
top: $top |
NewerOlder