curl -H "Content-Type:application/json" -XPUT 127.0.0.1:9200/_bulk?pretty --data-binary @movies.json
retry_on_conflict=5for optimistic concurrency control.
6. Search using parent-child relationship
"title":"The Force Awakens"
resetis a limited version of
alias graph="git log --all --decorate --oneline --graph"
2. Change history in one branch:
(1) add new file without creating new commit:
git commit --amend --no-edit
(2) modify comment:
git commit --amend -m "this is the right message"
(3) get rid of untracked files:
git clean -df (d for directory, f for force)
git reset --staged
reset has 2 types:
--soft(changed work in staging area) ,
--mix(changed work in working area) ,
--hard(lose all tracked files)
git revert undo the effect of past commits by creating a new commit. This can keep the history intact and avoid conflict when other people already pulled your repo. …
Why does anyone want to go through the frustration and hopelessness to achieve anything?
(1) what’s the point of being successful? (Besides suffering itself. Ego and rewards will stop justifying the cost at some point) (2) you cannot even prove you live in reality.
It takes some luck, naivety and heroism to get to the more successful side. You may not think that way, because you are also hard working and intelligent. What? You do appreciate all the luck and heroism you had? Then you have to deal with all the helplessness and nihilism that comes with it. …
You can follow my first blog in this series to set up the cluster, just do not do the last step — delete the cluster
Once you set up the cluster, download all the yaml file from github and put them all together into a folder called “k8s-demo”. Each of these files defines a different object in of the web server, once you run them all together you will have the whole system runing. You can run them all together in your terminal using:
kubectl apply -f k8s-demo/
Once you finished all the above steps, you can go to postman and start sending HTTP request to test your application! The frontend of this application lets you add new user, remove existing user and get a list of existing users. …
It may seem daunting to run kubernetes commands, but once you learned its main components, the rest is just about learning the syntax to tell kubernetes what you want to do.
We all know K8s is an orchestration tool, but what does that mean exactly? The most basic understanding can be: it allows you to define what resources you need, and how they are allocated to different workloads. K8s not only lets you set those things up, it helps you to monitor and maintain all the services you desires. …
You usually can get some free credits if this is your first time registering your AWS account, but this whole series should take less than 2 hours, so even if you pay for it out of your own pocket, it will be less than $0.20.
(You can see the last picture in this blog where I run my cluster for more than 10 hours and it only cost $0.78. With that being said, it does happen that you accidentally did not turn off your services and get charged $100 at the end of the month, but as long as you follow my instructions step by step, that should not happen. If you are interested in, I will show you extra steps on how to monitor and alert your bills at the end of the series. …
If you feel like you are changing your passion and career paths multiple times and still did not make a thing out of it, this is the article for you. I will tell you exactly why you feel lost or demotivated again and again, and how to tackle them, or more clearly, how to settle the problem once and for all. The first section is about the reasons you keep changing your decision. The second part is about the methodologies you can borrow to figure out your own solution. …