This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Contexts | |
| kcgc - kubectl config get-contexts | |
| kcuc - kubectl config use-context [CONTEXT name] | |
| # POD | |
| # list pods | |
| kgp | grep [POD] | |
| # execute a command in a container |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| docker run -d --hostname my-rabbit --name rabbitmq -p 4369:4369 -p 5671:5671 -p 5672:5672 -p 15671:15671 -p 15672:15672 -p 25672:25672 rabbitmq:3-management | |
| docker ps | |
| http://localhost:15672 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Path to your oh-my-zsh installation. | |
| export ZSH="/Users/cristian/.oh-my-zsh" | |
| # Set name of the theme to load --- if set to "random", it will | |
| # load a random theme each time oh-my-zsh is loaded, in which case, | |
| # to know which specific one was loaded, run: echo $RANDOM_THEME | |
| # See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes | |
| ZSH_THEME="robbyrussell" | |
| # Which plugins would you like to load? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| docker network create elasticnet | |
| docker run -d --name elasticsearch --net elasticnet -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" elasticsearch:6.8.0 | |
| docker run -d --name kibana --net elasticnet -p 5601:5601 kibana:6.8.0 | |
| docker ps | |
| http://localhost:5601 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| docker network create kafka | |
| docker run --network=kafka -d --name=zookeeper --env ZOOKEEPER_CLIENT_PORT=2181 confluentinc/cp-zookeeper:latest | |
| docker run --network=kafka -d -p 9092:9092 --name=kafka --env KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181 --env KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://kafka:9092 --env KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR=1 confluentinc/cp-kafka:latest | |
| docker ps |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #get port in use by info | |
| lsof -i :PORT_NUMBER | |
| #to create directories recursively | |
| mkdir -p my-project/{src,public/{styles,scripts,images}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Example: 4/7/2016 3:00 AM BRT | |
| function currentLocalDateTime(){ | |
| var date = new Date(); | |
| var curr_year = date.getFullYear(); | |
| var curr_month = ("00" + (date.getMonth() + 1)).slice(-2); | |
| var curr_dayOfMonth = ("00" + date.getDate()).slice(-2); | |
| var curr_hour = date.getHours(); | |
| var curr_minute = ("00" + date.getMinutes()).slice(2); |