- auto load config via user-data with following format
config format
system {
time-zone Asia/Tokyo
}
var fs = require('fs'); | |
if(process.argv.length == 3) | |
{ | |
if(process.argv[2].match(/\.json$/)) | |
{ | |
try{ | |
var event = JSON.parse(fs.readFileSync(process.argv[2], 'utf8')); | |
} catch(e) { | |
console.log("could not parse JSON from file: "+process.argv[2]); |
# 1.0.2 | |
vyos@vyos:~$ cat /opt/vyatta/etc/version | |
Version: VyOS 1.0.2 | |
Description: VyOS 1.0.2 (hydrogen) | |
Copyright: 2014 SO3 Group | |
vyos@vyos:~$ configure | |
[edit] | |
vyos@vyos# set interfaces openvpn vtun0 local-address '169.254.1.1' | |
[edit] |
_eb() | |
{ | |
COMPREPLY=($( compgen -W "init branch start status update stop delete logs events push" ${COMP_WORDS[COMP_CWORD]} )) | |
} | |
complete -F _eb eb |
// ==UserScript== | |
// @name AWS MC FreeBSD icon | |
// @namespace j3tm0t0.gmail.com | |
// @version 0.1 | |
// @match https://console.aws.amazon.com/ec2/v2/home?* | |
// ==/UserScript== | |
var icon = 'data:image/x-icon;base64,'+ | |
'AAABAAIAEBAAAAEAIABoBAAAJgAAACAgAAABACAAqBAAAI4EAAAoAAAAEAAAACAAAAABACAAAAAA'+ | |
'AEAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAADwMCACMDAQAk'+ |
#!/bin/sh | |
type coffee &> /dev/null || (echo ERROR: CoffeeScript is not installed. > /dev/stderr ; exit -1 ) | |
if [ "$1" = "" ] | |
then | |
echo "usage: `basename $0` hoge.coffee [ puge.coffee ... ] > hogepuge.template" | |
echo ' or aws cloudformation create-stack --stack-name STACKNAME --template-body "$(csfn hoge.coffee)"' | |
exit 0 | |
fi |
$ cat bucket.coffee | |
Resources = | |
# You can use comment! | |
Bucket: | |
Type:"AWS::S3::Bucket" | |
Properties: | |
BucketName: "my-special-bucket" | |
Template = | |
AWSTemplateFormatVersion : "2010-09-09" |
FROM j3tm0t0/amzn | |
RUN yum -y install httpd | |
RUN echo hoge > /var/www/html/index.html | |
CMD ["/usr/sbin/httpd","-D","FOREGROUND"] | |
EXPOSE 80 |
~$ aws s3 ls s3://bucket-123/ | |
PRE folder/ | |
~$ aws s3api list-objects --bucket bucket-123 | |
{ | |
"CommonPrefixes": [], | |
"Contents": [ | |
{ | |
"LastModified": "2014-04-11T08:53:58.000Z", | |
"ETag": "\"d41d8cd98f00b204e9800998ecf8427e\"", |
#!/bin/vbash | |
source /opt/vyatta/etc/functions/script-template | |
configure | |
loadkey vyos http://169.254.169.254/latest/meta-data/public-keys/0/openssh-key | |
set service ssh disable-password-authentication | |
commit |