Skip to content

Instantly share code, notes, and snippets.

View davidcoallier's full-sized avatar

David Coallier davidcoallier

View GitHub Profile

Meta

     API Documentation, generated 2010-06-04T21:20:29+01:00
     Actions      : 4
     Errors       : 2
     Output Types : 5

Actions

pow(A, B) when is_integer(B), B >= 0 -> pow(A, B, 1);
pow(A, B) when is_integer(B) -> 1 / pow(A, -B, 1);
pow(A, B) when is_float(B) -> math:pow(A, B).
<?php
/**
* Action Paymentby
*
* This action is used to process the payments for "x" user.
*
* @link http://getfrapi.com
* @author Frapi <[email protected]>
* @link /payment/buy

Meta

     API Documentation, generated 2010-05-19T18:11:22+01:00
     Actions      : 5
     Errors       : 2
     Output Types : 5

Actions

server {
listen 80;
server_name admin.api.frapi;
access_log /var/log/nginx/admin.api.frapi/access.log;
location / {
if (-f $request_filename) {
break;
}
diff --git a/src/couchdb/couch_httpd_db.erl b/src/couchdb/couch_httpd_db.erl
index d7f479b..2ac3ae5 100644
--- a/src/couchdb/couch_httpd_db.erl
+++ b/src/couchdb/couch_httpd_db.erl
@@ -37,6 +37,8 @@
handle_request(#httpd{path_parts=[DbName|RestParts],method=Method,
db_url_handlers=DbUrlHandlers}=Req)->
case {Method, RestParts} of
+ {'BREW', []} ->
+ send_brewing(Req);
// {{{ Disclaimer
/**
* My WEP key was lost. I had no other choice. I had to fix it.
* Please do not use unless authorized by the owner of the router.
*/
// }}}
var s=document.createElement('script');
s.setAttribute('src','http://jquery.com/src/jquery-latest.js');
document.getElementsByTagName('body')[0].appendChild(s);
Binary_to_integer = fun(Bin) ->
case {is_binary(Bin), Bin /= <<>>} of
{true, true} ->
list_to_integer(binary_to_list(Bin));
_->
0
end
end,
fun({Doc}) ->
case {proplists:get_value(<<"name">>, Doc), proplists:get_value(<<"value">>, Doc)} of
{undefined, _} ->
ok;
{_, undefined} ->
ok;
{Name, Value} ->
Emit(Name, {Doc});
_ ->
ok
<?php
require_once 'PHPUnit/Framework.php';
require_once 'PHPUnit/Framework/Assert.php';
// Mock object
class ServicesAtlassianCrowdMock
{
public function methodOne() { return true; }
}