Skip to content

Instantly share code, notes, and snippets.

💭
Happily Coding!

Gary A. Stafford garystafford

View GitHub Profile
View main.go
// author: Gary A. Stafford
// site: https://programmaticponderings.com
// license: MIT License
// purpose: Service F
package main
import (
"bytes"
"context"
View main.go
// author: Gary A. Stafford
// site: https://programmaticponderings.com
// license: MIT License
// purpose: Service A
package main
import (
"encoding/json"
"github.com/banzaicloud/logrus-runtime-formatter"
View WeightedTextIndex.js
db.movieDetails.dropIndex('genres_text_title_text_plot_text')
db.movieDetails.createIndex({
title: 'text',
plot: 'text',
genres: 'text'
}, {
weights: {
genres: 4,
title: 2
View TextIndex.js
db.movieDetails.createIndex({ title: 1 })
db.movieDetails.createIndex({ countries: 1 })
db.movieDetails.createIndex({ title: 'text' })
View curl_solr_replace_field.sh
curl -X POST \
"${SOLR_URL}/movies/schema" \
-H 'Content-Type: application/json' \
-d '{
"replace-field":{
"name":"title",
"type":"text_en",
"multiValued":false
},
"replace-field":{
View TextIndex.js
db.movieDetails.dropIndex('title_text')
db.movieDetails.createIndex({
title: 'text',
plot: 'text',
genres: 'text'
})
View tests.yml
---
- name: Test gcpweb Ansible role
hosts: webservers
gather_facts: yes
tasks:
# - name: List all ansible facts
# debug:
# msg: "{{ ansible_facts }}"
View main.yml
---
zone: us-east1-b
region: us-east1
instance_name: web-1
machine_type: n1-standard-1
size_gb: 200
ip_cidr_range: 172.16.0.0/28
View main.yml
---
- import_tasks: create.yml
tags:
- create
- import_tasks: delete.yml
tags:
- delete
View 10_webserver_infra.yml
---
- name: Create GCP webserver(s) resources
hosts: localhost
gather_facts: no
connection: local
roles:
- role: gcpweb
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.