Skip to content

Instantly share code, notes, and snippets.

View phact's full-sized avatar

Sebastián Estévez phact

View GitHub Profile
### DML ###
# Keyspace Name
keyspace: stresscql
# The CQL for creating a keyspace (optional if it already exists)
keyspace_definition: |
CREATE KEYSPACE stresscql WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1};
# Table name
@lenards
lenards / _question.md
Last active October 26, 2017 17:44
Understanding the usage of `nodetool getendpoints` with compound partition keys

TL;DR - I think I have an answer that I'm sort of okay with ... and I might have decided that I need to write up a bug regarding a regression.

The whole thing has gotten a bit complicated - so you can skip it if you like...


If you consider nodetool getendpoints as a tool in our toolkit, we'd like know how to use it on realistic data. The examples in the exercises were just integer types, and not something a bit more complex.

@rsds143
rsds143 / counter_replacement.scala
Last active August 29, 2015 14:07
counter replacement
/*
* Copyright 2014 Ryan Svihla
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
if(! (!this.collisionDetection || !this.collisionMap || !this.collisionMap.loaded)) {
//Breaking is for losers
this.key.forward = true
var x = Math.round(this.collisionMap.pixels.width / 2 + this.dummy.position.x * this.collisionPixelRatio);
var z = Math.round(this.collisionMap.pixels.height / 2 + this.dummy.position.z * this.collisionPixelRatio);
var pos = new THREE.Vector3(x, 0, z);
//console.log(x, z, this.collisionMap.pixels.width, this.collisionMap.pixels.height, this.dummy.position.x, this.dummy.position.z)