This file contains 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
mkdir sugos-tutorial-01 | |
cd sugos-tutorial-01 | |
npm init -y | |
This file contains 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
'use strict' | |
const co = require('co') | |
const sugoActor = require('sugo-actor') | |
const { Module } = sugoActor | |
co(function * () { | |
// Define a module with methods | |
let tableTennis = new Module({ | |
ping (pong) { |
This file contains 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
#!/bin/bash | |
## Install docker on AWS | |
### See http://docs.aws.amazon.com/AmazonECS/latest/developerguide/docker-basics.html | |
sudo yum update -y | |
sudo yum install -y docker | |
sudo service docker start | |
sudo usermod -a -G docker ec2-user |
This file contains 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
"use strict"; | |
function firefox(action) { | |
var handler = firefox.handlers[action.index]; | |
if (handler) { | |
return new Promise(handler); | |
} | |
console.log('Done in FireFox'); | |
return null; | |
} |
This file contains 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
#!/bin/bash | |
# | |
# Start Docker terminal and set theme. | |
# | |
TERMINAL_APP="Terminal" | |
TERMINAL_THEME="Novel" | |
# Set Terminal theme | |
osascript -e " |
This file contains 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
# Instal coz via npm | |
$ npm install coz -g |
This file contains 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
// Mysql connect config. | |
var config = { | |
user: 'root', | |
password: 'my_password', | |
host: 'localhost', | |
database: 'my_db' | |
}; | |
// Get spec for connected database | |
mysqlspec(config, function (err, schema) { | |
console.log("schema=" + JSON.stringify(schema, null, 4)); |
This file contains 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
// nodeunitのテストケース | |
exports.setUp = function(done){ | |
// console.logを何もしない関数と置き換える | |
console.log = function noop() { | |
} | |
done(); | |
}; |
This file contains 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
$ cp src/*.html dest |
This file contains 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
"dependencies":{ | |
"async":"*", | |
"glob":"latest" | |
} |