This file contains 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
package main | |
import ( | |
"fmt" | |
"math" | |
"math/rand" | |
"net/http" | |
"time" | |
"github.com/sony/gobreaker" |
This file contains 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
package main | |
import ( | |
"fmt" | |
"math" | |
"math/rand" | |
"net/http" | |
"time" | |
"github.com/prometheus/client_golang/prometheus" |
This file contains 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
package main | |
import ( | |
"fmt" | |
"net/http" | |
"time" | |
"github.com/prometheus/client_golang/prometheus" | |
"github.com/prometheus/client_golang/prometheus/promhttp" | |
"github.com/sony/gobreaker" |
This file contains 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
package main | |
import ( | |
"fmt" | |
"net/http" | |
"time" | |
"github.com/sony/gobreaker" | |
) |
This file contains 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
--- | |
- name: Redis Installation | |
hosts: redis | |
become: true | |
tasks: | |
- name: Update package repositories | |
yum: | |
update_cache: yes |
This file contains 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
- import_playbook: requirements.yml #you can find the file content in my gist | |
- name: Provision a GCP VM | |
hosts: localhost | |
gather_facts: false | |
vars: | |
gcp_cred_file: <your json service account> | |
gcp_project: <project-id> | |
machine_type: "e2-medium" |
This file contains 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
--- | |
- hosts: localhost | |
connection: local | |
gather_facts: false | |
vars: | |
pip_package_requirements: | |
- "requests" | |
- "google-auth" | |
- "google-auth-httplib2" |
This file contains 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
--- | |
- name: Redis Installation | |
hosts: redis | |
become: true | |
tasks: | |
- name: Update package repositories | |
yum: | |
update_cache: yes |
This file contains 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
- import_playbook: requirements.yml | |
- name: Provision a GCP VM | |
hosts: localhost | |
gather_facts: false | |
vars: | |
gcp_cred_file: <path/to/serviceaccount/json/file> | |
gcp_project: <project-id> | |
machine_type: "e2-medium" |
This file contains 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
{ | |
"Log info": { | |
"prefix": ["loginfo", "logger"], | |
"body": ["getLogger().info(${1:info})"], | |
"description": "Log info" | |
}, | |
"Log error": { | |
"prefix": ["logerror"], | |
"body": ["getLogger().error(${1:error})"], | |
"description": "Log error" |
NewerOlder