(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| // Clone the repo | |
| git clone --depth=1 git://someserver/somerepo dirformynewrepo | |
| // Remove the .git directory | |
| rm -rf !$/.git |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| /* | |
| URLs: | |
| http://localhost:3000/arrive?foo=bar&utm_source=smart-redir | |
| */ | |
| var redirect = require('redirect-with-params'); | |
| var express = require('express'); | |
| var app = express(); | |
| app.use(redirect({ |
| var AWS = require('aws-sdk'); | |
| var cloudwatch = new AWS.CloudWatch({ region: 'us-east-1'}); | |
| exports.handler = function (event, context) { | |
| var ElasticSearchHost = 'elasticsearch.example:9200'; | |
| var Environment = 'int'; | |
| var EndTime = new Date; | |
| var StartTime = new Date(EndTime - 15*60*1000); | |
| var Metrics = { |
First, learn JSON. It's not programming language, not even close. Just follow syntax rules and you will be fine.
| var https = require('https'); | |
| var util = require('util'); | |
| exports.handler = function (event, context) { | |
| console.log(JSON.stringify(event, null, 2)); | |
| console.log('From SNS:', event.Records[0].Sns.Message); | |
| var severity = "good"; | |
| var message = event.Records[0].Sns.Message; | |
| var messageJSON = JSON.parse(message); |
export AWS_DEFAULT_REGION=ap-northeast-1
aws logs describe-log-groups --query 'logGroups[*].logGroupName' --output table | \
awk '{print $2}' | grep -v ^$ | while read x; do echo "deleting $x" ; aws logs delete-log-group --log-group-name $x; done| apiVersion: v1 | |
| kind: ReplicationController | |
| metadata: | |
| name: kube-registry-v0 | |
| namespace: kube-system | |
| labels: | |
| k8s-app: kube-registry | |
| version: v0 | |
| spec: | |
| replicas: 1 |