Skip to content

Instantly share code, notes, and snippets.

View discoposse's full-sized avatar
💭
Life happens. How you interpret the results is what you have control over.

Eric Wright discoposse

💭
Life happens. How you interpret the results is what you have control over.
View GitHub Profile
@discoposse
discoposse / docker-compose.yml
Created November 13, 2015 23:08
GlusterFS Docker Compose sample
glusterfs-server:
image: rancher/glusterfs:v0.1.3
devices:
- /dev/fuse:/dev/fuse:rwm
cap_add:
- SYS_ADMIN
volumes_from:
- glusterfs-data
labels:
io.rancher.container.hostname_override: container_name
@discoposse
discoposse / rancher-compose.yml
Created November 13, 2015 23:09
GlusterFS Rancher Compose sample
.catalog:
name: "GlusterFS"
version: "3.7.5-rancher1"
description: "Gluster FS (3x) replicated volume"
uuid: glusterfs-0
questions:
- variable: "VOLUME_NAME"
description: "Name to give the Gluster volume"
label: "Volume Name"
required: true
#!/bin/bash
# USERID is the starting number for the users to follow
# LASTUSER is your upper bound user ID number
# JIVEUSER is your Jive username
# JIVEPASS is your plaintext password
USERID=38000
LASTUSER=38010
JIVEUSER=
#!/bin/bash
#
# Slack Webhook notification for Turbonomic Action Scripts
#
# Use cURL to post to the Slack API
curl -X POST --data-urlencode 'payload={"channel": "#turbonomic", "username": "discohook", "text": "Move action created for "$VMT_TARGET_NAME" from "$VMT_CURRENT_NAME" to "$VMT_NEW_NAME" with action name = "$VMT_ACTION_NAME"", "icon_emoji": ":bear:"}' https://hooks.slack.com/services/YOURDEDICATEDWEBHOOKURL
# Log locally in the same folder as the action script (optional)
echo "$VMT_TARGET_NAME is moving" >> mylog.txt
@discoposse
discoposse / README.md
Created April 29, 2019 01:41 — forked from tristanm/README.md
Migrating a Rails project from MySQL to PostgreSQL

Migrating a Rails project from MySQL to PostgreSQL

This brief guide is written from my own experience with migrating a large (~5GB) MySQL database to PostgreSQL for a Rails project.

No warranties, guarantees, support etc. Use at your own risk and, as always, ENSURE YOU MAKE BACKUPS FIRST!

I chose [pgloader][1] because it's extremely fast. YMMV.

  1. Replace mysql2 gem with pg in Gemfile.
  2. Update config/database.yml for PostgreSQL. I used [Rails' template][2] as a starting point.
@discoposse
discoposse / Folder structure
Created July 10, 2020 14:18
Terraform vSphere Folder reference challenged when using a Variable
Datacenter = HawthorneSales
Default root folder (hidden) = HawthorneSales/vm
Folders = Users/eric.wright