Skip to content

Instantly share code, notes, and snippets.

View omnifroodle's full-sized avatar

Matt Overstreet omnifroodle

  • DataStax
  • Richmond, VA
View GitHub Profile
@omnifroodle
omnifroodle / schema.xml
Created March 29, 2012 11:16
hybrid ckan/drupal schema
<?xml version="1.0" encoding="UTF-8" ?>
<!--
This is the Solr schema file. This file should be named "schema.xml" and
should be in the conf directory under the solr home
(i.e. ./solr/conf/schema.xml by default)
or located where the classloader for the Solr webapp can find it.
For more information, on how to customize this file, please see
http://wiki.apache.org/solr/SchemaXml
@omnifroodle
omnifroodle / .vimrc
Last active December 20, 2015 00:09
My fish ~/.config/fish/config.fish with rbenv, go, custom git status icons, and aws ec2/cfn tools
set shell=bash

Keybase proof

I hereby claim:

  • I am omnifroodle on github.
  • I am omnifroodle (https://keybase.io/omnifroodle) on keybase.
  • I have a public key ASB6s7c05WNgmytiCcEfmGgyH3p2A3OG05X2U8PKdr4Dowo

To claim this, I am signing this object:

@omnifroodle
omnifroodle / cassandra_test.py
Created September 7, 2018 21:33
simple Cassandra testing with Locust framework
from cassandra.cluster import Cluster
from cassandra.policies import RoundRobinPolicy
from locust import Locust, events, task, TaskSet
import time
class CassandraClient(object):
def __init__(self, host):
@omnifroodle
omnifroodle / kafka-kubernetes.md
Last active February 10, 2019 23:15
Kafka and kubernetes example
  1. Get the Kubernetes manifests you’ll need for Kafka
git clone https://github.com/Yolean/kubernetes-kafka.git
cd kubernetes-kafka
  1. Register a couple storage classes in the cluster (note, these probably already exist)
kubectl apply -f ./configure/docker-storageclass-broker.yml
@omnifroodle
omnifroodle / gist:cd82691c4a0b02117b46c41b9e4c196b
Last active October 30, 2020 14:27
Connecting to Astra with Older Python libs

Working backwards with Astra and Python/Flask/Django

So you heard about this awesome new hosted Cassandra and wanted to kick the tires? But after setting up your favorite stack you realize that the secure connect bundle from Astra doesn’t seem to plug in anywhere. Suddenly easy doesn’t seem so easy anymore.

I’m going to walk you through one example of how you can connect an older CQL library to Astra. In this case we’ll be using Flask and CQLAlchemy. CQLAlchemy has something of a following in the Flask/Cassandra world but hasn’t seen an update in a while.

First, unzip the secure bundle you downloaded from Astra. You should see something like this:

$ ls secure-connect