Skip to content

Instantly share code, notes, and snippets.

:query => {
:filtered => {
:query => {
:query_string => {
#:default_operator => "AND",
:query => query,
},
},
:filter => {
:or => [
[default@test] create column family structure
... with comparator = AsciiType
... and column_metadata =
... [{
... column_name : 'resolution',
... validation_class : DoubleType
... }];
Unable to find abstract-type class 'org.apache.cassandra.db.marshal.DoubleType'
[default@test] create column family structure
... with comparator = AsciiType
@steeve
steeve / gist:1236242
Created September 22, 2011 22:37
Brisk + Cassandra + get_slice
Brisk's Hive allows you to transpose a row key to a table of (row_key, column_name, value).
Now we are able to leverage Cassandra's get_slice to only return
a subset of columns. Very useful when using Cassandra indexes (wide rows).
See the pull request: https://github.com/riptano/hive/pull/3
Let's say you have a wide row index:
So instead of having:
SELECT * FROM MyTable WHERE a > x and b < y;
EM.run do
conn = EventMachine::HttpRequest.new("http://url/to/big/xml")
conn.use EventMachine::Middleware::OAuth, OAuthConfig
read_io, write_io = IO.pipe
writer = EM.attach(write_io)
EventMachine.defer do
Zlib::GzipReader.new(read_io).each_line do |line|
puts line
INFO 18:36:39,558 Starting up Hadoop trackers
INFO 18:36:39,558 Listening for thrift clients...
INFO 18:36:39,558 Waiting for gossip to start
INFO 18:36:44,561 Creating keyspace: brisk_system
INFO 18:36:45,622 keyspace already exists. Skipping creation.
2011-09-29 18:36:45.914 java[49589:51503] Unable to load realm info from SCDynamicStore
INFO 18:36:46,096 Logging to org.slf4j.impl.Log4jLoggerAdapter(org.mortbay.log) via org.mortbay.log.Slf4jLog
INFO 18:36:46,131 Added global filtersafety (class=org.apache.hadoop.http.HttpServer$QuotingInputFilter)
INFO 18:36:46,147 Initializing logs' truncater with mapRetainSize=-1 and reduceRetainSize=-1
INFO 18:36:46,153 Starting tasktracker with owner as steeve
@steeve
steeve / gist:1262521
Created October 4, 2011 19:19
Whois apple.com
$ whois apple.com
Whois Server Version 2.0
Domain names in the .com and .net domains can now be registered
with many different competing registrars. Go to http://www.internic.net
for detailed information.
APPLE.COM.WWW.BEYONDWHOIS.COM
APPLE.COM.WAS.PWNED.BY.M1CROSOFT.COM
@steeve
steeve / snippet
Created October 26, 2011 14:53
Kafka Send Exception
def string_to_message(str)
Java::KafkaMessage::Message.new(str.to_java_bytes)
end
options = {
"zk.connect" => "127.0.0.1:2181"
}
@producer = Java::KafkaJavaapiProducer::Producer.new(
Java::KafkaProducer::ProducerConfig.new(
root@bt:~/reaver-wps/src# airmon-ng
Interface Chipset Driver
wlan0 Ralink 2573 USB rt73usb - [phy5]
mon0 Ralink 2573 USB rt73usb - [phy5]
root@bt:~/wpscrack/reaver-wps/src# svn info . | grep Revision:
Revision: 16
@steeve
steeve / gist:1808883
Created February 12, 2012 14:45
FXAA Settings
/*======================================================================================
FXAA Injector danoc1 v1.25 SETTINGS
======================================================================================*/
// TODO: Normalize values to be on a human range scale, whole numbers prefered, decimals usable for micro adjustments
// These values should have min/max limit checks included in their functions, so that the end user doesn't get crazy results
/*------------------------------------------------------------------------------
FILTER SELECTION
/*------------------------------------------------------------------------------
FXAA SHADER
------------------------------------------------------------------------------*/
#define FXAA_PC 1
#define FXAA_HLSL_4 1
#define FXAA_QUALITY__PRESET 39
#include "injFX_Settings.h"
#include "injFX_Shaders\Fxaa3_11.h"