##なぜ使うか
ふつうにnodeコマンドで実行した場合、プロセスが死んだらそのまま。
foreverを使えば死活監視をして、プロセスを再起動してくれる。
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
# apacheと同じでサービスコマンドでデーモンを起動したり停止したり | |
sudo service nginx start | |
sudo service nginx stop | |
sudo service nginx restart | |
# 自動起動も同じ | |
sudo chkconfig nginx on | |
sudo chkconfig nginx off |
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
Index.flipImage = function() { | |
var index = 0; | |
var column = 5; | |
var fps = 30; | |
var length = 70; | |
var width = 150; | |
var height = 150; | |
(function render() { | |
var x = - (index % column) * width; |
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
.sample { | |
background-image: linear-gradient(to top, #e91d25, #e91d25), linear-gradient(to top, #929497, #929497); | |
background-position: left top, right top; | |
background-repeat: no-repeat, no-repeat; | |
background-size: 50% 100%, 50% 100%; | |
} |
##GLSL
webGL Shader Language
シェーダを記述するための言語
書き方はほとんどC言語
##シェーダってなにさ
3Dモデルを構築するのに必要な概念
ざっくりいえば位置を決める頂点シェーダと、
色を決めるフラグメントシェーダがある。
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
プリミティブ型は値渡し。 | |
オブジェクトは参照渡しになる。 | |
関数の中でオブジェクトをいじったらもとのオブジェクトもかわる。 | |
値を渡してるわけじゃないので当たり前ですが・・・びっくり。 |
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
(function render(){ | |
// canvasを初期化 | |
gl.clearColor(0.0, 0.0, 0.0, 1.0); | |
gl.clearDepth(1.0); | |
gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT); | |
// カウンタをインクリメントする | |
count++; | |
// カウンタを元にラジアンを算出 |
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
import React, {PropTypes} from 'react' | |
import { render } from 'react-dom' | |
import { createStore } from 'redux' | |
import { Provider } from 'react-redux' | |
import { connect } from 'react-redux' | |
// Action Creator | |
function increment() { | |
return { | |
type: 'INCREMENT' |
##制限の考え方
ユーザ毎ログインディレクトリを変更することで、
ルートなどの危ないところにはアクセスさせ内容にする。
ファイルの場所 => /etc/vsftpd/
FTPを使うのはWebサーバ用にファイルをアップする目的だと思うので、 FTPのためだけにユーザを作成せずに、バーチャルユーザを作成し、 そいつをapacheなどのユーザに化けさせて接続させてあげると、 Webサーバのユーザとファイルの所有者などがごちゃごちゃにならずによい。
##Laravelとは ウェブ職人のためのPHPフレームワーク
##シンプルな流れ ユーザ ↓ Request リクエストの処理(POSTを変数にいれたり) ↓ Middleware 事前処理(CSRFとか認証とか) ↓