Skip to content

Instantly share code, notes, and snippets.

@keithresar
keithresar / docker-compose.yaml
Last active December 4, 2023 13:18
Confluent Cloud Connect Cluster Container Config
---
version: '2'
services:
connect:
image: confluentinc/cp-server-connect:5.4.1
hostname: connect
container_name: connect
ports:
- 8083:8083
---
- name: Set initial variables
set_fact:
forked_repos_count: 0
forked_repos: []
- name: Count forked repos
set_fact:
forked_repos_count: "{{ forked_repos_count|int + 1 }}"
CREATE PROCEDURE geo_zip_dist (IN center_zip int, IN dist int)
BEGIN
declare center_lon float; declare center_lat float;
declare lon1 float; declare lon2 float;
declare lat1 float; declare lat2 float;
-- Lookup the original lon and lat for the zip
select lon, lat into center_lon, center_lat from zips
where zip=center_zip;
@keithresar
keithresar / gist:abb1038f8ab7788acf7c4faaaf354cfa
Created November 11, 2018 03:40
geo_zip_dist Stored Procedure
CREATE PROCEDURE geo_zip_dist (IN center_zip int, IN dist int)
BEGIN
declare center_lon float; declare center_lat float;
declare lon1 float; declare lon2 float;
declare lat1 float; declare lat2 float;
-- Lookup the original lon and lat for the zip
select lon, lat into center_lon, center_lat from zips
where zip=center_zip;
@keithresar
keithresar / ocmysql
Last active January 4, 2017 18:45
Launch client to access MySQL service inside OpenShift project
#!/usr/bin/env bash
#
# Assumes the following environment variables are available in the project:
#
# MYSQL_USER, MYSQL_USER, MYSQL_DATABASE
#
# This script will discover the environment variables, open a port-forwarding request for
# MySQL, then will open the client using the project credentials.
#
---
- hosts: localhost
remote_user: root
tasks:
- name: Install and enable Mariadb
service: name=mariadb-server enabled=yes state=started