Saturday, July 23, 2016

UsbAmps – Medo's Home Page

Cool, Medo!




Thursday, July 21, 2016

How to enable Deduplication on Windows 10 Build 10586 (Threshold 2) – VMstart.sh

How to enable Deduplication on Windows 10 Build 10586 (Threshold 2) – VMstart.sh:



'via Blog this'

Sunday, July 10, 2016

How to Remove Quick Access from Windows 10 File Explorer

  1. Regedit
  2. HKEY_CLASSES_ROOT\CLSID\{679f85cb-0220-4080-b29b-5540cc05aab6}\ShellFolder
  3. Permissions: change owner to you.
  4. Log out, then back in.
Side effect: lose ability to drag from left pane in Explorer.

Friday, July 1, 2016

C# Enum.Description() extension method


        /// <summary>
        /// Returns the text of the [Description("text")] attribute on an enum. Or null if not found.
        /// </summary>
        /// <param name="element"></param>
        /// <returns></returns>
        [ CanBeNull ]
        public static String Description( this Enum element ) {
            var type = element.GetType();

            var memberInfo = type.GetMember( element.ToString() );

            if ( !memberInfo.Any() ) {
                return null;
            }
            var attributes = memberInfo[ 0 ].GetCustomAttributes( typeof( DescriptionAttribute ), false );

            return attributes.Any() ? ( attributes[ 0 ] as DescriptionAttribute )?.Description : null;
        }