Skip to content

Instantly share code, notes, and snippets.

server {
listen 80;
server_name memorycraft.cloudpack.jp;
location / {
proxy_pass http://127.0.0.1:49174;
}
}
server {
listen 80;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
[supervisord]
nodaemon=true
[program:sshd]
command=/usr/sbin/sshd -D
autostart=true
autorestart=true
[program:nginx]
command=/usr/sbin/nginx -c /etc/nginx/nginx.conf
# centosがベース
FROM centos
# 作成者
MAINTAINER memorycraft
# yumでいろいろインストール
RUN rpm -ivh http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm
RUN yum install sudo passwd openssh openssh-clients openssh-server vim python-setuptools nginx -y
[supervisord]
nodaemon=true
[program:sshd]
command=/usr/sbin/sshd -D
autostart=true
autorestart=true
[program:httpd]
command=/usr/sbin/httpd -c "ErrorLog /dev/stdout" -DFOREGROUND
# centosがベース
FROM centos
# 作成者
MAINTAINER memorycraft
# yumでいろいろインストール
RUN yum install sudo passwd openssh openssh-clients openssh-server httpd vim python-setuptools php php-devel php-mysql php-mbstring php-gd -y
# sshdの設定
@memorycraft
memorycraft / gmcomposite.js
Created February 10, 2014 22:01
gm:合成処理のモジュール化
//合成処理のモジュール化
var spawn = require('child_process').spawn
var fs = require('fs');
//子プロセスで処理
var gmcomposite = function(change_path, base_path, mask_path, output_path, callback) {
var c = spawn('gm', ['composite', '-quality', 100, '-geometry', '+0+0', change_path, base_path, output_path]);
c.stderr.on('data', function(data) {
console.log('stderr: ' + data);
})
@memorycraft
memorycraft / image.js
Last active August 29, 2015 13:56
gm:イメージ構成のメイン処理
//モジュール読込
var http = require('http');
var url = require('url');
var gm = require('gm');
var gmcomposite = require('./gmcomposite');
var fs = require('fs');
var argv = require('argv');
//コマンドオプション定義
argv.option([{
import java.io.InputStream;
import java.io.ByteArrayInputStream;
import java.nio.charset.Charset;
import java.nio.charset.CharsetDecoder;
import java.nio.charset.CharacterCodingException;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.lang.reflect.Field;
import com.amazonaws.services.kinesis.clientlibrary.interfaces.IRecordProcessor;
import com.amazonaws.services.kinesis.clientlibrary.interfaces.IRecordProcessorFactory;
/**
* Used to create new record processors.
*/
public class MemorycraftKinesisDistanceProcessorFactory implements IRecordProcessorFactory {
/**
* Constructor.