Short link to this gist: https://bit.ly/2Ppp0Uz
Links to software used in this course:
- Docker Deskop for Mac and Windows
- Docker Community Edition for Linux
- Azure Data Studio:
- https://docs.microsoft.com/en-us/sql/azure-data-studio
Short link to this gist: https://bit.ly/2Ppp0Uz
Links to software used in this course:
To send a request via the sandbox, you can use pm.sendRequest.
pm.test("Status code is 200", function () {
pm.sendRequest('https://postman-echo.com/get', function (err, res) {
pm.expect(err).to.not.be.ok;
pm.expect(res).to.have.property('code', 200);
pm.expect(res).to.have.property('status', 'OK');
});
});
| If you use the findAll(Specification, Pageable) method, a count query is first executed and then the | |
| data query is executed if the count returns a value greater than the offset. | |
| For what I was doing I did not need pageable, but simply wanted to limit my results. This is easy | |
| to do with static named queries and methodNameMagicGoodness queries, but from my research (googling | |
| for a few hours) I couldn't find a way to do it with dynamic criteria queries using Specifications. | |
| During my search I found two things that helped me to figure out how to just do it myself. | |
| 1.) A stackoverflow question. |
| #!/usr/bin/env ruby | |
| =begin | |
| = Geographic Searches With Postgres's Earthdistance and Cube Extensions | |
| This program shows how to easily create a Postgres database that uses the Cube | |
| and Earthdistance extensions to perform fast queries on geographic data. | |
| Briefly, the problem this code solves is "show me all places within 50 | |
| kilometers of New York City." |
| public static void BulkInsertNpgsql<T>(this IDbConnection dbConn, IEnumerable<T> list, IEnumerable<string> insertFields = null) | |
| { | |
| if (list == null) return; | |
| if (list.Count() < 1) return; | |
| var objWithAttributes = list.FirstOrDefault(); | |
| var modelDef = OrmLiteConfig.GetModelDefinition(objWithAttributes.GetType()); | |
| if (insertFields == null) insertFields = new List<string>(); |
| The regex patterns in this gist are intended to match any URLs, | |
| including "mailto:foo@example.com", "x-whatever://foo", etc. For a | |
| pattern that attempts only to match web URLs (http, https), see: | |
| https://gist.github.com/gruber/8891611 | |
| # Single-line version of pattern: | |
| (?i)\b((?:[a-z][\w-]+:(?:/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’])) |
| The regex patterns in this gist are intended only to match web URLs -- http, | |
| https, and naked domains like "example.com". For a pattern that attempts to | |
| match all URLs, regardless of protocol, see: https://gist.github.com/gruber/249502 | |
| # Single-line version: | |
| (?i)\b((?:https?:(?:/{1,3}|[a-z0-9%])|[a-z0-9.\-]+[.](?:com|net|org|edu|gov|mil|aero|asia|biz|cat|coop|info|int|jobs|mobi|museum|name|post|pro|tel|travel|xxx|ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cs|cu|cv|cx|cy|cz|dd|de|dj|dk|dm|do|dz|ec|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|s |
No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.
Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.
| foo | bar | baz | |
|---|---|---|---|
| a | 1 | ||
| b | 2 | ||
| c | |||
| 4 | |||
| e | 5 |
| # Script correlating to tutorial at http://ebens.me/post/install-lamp-stack-ubuntu | |
| # Even though you probably could, don't run it all at once | |
| # new user | |
| adduser new_user | |
| usermod -a -G sudo new_user | |
| su - new_user | |
| # new repos |