Skip to content

Instantly share code, notes, and snippets.

View f-akazawa's full-sized avatar

Fumihiko Akazawa f-akazawa

View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@f-akazawa
f-akazawa / jupyter_notebook_config.py
Last active April 5, 2016 00:25
AWS EC2でjupyter + opencv(Ipython notebook + opencv) ref: http://qiita.com/f-akazawa/items/9398772d59139de07dbe
c.NotebookApp.ip ='*' <外部からアクセス可能にする
c.NotebookApp.port = 8888 <EC2のセキュリティグループで開けたポートに合わせる
**パスワード設定も書く必要あり、別記事にする**
@f-akazawa
f-akazawa / file0.txt
Last active October 28, 2015 06:24
nginxとphp-fpmでphpがAccess deniedで表示されない ref: http://qiita.com/f-akazawa/items/2b92bdad4744566e01d9
yyyy/mm/dd hh:mm:ss [error] xxxxx#xxxxx: *1 FastCGI sent in stderr: "PHP message: PHP Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
Unable to open primary script: /usr/share/nginx/html/mysite/index.html (Permission denied)" while reading response header from upstream, client: 192.168.xx.xxx, server: localhost, request: "GET /mysite/ HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm/php-fpm.sock:", host: "myserver.com"
@f-akazawa
f-akazawa / file0.txt
Last active June 1, 2016 08:34
nginxとphp-fpmでhtmlファイルのphpを動かす ref: http://qiita.com/f-akazawa/items/a5d0bf61d78a052df85a
/etc/php-fpm.d/www.conf
user = nginx
group = nginx
listen = /var/run/php-fpm/php-fpm.sock
listen.mode = 660
security.limit_extensions = .php .html
wget http://ftp.mozilla.org/pub/mozilla.org/js/js185-1.0.0.tar.gz
tar xzvf js185-1.0.0.tar.gz
cd js185-1.0.0/src
./configure
make
sudo make install
system("su -u UserA -s スクリプト.sh"); > 検索スクリプトを実行
wait,終了を戻り値で確認してから
system("su -u UserA -s zip -r 出来上がりファイル名".".zip"); > ZIPへ圧縮
$cmd = "sudo -u userA -s /usr/local/matlab/bin/matlab myProgram\($input1,$input2\)";
exec($cmd);
#start on (local-filesystems
# and started dbus
# and static-network-up)
wordpressの例
server{
listen 8000; <<<ここを変える
root /home/wordpress;<<<ここも変える
access_log /var/log/nginx/wp_access.log;<<ログも変えておく
error_log /var/log/nginx/wp_error.log;
location / {
index index.php;
}