Skip to content

Instantly share code, notes, and snippets.

View caseyjmorris's full-sized avatar

Casey J. Morris caseyjmorris

View GitHub Profile
@benjamincharity
benjamincharity / autonomous.txt
Last active August 14, 2026 19:24
Instructions on how to reset the autonomous desk. This fixes a problem where the desk will not lower (also reportedly fixes incorrectly reported heights).
> Thank you for reaching out to Autonomous! I am sorry to hear that you are having some trouble with your SmartDesk
> but I will be glad to assist. It sounds like your system needs a "hard reset" can I please have you follow these
> steps thoroughly.
Reset Steps:
1. Unplug the desk for 20 seconds. Plug it back in. Wait a full 20 seconds.
2. Press the up and down buttons until the desk lowers all the way and beeps or 20 seconds pass.
3. Release both buttons.
4. Press the down buttons until the desk beeps one more time or 20 seconds pass.
@rexcfnghk
rexcfnghk / RemoveUnderscoreForeignKeyNamingConvention.cs
Last active March 8, 2019 15:06
Naming convention for Entity Framework to remove underscores in foreign key names in many-to-many relationships, improved upon SO answer: http://stackoverflow.com/a/18245172/465056
using System.Collections.Generic;
using System.Data.Entity.Core.Metadata.Edm;
using System.Data.Entity.Infrastructure;
using System.Data.Entity.ModelConfiguration.Conventions;
namespace EFTest.Entities.Conventions
{
public class RemoveUnderscoreForeignKeyNamingConvention : IStoreModelConvention<AssociationType>
{
public void Apply(AssociationType item, DbModel model)
@plaurin
plaurin / ElasticTableEntity.cs
Created March 13, 2013 01:09
ElasticTableEntity is a reusable dynamic entity used for the Azure Table Storage Service
public class ElasticTableEntity : DynamicObject, ITableEntity,
ICustomMemberProvider // For LinqPad's Dump
{
public ElasticTableEntity()
{
this.Properties = new Dictionary<string, EntityProperty>();
}
public IDictionary<string, EntityProperty> Properties { get; private set; }
@niik
niik / CryptoRandom.cs
Created June 9, 2011 21:48
Buffered CryptoRandom implementation based on Stephen Toub and Shawn Farkas' CryptoRandom
/*
* Original version by Stephen Toub and Shawn Farkas.
* Random pool and thread safety added by Markus Olsson (freakcode.com).
*
* Original source: http://msdn.microsoft.com/en-us/magazine/cc163367.aspx
*
* Some benchmarks (2009-03-18):
*
* Results produced by calling Next() 1 000 000 times on my machine (dual core 3Ghz)
*