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
UNIVERSITY OF KANSAS MEDICAL CENTER | |
UNIVERSITY OF KANSAS MEDICAL CENTER | |
KANSAS STATE UNIVERSITY | |
THE UNIVERSITY OF KANSAS | |
SPRINT NEXTEL CORPORATION | |
SPRINT NEXTEL CORPORATION | |
SPRINT NEXTEL CORPORATION | |
GARMIN INTERNATIONAL, INC. | |
SPRINT NEXTEL CORPORATION | |
THE UNIVERSITY OF KANSAS MEDICAL CENTER |
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
say you have data sources with pagination, where you iterate with page and per_page | |
http://host/articles?topic=action (page = [0,1,2,...] per_page = 10 | 20 | 30) | |
http://host/articles?topic=puzzle (page = [0,1,2,...] per_page = 10 | 20 | 30) | |
http://host/articles?topic=shooter (page = [0,1,2,...] per_page = 10 | 20 | 30) | |
http://host/articles?topic=rpg (page = [0,1,2,...] per_page = 10 | 20 | 30) | |
Each article is tagged one and one only for the 'topic'. And then, you | |
realize that some topics (action, puzzle, shooter, rpg) are actually 'games' | |
so you define game is a set topics [action, puzzle, shooter, and rpg) |
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
POST / HTTP/1.1 | |
Host: 350f237e.ngrok.com | |
X-Real-IP: 192.30.252.46 | |
X-Forwarded-Proto: http | |
Connection: close | |
Content-Length: 6884 | |
Accept: */* | |
User-Agent: GitHub-Hookshot/c703d31 | |
X-GitHub-Event: issues | |
X-GitHub-Delivery: 716bd100-d252-11e4-99b1-4e101b90a3be |
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
{ | |
"action": "opened", | |
"issue": { | |
"url": "https://api.github.com/repos/dvliman/tt_github/issues/4", | |
"labels_url": "https://api.github.com/repos/dvliman/tt_github/issues/4/labels{/name}", | |
"comments_url": "https://api.github.com/repos/dvliman/tt_github/issues/4/comments", | |
"events_url": "https://api.github.com/repos/dvliman/tt_github/issues/4/events", | |
"html_url": "https://github.com/dvliman/tt_github/issues/4", | |
"id": 64075298, | |
"number": 4, |
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
{ | |
"action": "assigned", | |
"issue": { | |
"url": "https://api.github.com/repos/dvliman/tt_github/issues/11", | |
"labels_url": "https://api.github.com/repos/dvliman/tt_github/issues/11/labels{/name}", | |
"comments_url": "https://api.github.com/repos/dvliman/tt_github/issues/11/comments", | |
"events_url": "https://api.github.com/repos/dvliman/tt_github/issues/11/events", | |
"html_url": "https://github.com/dvliman/tt_github/issues/11", | |
"id": 64092589, | |
"number": 11, |
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
% Post/Query string parameter validation. | |
% | |
% Mark Allen, [email protected] | |
% | |
% Specs [{{name, "param_name"}, {required, true}, {type, function}}, ... ] | |
% Input [{"name", "value}, ...] just you'd get from post or query string parameters | |
-module(t). | |
-export([test/0, test1/0, test2/0]). |
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
Whois Server Version 2.0 | |
Domain names in the .com and .net domains can now be registered | |
with many different competing registrars. Go to http://www.internic.net | |
for detailed information. | |
Domain Name: BLUEPROMOCODE.COM | |
Registrar: GODADDY.COM, LLC | |
Sponsoring Registrar IANA ID: 146 |
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
([email protected])13> try lists:foreach(fun(Y) -> case Y == 3 of true -> throw(return_atom); false -> ok end end, [1,2,3,4,5]) catch Reason -> io:format("got:~p", [Reason]) end. | |
got:return_atomok | |
([email protected])14> try lists:foreach(fun( Y ) -> case Y == 3 of true -> throw(bad_atom); false -> ok end end, [1,2,3,4,5]) catch Reason -> io:format("got: ~p", [Reason]) end. | |
** exception throw: bad_atom |
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
// utils.go | |
func slugify(input string) string { | |
// 1) trim and lower case input string | |
// 2) for every subsequent whitespace, collapse to just one whitespace | |
// 3) for every whitespace, replace with '-'; including from previous step 2) | |
// 4) for every non alphanumeric character, replace with empty space | |
} | |
// utils_test.go |
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
-module(validation_utils). | |
-export([validate_until_first_error/2]). | |
-export([validate_all_errors/2]). | |
-type validation_args() :: [term()]. | |
-type validation_funs() :: [{function(), atom()}]. | |
-spec validate_until_first_error(validation_args(), validation_funs()) -> ok | {error, atom()}. | |
% validate_until_first_error/2 applies list of validation_funs() to each element in args |