For excessively paranoid client authentication.
Updated Apr 5 2019:
because this is a gist from 2011 that people stumble into and maybe you should AES instead of 3DES in the year of our lord 2019.
some other notes:
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir ~/local | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local | |
make install # ok, fine, this step probably takes more than 30 seconds... | |
curl https://www.npmjs.org/install.sh | sh |
using System.Collections.Generic; | |
namespace System.Threading | |
{ | |
public class PollingWorker : IPollingWorker,IDisposable | |
{ | |
private class TickAction | |
{ | |
public string Name { get; set; } | |
public Action Work { get; set; } |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
using System.Web.Mvc; | |
using System.IO; | |
using System.Text; | |
namespace DummyMvc.Helpers | |
{ |
// usage | |
_db.Query<Story, Stories_Search>() | |
.If(status.HasValue, q => q.Where(x => x.Status == status)) | |
.If(!curatorId.IsEmpty(), q => q.Where(x => x.CuratorId == curatorId)) | |
.If(publicationDate.HasValue, q => q.Where(x => x.ProposedPublicationDate == publicationDate.Value.Date)) | |
.OrderByDescending(x => x.CreatedAt) | |
.ToPagedList(page, size); | |
If you're coming to the Property-Based TDD As If You Meant It Workshop, you will need to bring a laptop with your favourite programming environment, a property-based testing library and, depending on the language, a test framework to run the property-based-tests.
Any other languages or suggestions? Comment below.
.NET (C#, F#, VB)
Python:
public static List<List<Coordinate>> ToGoogleMapsPolygon(this DbGeography dbGeo) | |
{ | |
// contains all geo data for one postal code / admin area code | |
// conversion to SqlGeography because DbGeography does not offer properties to determine rings within geometries. we need those ring information to display areas with holes | |
var sqlGeo = (SqlGeography) dbGeo.ProviderValue; | |
var numberOfGeometries = sqlGeo.STNumGeometries(); | |
var result = new List<List<Coordinate>>((int) numberOfGeometries); |
ko.bindingHandlers.modal = { | |
update: function (element, valueAccessor) { | |
$(element).click(function () { | |
$.fancybox({ content: $('<div/>').addClass('list-widget').html($('.content', $(element).parent()).html()) }); | |
}); | |
} | |
}; |
Prerequisites:
Software components used: