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
<snip> | |
set(Key, Value) -> | |
Flag = random:uniform(65000), | |
set(Key, Flag, "0", Value). | |
set(Key, Flag, ExpTime, Value) when is_integer(Flag) -> | |
set(Key, integer_to_list(Flag), ExpTime, Value); | |
set(Key, Flag, ExpTime, Value) when is_integer(ExpTime) -> | |
set(Key, Flag, integer_to_list(ExpTime), 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
#!/bin/bash | |
# 1st install Apple's XCode (dev tools, gcc, etc) | |
# Then... Setup | |
cat >$HOME/.bash_profile <<\THEEND | |
export PATH=$HOME/bin:/opt/local/bin:$PATH | |
export MANPATH=$HOME/man:/opt/local/man:$MANPATH | |
if [ -f /opt/local/etc/bash_completion ]; then | |
. /opt/local/etc/bash_completion |
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
require 'rubygems' | |
require 'rest_client' | |
url = "http://user:password@domain:5984/" | |
database = "database_name" | |
count = 100 | |
testdocprefix = "doc" | |
inital_value = "test123" | |
updated_value = "asdf" | |
field_name = "test" |
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/ruby | |
require 'rubygems' | |
require 'carrot' | |
def main | |
queue = "couchdb" | |
run = true | |
couchq = Carrot.queue(:queue => queue) |
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
# Author:: Joshua Timberman (<[email protected]>) | |
# Author:: Adam Jacob (<[email protected]>) | |
# | |
# Copyright:: 2009, Opscode, Inc | |
# | |
# 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 |
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
# | |
### Cookbook Name:: haproxy | |
### Recipe:: default | |
### Author:: Joe Williams <[email protected]> | |
### | |
### Copyright 2008, Joe Williams | |
### | |
### 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 |
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/sh | |
### BEGIN INIT INFO | |
# Provides: haproxy | |
# Required-Start: $local_fs $network | |
# Required-Stop: $local_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: fast and reliable load balancing reverse proxy | |
# Description: This file should be used to start and stop haproxy. | |
### END INIT INFO |
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
-define(API_VERSION, "2009-04-04"). | |
-define(API_URL, "http://ec2.amazonaws.com/"). | |
%% The following code was taken from erlaws erlaws_sdb.erl | |
%% and in some cases modified to work slightly different | |
%% | |
%% http://github.com/x6j8x/erlaws/tree/master | |
%% | |
%% Copyright (C) 2008 Sascha Matzke | |
%% |
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
# | |
# Cookbook Name:: heartbeat | |
# Attributes:: heartbeat | |
# | |
# Copyright 2008, Wikia, Inc. | |
# | |
# 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 | |
# |
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
require 'rubygems' | |
require 'right_slicehost' | |
API_KEY="yourapikey" | |
ZONE = "yourdomain.com." | |
slicehost = Rightscale::Slicehost.new(API_KEY) | |
zone_id = nil |
OlderNewer