Let's look at some basic kubectl output options.
Our intention is to list nodes (with their AWS InstanceId) and Pods (sorted by node).
We can start with:
kubectl get no
| package main | |
| import ( | |
| "fmt" | |
| "log" | |
| "strconv" | |
| "github.com/miekg/dns" | |
| ) | 
At some point you’ll find yourself in a situation where you need edit a commit message. That commit might already be pushed or not, be the most recent or burried below 10 other commits, but fear not, git has your back 🙂.
git commit --amendThis will open your $EDITOR and let you change the message. Continue with your usual git push origin master.
| Backup: | |
| docker exec -t -u postgres your-db-container pg_dumpall -c > dump_`date +%d-%m-%Y"_"%H_%M_%S`.sql | |
| Restore: | |
| cat your_dump.sql | docker exec -i your-db-container psql -Upostgres | 
CloudFlare is an awesome reverse cache proxy and CDN that provides DNS, free HTTPS (TLS) support, best-in-class performance settings (gzip, SDCH, HTTP/2, sane Cache-Control and E-Tag headers, etc.), minification, etc.
| sudo: required #is required to use docker service in travis | |
| language: php #can be any language, just php for example | |
| services: | |
| - docker # required, but travis uses older version of docker :( | |
| install: | |
| - echo "install nothing!" # put your normal pre-testing installs here | 
| // Jwt requires an authentication on every request.Assuming that you are storing your User objects in a relational database like MySQL, | |
| // and that your API gets moderate traffic,it is not a good idea to fetch the User object directly from the database every time. | |
| //Instead,once it is retreived ,we cache it locally using Spring Caching abstraction.The cache backend is Google guava. | |
| public class UserServiceImpl implements UserService { //Which further extends UserDetailsService . | |
| @Override | |
| @Cacheable(cacheNames=CacheConstants.USER_CACHE,key="#username") // We cache this guy by its username. | |
| public UserDetails loadUserByUsername(final String username) throws UsernameNotFoundException { | |
| final User user = userRepository.findOneByEmail(username); |