gcm_sender_id
は適切な値に書き換える。
localhost でテストする限りに於いては変更する必要なし。
gcm_sender_id
は適切な値に書き換える。
localhost でテストする限りに於いては変更する必要なし。
#!/bin/sh | |
if [ -z $1 ]; then | |
echo 'usage: minfix.sh image_path' | |
exit 1 | |
fi | |
image_path=$1 | |
min_width=511 | |
min_height=375 |
/** | |
問題 | |
入力: なし | |
出力: | |
高橋一郎 | |
高橋二郎 | |
高橋三郎 | |
高橋四郎 | |
高橋五郎 | |
高橋六郎 |
upstream backend { | |
server unix:/tmp/backend.sock; | |
} | |
server { | |
listen 4433 ssl; | |
server_name _; | |
# SSL | |
ssl_certificate /usr/local/etc/openssl/certs/cert.pem; |
Xcode をインストール。
その後、 Terminal.app
から以下の 1 行を実行して Command Line Tools をインストールする。
xcode-select --install
# BEGIN Redirect naked domain | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{HTTP_HOST} ^(example\.com|example\.org)$ | |
RewriteRule .* http://www.example.com/$0 [QSA,R=301,L] | |
</IfModule> | |
# END Redirect naked domain |
fibonacci = Enumerator.new do |y| | |
i = [0, 1] | |
loop do | |
y << i[0] | |
i = [i[1], i[0] + i[1]] | |
end | |
end | |
# 遅延評価 | |
p fibonacci.lazy.map{|x| x ** 2}.take(20).force |
/** | |
* Life Game - Cellular Automaton | |
* | |
* Author: Takenori Nakagawa | |
* License: GPLv3 | |
*/ | |
// cell constructor | |
function Cell(x, y, init) { | |
var value; |
function F(message) { | |
this.message = message; | |
} | |
F.prototype.print = function () { | |
console.log(this.message); | |
}; | |
// F を継承した G | |
function G(message, name) { | |
F.call(this, message); |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>mylib</title> | |
</head> | |
<body> | |
<script src="mylib.js" data-mylib="lib"></script> | |
<script> | |
addEventListener("load", function () { |