#!/usr/bin/env bash | |
STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep '\.jsx\?$') | |
BIN_PATH="$(git rev-parse --show-toplevel)/node_modules/.bin" | |
eslint() { | |
ESLINT="$BIN_PATH/eslint" | |
# Check for eslint |
/** | |
* Example to refresh tokens using https://github.com/auth0/node-jsonwebtoken | |
* It was requested to be introduced at as part of the jsonwebtoken library, | |
* since we feel it does not add too much value but it will add code to mantain | |
* we won't include it. | |
* | |
* I create this gist just to help those who want to auto-refresh JWTs. | |
*/ | |
const jwt = require('jsonwebtoken'); |
I have been an aggressive Kubernetes evangelist over the last few years. It has been the hammer with which I have approached almost all my deployments, and the one tool I have mentioned (shoved down clients throats) in almost all my foremost communications with clients, and it was my go to choice when I was mocking my first startup (saharacluster.com).
A few weeks ago Docker 1.13 was released and I was tasked with replicating a client's Kubernetes deployment on Swarm, more specifically testing running compose on Swarm.
And it was a dream!
All our apps were already dockerised and all I had to do was make a few modificatons to an existing compose file that I had used for testing before prior said deployment on Kubernetes.
And, with the ease with which I was able to expose our endpoints, manage volumes, handle networking, deploy and tear down the setup. I in all honesty see no reason to not use Swarm. No mission-critical feature, or incredibly convenient really nice to have feature in Kubernetes that I'm go
AWS ํ์ต ๋งํฌ์ง ์๋ฆฌ์ฆ
- AWS ํธ๋ ์ด๋ ๋ฐ ์๊ฒฉ์ฆ ์๊ฐ http://bit.ly/aws-tnc-intro
- AWS ํ์ต ์๋ฃ์ง http://bit.ly/aws-study-resource
- AWS ๊ณต์ธ ์๋ฃจ์ ์ค ์ํคํ ํธ - ์ด์์์์ดํธ ์ํ ๊ฐ์ด๋ http://bit.ly/sacertguide
- AWS ๊ณต์ธ ๊ฐ๋ฐ์ - ์ด์์์์ดํธ ์ํ ๊ฐ์ด๋ http://bit.ly/devcertguide
- AWS ๋ณด์ ๊ด๋ จ ์ปจํ ์ธ ๋ชจ์์ง http://bit.ly/secontents
- AWS ๊ธฐ๋ฐ ๋น ๋ฐ์ดํฐ ํ์ต์๋ฃ์ง http://bit.ly/bdonaws
- AWS ๋ฅ๋ฌ๋ ํ์ต ์๋ฃ ๋ชจ์์ง http://bit.ly/dlonaws
- AWS The Machine Learning pipeline on AWS ๊ต์ก ํ์ต ์๋ฃ์ง http://bit.ly/ml-pipeline
#!/bin/bash | |
# vars | |
[ -z "$NUM_WORKERS" ] && NUM_WORKERS=3 | |
# init swarm (need for service command); if not created | |
docker node ls 2> /dev/null | grep "Leader" | |
if [ $? -ne 0 ]; then | |
docker swarm init > /dev/null 2>&1 | |
fi |
AWS ํ์ต ๋งํฌ์ง ์๋ฆฌ์ฆ
- AWS ํ์ต ์๋ฃ์ง http://bit.ly/aws-study-resource
- AWS ๊ณต์ธ ์๋ฃจ์ ์ค ์ํคํ ํธ - ์ด์์์์ดํธ ์ํ ๊ฐ์ด๋ http://bit.ly/sacertguide
- AWS ๊ณต์ธ ๊ฐ๋ฐ์ - ์ด์์์์ดํธ ์ํ ๊ฐ์ด๋ http://bit.ly/devcertguide
- AWS ๋ณด์ ๊ด๋ จ ์ปจํ ์ธ ๋ชจ์์ง http://bit.ly/seccontents
AWS ๊ณต์ธ ๊ฐ๋ฐ์ - ์ด์์์์ดํธ ์ํ ๊ฐ์ด๋(http://bit.ly/devcertguide)
Not all random values are created equal - for security-related code, you need a specific kind of random value.
A summary of this article, if you don't want to read the entire thing:
- Don't use
Math.random()
. There are extremely few cases whereMath.random()
is the right answer. Don't use it, unless you've read this entire article, and determined that it's necessary for your case. - Don't use
crypto.getRandomBytes
directly. While it's a CSPRNG, it's easy to bias the result when 'transforming' it, such that the output becomes more predictable. - If you want to generate random tokens or API keys: Use
uuid
, specifically theuuid.v4()
method. Avoidnode-uuid
- it's not the same package, and doesn't produce reliably secure random values. - If you want to generate random numbers in a range: Use
random-number-csprng
.
You should seriously consider reading the entire article, though - it's
#!/bin/bash | |
cd "$(git rev-parse --show-toplevel)" | |
ESLINT="node_modules/.bin/eslint" | |
pwd | |
if [[ ! -x "$ESLINT" ]]; then | |
printf "\t\033[41mPlease install ESlint\033[0m (npm install eslint)\n" | |
exit 1 | |
fi |
service.beta.kubernetes.io/aws-load-balancer-access-log-emit-interval
(in minutes)service.beta.kubernetes.io/aws-load-balancer-access-log-enabled
(true|false)service.beta.kubernetes.io/aws-load-balancer-access-log-s3-bucket-name
service.beta.kubernetes.io/aws-load-balancer-access-log-s3-bucket-prefix
service.beta.kubernetes.io/aws-load-balancer-additional-resource-tags
(comma-separated list of key=value)service.beta.kubernetes.io/aws-load-balancer-backend-protocol
(http|https|ssl|tcp)service.beta.kubernetes.io/aws-load-balancer-connection-draining-enabled
(true|false)