Mix.install([
{:kino, "~> 0.6.2"},
{:telemetry, "~> 1.2.1"}
])
From http://www.darkcoding.net/software/memcached-list-all-keys/
Telnet into memcached
telnet 127.0.0.1 11211
List items
stats items
STAT items:3:number 1
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
include <BLEDevice.h> | |
#include <BLEUtils.h> | |
#include <BLEServer.h> | |
#include "BLE2902.h" | |
#include "BLEHIDDevice.h" | |
#include "HIDTypes.h" | |
#include "HIDKeyboardTypes.h" | |
#include <driver/adc.h> | |
BLEHIDDevice* hid; |
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
% Update Counter | |
increment | |
decrement | |
{increment, 4} | |
{decrement, 9} | |
% Update Set | |
{add, <<"Value">>} | |
{add_all, [<<"Value">>]} | |
{remove, <<"Value">>} | |
{remove_all, <<"Value">>} |
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
%% ------------------------------------------------------------------- | |
%% | |
%% riak_csv_etl: etl tools for csv files in Riak | |
%% | |
%% Copyright (c) 2011 Bradley Taylor. All Rights Reserved. | |
%% | |
%% This file is provided to you 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 |
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
#!/usr/bin/env escript | |
%% -*- erlang -*- | |
-include_lib("kernel/include/file.hrl"). | |
-compile(export_all). | |
-define(LOG(S), io:format(S)). | |
-define(LOG(S,A), io:format(S,A)). | |
main(Dirs) -> | |
CodePath = case os:getenv("RIAK_LIB") of |
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
handle_call({lookup_popular_replies, TweetId, AuthorId}, _From, #state{client=Client} = State) -> | |
% reduce fun to get valid tweet keys in tweet response bucket phase 3 | |
Fun = make_local_fun("fun(O, _) -> | |
lists:foldl(fun | |
([LinkedTweet = <<Id:128>>, <<Val:128>>, <<\"reply\">>], Acc) -> | |
[{{<<\"tweet_responses_bucket\">>, LinkedTweet}, {Id, Val}} | Acc]; | |
({{<<\"tweet_responses_bucket\">>, _}, _} = PreviousPass, Acc) -> | |
[PreviousPass | Acc]; | |
(_, Acc) -> | |
Acc |
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
#!/bin/bash | |
# ERL_BIN, RIAK_LIB, and BUCKET_LIB can be defaulted here or set | |
# in the environment | |
# | |
# Path to the erl binary provided by Riak | |
ERL_BIN=${ERL_BIN:-"/usr/lib64/riak/erts-5.8.4/bin/erl"} | |
# Path to riak libraries | |
RIAK_LIB=${ERL_BIN:-"/usr/lib64/riak/lib"} |
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
%% ------------------------------------------------------------------- | |
%% | |
%% riak_kv_vnode: VNode Implementation | |
%% | |
%% Copyright (c) 2007-2010 Basho Technologies, Inc. All Rights Reserved. | |
%% | |
%% This file is provided to you 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 |
NewerOlder