Skip to content

Instantly share code, notes, and snippets.

View davidcoallier's full-sized avatar

David Coallier davidcoallier

View GitHub Profile
<?php
require_once 'Services/Capsule.php';
$appName = 'appName';
$token = 'secretToken'; // Get that from the website
$oppId = 'superOpportunityId';
// 1. Let's create a new person in our service
// 2. Fetch this user using party search
// 3. Update this user
<?php
require_once 'PHPUnit/Framework.php';
require_once 'PHPUnit/Framework/Assert.php';
// Mock object
class ServicesAtlassianCrowdMock
{
public function methodOne() { return true; }
}
fun({Doc}) ->
case {proplists:get_value(<<"name">>, Doc), proplists:get_value(<<"value">>, Doc)} of
{undefined, _} ->
ok;
{_, undefined} ->
ok;
{Name, Value} ->
Emit(Name, {Doc});
_ ->
ok
Binary_to_integer = fun(Bin) ->
case {is_binary(Bin), Bin /= <<>>} of
{true, true} ->
list_to_integer(binary_to_list(Bin));
_->
0
end
end,
// {{{ 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);
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);
server {
listen 80;
server_name admin.api.frapi;
access_log /var/log/nginx/admin.api.frapi/access.log;
location / {
if (-f $request_filename) {
break;
}

Meta

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

Actions

<?php
/**
* Action Paymentby
*
* This action is used to process the payments for "x" user.
*
* @link http://getfrapi.com
* @author Frapi <frapi@getfrapi.com>
* @link /payment/buy
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).