doctype 5
html ->
head ->
meta charset: 'utf-8'
title "#{@title}"
link rel: 'stylesheet', href: 'http://twitter.github.com/bootstrap/1.4.0/bootstrap.min.css'
style '''
#content {padding-top: 60px}
'''
body ->
div '.topbar-wrapper', ->
div '.topbar', ->
div '.topbar-inner', ->
div '.container', ->
h3 -> a href: '/', -> @title
ul '.nav', ->
li -> a href: 'post/new', -> 'あたらしい投稿'
div '#content.container', ->
@body
views/index.coffee
for post in @posts
h1 -> a href:"/post/#{post.id}", -> post.title
p '.content', -> post.body
mongoose = require 'mongoose'
Post = new mongoose.Schema(
title: String,
body: String
)
module.exports = mongoose.model 'Post', Post
ビュー
views/layout.jade
!!!5
html
head
title= title
link(rel="stylesheet", href="http://twitter.github.com/bootstrap/1.4.0/bootstrap.min.css")
style(type="text/css")
#content {padding-top: 60px; }
body
.topbar-wrapper
.topbar
.topbar-inner
.container
h3: a(href="/")= title
ul.nav
li: a(href="/post/new") あたらしい投稿
#content.container!=body
views/index.jade
- each post in posts
.page-header
h1
a(href="/post/#{post.id}")= post.title
.content!=post.body
$ tar xzvf httpd-2.4.1.tar.gz
$ cd httpd-2.4.1
$ ./configure
$ make
$ sudo cp support/ab /usr/sbin
$ ab -V
This is ApacheBench, Version 2.3 <$Revision: 1178079 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
var crypt = require('crypto');
var cipher = crypt.createCipher('aes256', 'Gufdre89uCXJijdi');
var text = 'この文字列を暗号化します';
var crypted = cipher.update(text, 'utf8', 'hex');
crypted += cipher.final('hex');
console.log('暗号化した文字列: ' + crypted);
var decipher = crypt.createDecipher('aes256', 'Gufdre89uCXJijdi');
var dec = decipher.update(crypted, 'hex', 'utf8');
dec += decipher.final('utf8');
console.log('復号化した文字列: ', dec);
$ openssl genrsa -out key.pem 1024
$ openssl req -new -key key.pem -out csr.pem
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:JP
State or Province Name (full name) [Some-State]:Tokyo
Locality Name (eg, city) []:Shinagawa
Organization Name (eg, company) [Internet Widgits Pty Ltd]:Lucky And Happy Ltd
Organizational Unit Name (eg, section) []:
Common Name (eg, YOUR name) []:Tomoyuki Inoue
Email Address []:メールアドレス
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:
$ openssl x509 -req -in csr.pem -signkey key.pem -out cert.pem