https://docs.microsoft.com/en-us/azure/architecture/microservices/ https://docs.microsoft.com/en-us/azure/architecture/microservices/domain-analysis Not too big, and not too small https://docs.microsoft.com/en-us/azure/architecture/microservices/microservice-boundaries
This is my take on learning go and experimenting with it, again.
Learning a new language is often times a lot of back and forth between I got it and hmm what's next?
It is easy to get started but what is past the hello-word.go
?
Is it a web server or is it a cli tool?
This is the never ending loop of being stuck on more hello world examples and more CRUD using different frameworks that I dont intend to use.
Sometimes it is difficult to do paradigm switching, but a working playground environment will make it easy to get it going and not get stuck. I hit my own share of roadblocks trying to learn go, hopefully this list will make it easy for someone else.
Let's not get stuck and get it going :)
# https://kubernetes.io/docs/reference/kubectl/cheatsheet/#zsh | |
source <(kubectl completion zsh) # setup autocomplete in zsh into the current shell | |
echo "if [ $commands[kubectl] ]; then source <(kubectl completion zsh); fi" >> ~/.zshrc # add autocomplete permanently to your zsh shell |
FROM alpine | |
RUN apk update && apk upgrade | |
RUN apk add nodejs | |
WORKDIR /app | |
ADD . /app | |
ENTRYPOINT [ "node", "server.js" ] |
Terminology used across different subscription billing systems to define what a subscription is.
- https://dev.recurly.com/docs/create-subscription
- https://stripe.com/docs/api/curl#subscriptions
- https://developers.braintreepayments.com/reference/response/subscription
- https://apidocs.chargebee.com/docs/api/subscriptions
- https://reference.chargify.com/v1/subscriptions/subscriptions-intro
- https://www.zuora.com/developer/api-reference/#tag/Subscriptions
/** | |
* From https://github.com/spotify/web-api-auth-examples/blob/master/authorization_code/app.js#L25-L33 | |
* Generates a random string containing numbers and letters | |
* @param {number} length The length of the string | |
* @return {string} The generated string | |
*/ | |
var generateRandomString = function(length) { | |
var text = ''; | |
var possible = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; |
# https://hub.docker.com/_/alpine/ | |
docker pull alpine | |
# bind the volume to your container | |
docker run -v "$(pwd)/micro-service":/micro-service -it alpine |
https://classroom.udacity.com/courses/ud615/lessons/7826112332/concepts/81473137730923
Note: Cloud Shell comes with an installed Go, but it's not the most recent version, so you should perform the steps below to install the latest Go and set GOPATH.
wget https://storage.googleapis.com/golang/go1.6.2.linux-amd64.tar.gz
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf go1.6.2.linux-amd64.tar.gz
echo "export GOPATH=~/go" >> ~/.bashrc
https://www.computerhope.com/unix/ugrep.htm
git branch | grep -v "master\|release" | xargs git branch -D
// COUNT=3 INPUT=large_file.jsonl node jsonl-to-multiple-json-files.js | |
const fs = require('fs'); | |
const readline = require('readline'); | |
const COUNT = parseInt(process.env.COUNT); // Numer of lines to get from the large file | |
const input = fs.createReadStream(process.env.INPUT.toString()); // input .jsonl file | |
const rl = readline.createInterface({ input }); | |
let counter = 0; | |
rl.on('line', (line) => { |