This file contains hidden or 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
{ | |
"name": "test", | |
"description": "An application to test helenus", | |
"version": "0.0.1", | |
"private": true, | |
"dependencies": { | |
"express": "3.x", | |
"helenus": "0.6.x" | |
} | |
} |
This file contains hidden or 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
struct CassCluster; | |
CassCluster* | |
cass_cluster_new(); | |
CassError | |
cass_cluster_setopt(CassCluster* cluster, | |
CassOption option, | |
const void* data, cass_size_t data_length); |
This file contains hidden or 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
# | |
# This is configuration file for CCMBridge library. | |
# Options have same name as in .NET CCMBridge settings file, | |
# except USE_NOBUFFERING which now is replaced by USE_BUFFERNING option. | |
# | |
IP_PREFIX=127.0.0. | |
CASSANDRA_VERSION=2.0.7 | |
# Addresses MUST be in IP form |
This file contains hidden or 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
void kill_task(boost::shared_ptr<cql::cql_ccm_bridge_t> ccm) { | |
boost::this_thread::sleep_for(boost::chrono::milliseconds(10)); | |
ccm->decommission(2); | |
boost::this_thread::sleep_for(boost::chrono::milliseconds(10)); | |
ccm->decommission(3); | |
} | |
BOOST_AUTO_TEST_CASE(test_simple) | |
{ | |
test_utils::CassClusterPtr cluster = test_utils::make_shared(cass_cluster_new()); |
This file contains hidden or 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
/* | |
Copyright (c) 2014 DataStax | |
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 |
This file contains hidden or 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
template<typename From, typename To> | |
To alias_cast(From from) | |
{ | |
struct AliasType | |
{ | |
union | |
{ | |
From from; | |
To to; | |
}; |
This file contains hidden or 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
template<typename From, typename To> | |
inline To copy_cast(const From& from) | |
{ | |
To to; | |
memcpy(&to, &from, sizeof(from)); | |
return to; | |
} | |
int main() { | |
float f = 0.1; |
This file contains hidden or 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
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
#include <math.h> | |
template<typename From, typename To> | |
inline To copy_cast(const From& from) | |
{ | |
To to; | |
memcpy(&to, &from, sizeof(from)); |
This file contains hidden or 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
#!/bin/bash | |
RUN="/usr/bin/valgrind.bin --tool=memcheck test/integration_tests/cassandra_integration_tests" | |
#RUN="/usr/bin/valgrind --leak-check=full --tool=memcheck test/integration_tests/cassandra_integration_tests" | |
#RUN="test/integration_tests/cassandra_integration_tests" | |
function run_test() { | |
echo -e "$(tput setaf 3)#### Running filter: '$1' ####$(tput sgr 0)"; | |
#export DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib |
This file contains hidden or 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
#!/bin/bash | |
while true | |
do | |
r=$(( ( RANDOM % 100 ) + 1 )) | |
if [[ "$r" -gt "0" && "$r" -lt "11" ]]; then | |
echo "dropping 192.168.1.112" | |
iptables -A INPUT -d 192.168.1.112 -p tcp --destination-port 9042 -j DROP | |
elif [[ "$r" -gt "10" && "$r" -lt "21" ]]; then | |
echo "dropping 192.168.1.113" |
OlderNewer