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
"/root/.gemrc": | |
mode: "000644" | |
owner: "root" | |
group: "root" | |
content: | | |
gem: --no-rdoc --no-ri |
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
deploy: | |
artifact: /tmp/app.zip |
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
description "Elastic Beanstalk Sidekiq Upstart Manager" | |
start on runlevel [2345] | |
stop on runlevel [!2345] | |
respawn | |
script | |
exec /bin/bash <<"EOF" | |
EB_SCRIPT_DIR=$(/opt/elasticbeanstalk/bin/get-config container -k script_dir) |
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
Agenda = require('agenda') | |
agenda = new Agenda({db:{address: process.env.MONGO_URL}}) | |
module.exports = (robot) -> | |
numberOfTheWeek = (year, month, day) -> | |
d = new Date(year, month, day) | |
Math.floor((d.getDate() - d.getDay() + 12) / 7) | |
agenda.define 'agenda:garbage:plastic-bottles', (job, done) -> | |
robot.logger.info '@agenda:garbage:plastic-bottles' |
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
# 踏み台 | |
Host step | |
HostName xxx.xxx.xxx.xxx | |
User xyz | |
IdentityFile ~/.ssh/id_rsa | |
# 踏み台経由でslogin(ssh)するホスト | |
Host ip-10-0-0-100 | |
HostName 10.0.0.100 | |
ProxyCommand ssh -W %h:%p step | |
User ubuntu |
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
curl -F "file=@file.caf;type=audio/x-caf" ... |
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
npm install node-module-template -g | |
/home/xxx/.nodebrew/current/bin/node-module-template -> /home/xxx/.nodebrew/current/lib/node_modules/node-module-template/bin/node-module-template.js | |
node-module-template@0.0.20 /home/xxx/.nodebrew/current/lib/node_modules/node-module-template | |
├── param-case@1.1.1 | |
├── rimraf@2.4.2 | |
├── osi-licenses@0.1.1 | |
├── commander@2.8.1 (graceful-readlink@1.0.1) | |
├── title-case@1.1.1 (upper-case@1.1.2) | |
├── camel-case@1.1.2 (upper-case@1.1.2) | |
├── chalk@0.5.1 (ansi-styles@1.1.0, escape-string-regexp@1.0.3, supports-color@0.2.0, has-ansi@0.1.0, strip-ansi@0.3.0) |
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
ssh-keygen -t rsa -f private.key |
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
Sequelize = require('sequelize') | |
db = new Sequelize(process.env.DATABASE_URL) | |
EmagazineSchedule = db.define('EmagazineSchedule', { | |
send_at: {type: Sequelize.DATE}, | |
file_id: {type: Sequelize.STRING, allowNull: false}, | |
filename: {type: Sequelize.STRING, allowNull: false, unique: true}, | |
subject: {type: Sequelize.TEXT}, | |
state: {type: Sequelize.STRING, defaultValue: 'initialize'}, | |
}, { | |
paranoid: true, |
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
module.exports = (robot) -> | |
sleep = (ms) -> | |
start = new Date().getTime() | |
continue while new Date().getTime() - start < ms | |
robot.on 'my:sleep', (ms) -> | |
sleep ms |