Skip to content

Instantly share code, notes, and snippets.

Yuki Ishikawa mazeltov7

Block or report user

Report or block mazeltov7

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@mazeltov7
mazeltov7 / gist:c4e359871375884f2f92
Created Apr 19, 2015
PDOで複数データをまとめてinsertしたい
View gist:c4e359871375884f2f92
// 遅い、つらい
$sql = "insert into hoge_table (name, screen_name) values (:name, :screen_name)";
$stmt = $dbh->prepare($sql);
for($i=0;count($contents->statuses);$i++){
$params = array(
":name" => $contents->statuses[$i]->name,
":screen_name" => $contents->statuses[$i]->screen_name
)
$stmt->execute($params);
}
View _flash_messages.html.erb
<% flash.each do |type, message| %>
<div class="alert <%= bootstrap_class_for(type) %> fade in">
<button class="close" data-dismiss="alert">×</button>
<%= message %>
</div>
<% end %>
View テストサイト1
<!DOCTYPE html>
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<title>CSS課題</title>
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="wrap">
<header id="header">
View 閏年
puts '先頭の年'
start = gets.chomp.to_i
puts '末尾の年'
stop = gets.chomp.to_i
puts 'うるう年一覧'
year = start
while year <= stop
if (year % 400 == 0) ||
(year % 100 != 0 && year % 4 == 0)
View gist:5669380
puts 'よう来たのう'
command = gets.chomp
while command != command.upcase
puts 'なんじゃて、もっと大きな声で叫んでくれ'
command = gets.chomp
end
puts '元気かいなー?'
command2 = gets.chomp
@mazeltov7
mazeltov7 / gist:5520014
Last active Dec 17, 2015
カレーのレシピ(テスト)
View gist:5520014
<!DOCTYPE HTML>
<html lang="ja">
<head>
<meta charset="UTF-8">
<meta name="description" content="カレーのレシピ">
<title>カレーのレシピ</title>
<link rel="shortcut icon" href="https://lh6.googleusercontent.com/-v9uEQkrr6Ic/AAAAAAAAAAI/AAAAAAAAAxE/x0HilNQSXJM/s120-c/photo.jpg">
</head>
<body>
<header>
You can’t perform that action at this time.