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 /srv/software/medic-core/v1.6.1/x64/bin/node | |
var http = require('http'); | |
var request = function(options, postData, callback) { | |
if (!callback) { | |
callback = postData; | |
postData = null; | |
} |
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
diff --git a/static/js/modules/send-message.js b/static/js/modules/send-message.js | |
index 7ffd075..3ce2443 100644 | |
--- a/static/js/modules/send-message.js | |
+++ b/static/js/modules/send-message.js | |
@@ -21,7 +21,7 @@ var _ = require('underscore'), | |
}; | |
var validatePhoneNumber = function(data) { | |
- if (data.everyoneAt) { | |
+ if (data.doc.everyoneAt) { |
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
// NB: all three of these will have the same comment documentation | |
var minimumSig = function(start, mid, end) = { | |
var newMid; | |
if (arguments === 3) { | |
newMid = mid; | |
} else if (arguments === 4) { | |
newMid = arguments[2]; | |
end = arguments[3]; | |
} else { |
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
// NB: all three of these will have the same comment documentation | |
var minimumSig = function(start, mid, end) = { | |
var newMid; | |
if (arguments === 3) { | |
newMid = mid; | |
} else if (arguments === 4) { | |
newMid = arguments[2]; | |
end = arguments[3]; | |
} else { |
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
Show hidden characters
{ | |
"folders": | |
[ | |
{ | |
"path": ".", | |
"folder_exclude_patterns": ["static/dist"] | |
} | |
] | |
} |
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
% Benchmarking code for REPL nicked and modified to remove module param from here: | |
% https://erlangcentral.org/wiki/index.php/Measuring_Function_Execution_Time | |
% Params: FnName, Params, Rounds, eg: | |
% TC(DeepGet, [DeepGet, [<<"userCtx">>, <<"name">>], Req], 100000). | |
% TC = fun(TC_F, TC_A, TC_N) when TC_N > 0 -> TC_L = tl([begin {TC_T, _Result} = timer:tc(TC_F, TC_A), TC_T end || _ <- lists:seq(1, TC_N)]), TC_Min = lists:min(TC_L), TC_Max = lists:max(TC_L), TC_Med = lists:nth(round((TC_N - 1) / 2), lists:sort(TC_L)), TC_Avg = round(lists:foldl(fun(TC_X, TC_Sum) -> TC_X + TC_Sum end, 0, TC_L) / (TC_N - 1)), io:format("Range: ~b - ~b mics~nMedian: ~b mics ~nAverage: ~b mics~n", [TC_Min, TC_Max, TC_Med, TC_Avg]), TC_Med end. | |
% Made "cmd+v futon-ready" with the following disgusting display of black magic | |
% cat scratch.erl | sed 's/%.*//' | sed 's/"/\\"/'g | sed -e ':a' -e 'N' -e '$!ba' -e 's/\n/ /g' | pbcopy | |
fun ({Doc}, {Req}) -> | |
SafeGetValue = fun(Key, PropListMaybe, Default) -> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Margin test</title> | |
</head> | |
<body> | |
<div id="one"> | |
<h1>Lorum ipsum</h1> | |
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> | |
</div> |
NewerOlder