This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE KEYSPACE IF NOT EXISTS test | |
WITH replication = {'class':'SimpleStrategy', 'replication_factor' : 1}; | |
USE test; | |
CREATE TABLE IF NOT EXISTS test ( | |
id int, | |
data text, | |
PRIMARY KEY (id) | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
public void reprepareStatement() { | |
Cluster cluster = Cluster.builder().addContactPoints("localhost").build(); | |
Session session = cluster.connect("test"); | |
Statement create = createTable("test") | |
.addPartitionKey("id", DataType.text()) | |
.addColumn("initial_column", DataType.text()) | |
.ifNotExists(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Inspired from http://blog.akquinet.de/2010/05/26/mastering-the-maven-command-line-%E2%80%93-reactor-options/ | |
# Build only specific modules: | |
mvn clean install -pl sub-module-name2 | |
mvn clean install -pl sub-module-name2,sub-module-name3 | |
# Build only starting from specific sub-module (resume from) | |
mvn clean install -rf sub-module-name2 | |
# Build dependencies (also make) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# How to sign your custom RPM package with GPG key | |
# Step: 1 | |
# Generate gpg key pair (public key and private key) | |
# | |
# You will be prompted with a series of questions about encryption. | |
# Simply select the default values presented. You will also be asked | |
# to create a Real Name, Email Address and Comment (comment optional). | |
# | |
# If you get the following response: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "bytes" | |
import "bufio" | |
import "encoding/json" | |
import "flag" | |
import "fmt" | |
import "net/http" | |
import "os" | |
import "strings" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// for a simple Java POJO | |
def patch = ["add","path", 42] as Patch // explicit coercion | |
Patch patch = ["add","path", 42] // implicit coercion | |
def patch = new Patch("add","path", 42) // default invocation | |
// mocking via coercion | |
def service = [getValue: { UUID id -> 42 }] as CounterService // map coercion | |
def service = { UUID id -> 42 } as CounterService // closure coercion | |
assert 42 == service.getValue(UUID.randomUUID()) |