Skip to content

Instantly share code, notes, and snippets.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" requirePermission="false"/>
<section name="awsmemcachedbucket" type="Enyim.Caching.Configuration.MemcachedClientSection, Enyim.Caching" />
<section name="awsmembaseBucketUsingMemcachedClient" type="Enyim.Caching.Configuration.MemcachedClientSection, Enyim.Caching" />
<section name="awsmembaseBucket" type="Couchbase.Configuration.CouchbaseClientSection, Couchbase" />
</configSections>
<appSettings>
@AndrewLane
AndrewLane / BCrypt.java
Last active December 10, 2015 18:58
BCrypt unit tests in Java
// Copyright (c) 2006 Damien Miller <djm@mindrot.org>
//
// Permission to use, copy, modify, and distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
// copyright notice and this permission notice appear in all copies.
//
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
@AndrewLane
AndrewLane / bcrypt.php
Created January 7, 2013 21:25
BCrypt unit tests in PHP
<?php
if (version_compare(PHP_VERSION, '5.3.7', '<')) {
die("At least PHP 5.3.7 is required");
}
function bcryptHash($plainTextPassword, $cost = 10)
{
if ($cost < 4 || $cost > 31) {
die("Invalid cost: " . $cost);
@AndrewLane
AndrewLane / Program.cs
Created March 20, 2013 16:03
Showing flushing a couchbase bucket via API doesn't seem to work
using System;
using Couchbase;
using Enyim.Caching.Memcached;
namespace TryToFlushCouchbaseBucket
{
class Program
{
private static void Main(string[] args)
{
@AndrewLane
AndrewLane / 11g database result (qa3iad)
Created January 13, 2015 17:17
Oracle 11g vs Oracle 12c NLS_SORT issue
Data before 'alter session'...
----------
BulkEdit_Completed
BulkEdit_Delete Recurring Daily Queued
BulkEdit_Delete Recurring Daily Queued - Daily
BulkEdit_Delete Recurring Daily Queued - Daily
Job 1
Job 2
Job 3
Nov._4th_2014
@AndrewLane
AndrewLane / SortDiagnostic.cs
Created January 13, 2015 17:49
NLS_SORT and Oracle 11g vs 12c
using System;
using System.Configuration;
using System.Text.RegularExpressions;
using Oracle.ManagedDataAccess.Client;
namespace SortDiagnostic
{
class Program
{
const string queryToRun = @"SELECT data FROM (SELECT ROW_NUMBER() OVER (order by data ASC)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using RestSharp;
using RestSharp.Authenticators;
namespace LocalyticsPushPlayground
{
using System;
using System.Threading.Tasks;
using Amazon;
using Ninject;
using Rebus.Config;
using Rebus.Log4net;
using Rebus.Ninject;
using Rebus.Routing.TypeBased;
using Shared.Messages;
@AndrewLane
AndrewLane / keybase.md
Created November 12, 2018 02:29
keybase.md

Keybase proof

I hereby claim:

  • I am andrewlane on github.
  • I am andrewwlane (https://keybase.io/andrewwlane) on keybase.
  • I have a public key ASAJjermM_jtC5CQAyxcYOE5_Lw3Eiczf77wbBFLvcMs_go

To claim this, I am signing this object:

@AndrewLane
AndrewLane / cloudSettings
Created February 13, 2020 18:15
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-02-13T18:15:40.256Z","extensionVersion":"v3.4.3"}