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
<?php | |
$dictionary['moduleName']['unified_search'] = true; // opts module in | |
$dictionary['moduleName']['fields'][fieldName]['unified_search'] = true; // opts field in | |
?> |
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
def is_perm(ss,s): | |
for l in ss: | |
if s.find(l) != -1: | |
s = s.replace(l,"",1) | |
else: | |
return False | |
return True | |
if __name__ == "__main__": | |
lines = [ |
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
class MyWorld | |
include Rack::Test::Methods | |
include Webrat::Methods | |
include Webrat::Matchers | |
def app | |
App | |
end | |
end |
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
lists:foldl(fun(F, Acc) -> | |
case file:open(F, [read, raw, binary]) of | |
{ok, Io} -> | |
file:close(Io), | |
Acc; | |
{error, Reason} -> | |
[[{file, F},{error, Reason}]|Acc] | |
end | |
end, | |
[], |
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
Fun = fun(Nodes) -> | |
{ok, LocalRing} = riak_core_ring_manager:get_my_ring(), | |
LocalOwners = riak_core_ring:all_owners(LocalRing), | |
case (catch lists:foldl(fun(Node, _) -> | |
{ok, R} = rpc:call(Node, riak_core_ring_manager, get_my_ring, []), | |
true = riak_core_ring:all_owners(R) =:= LocalOwners | |
end, | |
true, | |
Nodes)) of | |
true -> true; |
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
// log the structure of the value passed to the function | |
precommitHook: function(value) { | |
ejsLog("log/js.log", value.toSource()); | |
return value; | |
} |
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
{sys, [ | |
{lib_dirs, []}, | |
{rel, "mysample", "1", | |
[ | |
kernel, | |
stdlib, | |
sasl | |
]}, | |
{rel, "start_clean", "", | |
[ |
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
import sys | |
from riak import RiakClient | |
from riak import RiakPbcTransport | |
ip = '127.0.0.1' | |
port = 8087 | |
def store_file(filename): | |
with open(filename, 'r') as f: | |
data = f.read() |
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
find data/bitcask -size 0 -print0 | xargs -0 rm |
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
Vagrant::Config.run do |config| | |
(1..1).each do |index| | |
config.vm.define "riak#{index}".to_sym do |cfg| | |
ip = "33.33.33.1#{index}" | |
cfg.vm.box_url = "http://files.vagrantup.com/lucid32.box" | |
cfg.vm.box = "lucid32" | |
cfg.vm.network(ip) | |
cfg.vm.forward_port("ssh", 22, "222#{index}".to_i) | |
cfg.vm.customize do |vm| | |
vm.name = "riak#{index}" |
OlderNewer