Skip to content

Instantly share code, notes, and snippets.

View ryanwebjackson's full-sized avatar

Ryan Jackson ryanwebjackson

View GitHub Profile
@ryanwebjackson
ryanwebjackson / delicious.html
Created April 14, 2019 22:51 — forked from jgarber623/delicious.html
A sample of the Netscape Bookmark File Format as exported from Delicious.
<!DOCTYPE NETSCAPE-Bookmark-file-1>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<!-- This is an automatically generated file.
It will be read and overwritten.
Do Not Edit! -->
<TITLE>Bookmarks</TITLE>
<H1>Bookmarks</H1>
<DL><p>
<DT><A HREF="https://developer.apple.com/library/mac/releasenotes/InterapplicationCommunication/RN-JavaScriptForAutomation/index.html#//apple_ref/doc/-%20uid/TP40014508" ADD_DATE="1414706885" PRIVATE="0" TAGS="javascript,mac,osx,yosemite">JavaScript for Automation Release Notes</A>
<DD>This article describes JavaScript for Automation, a new feature in OS X Yosemite.
Does anyone use JSON for custom configuration files and if so, are there any conventions or common practices, when reading them from a .NET project? I have created a simple schema for one data type, and want to be able to store a collection of those in this config file, and I'm wondering if the { "data": ... } pattern makes sense or if there's another convention I should be using that makes more sense.
https://github.com/Dynalon/JsonConfig
https://stackoverflow.com/questions/30042795/building-a-json-configuration-section
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data.Linq;
using System.Linq;
using System.Linq.Expressions;
namespace UnitTesting.MyAssembly
{
internal class MockTable<T> : ITable<T> where T : class
https://twitter.com/switchology/status/1037814109440565248
https://cmatskas.com/how-to-update-your-git-credentials-on-windows/
git config --global credential.helper wincred
Via PowerShell?
@ryanwebjackson
ryanwebjackson / Settings.runsettings
Created September 22, 2018 17:57
Modern test settings file aimed at preventing concurrent test runs, using MSTest framework.
<?xml version="1.0" encoding="utf-8"?>
<RunSettings>
<!-- Configurations that affect the Test Framework -->
<RunConfiguration>
<MaxCpuCount>1</MaxCpuCount>
</RunConfiguration>
</RunSettings>
//https://msdn.microsoft.com/en-us/library/system.text.regularexpressions.regex.getgroupnames(v=vs.110).aspx

Try/Finally does not catch an error! What is does is execute the finally block after throwing the error.
The only reason I could think to do this is the disposal of opened resources (this is the recommendation from Microsoft as well).

(https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/try-finally)

Personally, I don't see much of an advantage in this, as you might as well catch the exception and do any clean up in the catch block.
At that point finally would serve no purpose (as code execution would/will continue).

I realize this *sounds* like a bad idea, but hear me out. I have a few different imported web services (.NET classes generated from a web service response definition), and classes from different services implicitly have the same interface - they have properties named that same, which represent the same things, but are only different types due to code generation. Is there a way to create an explicit interface to represent this relationship? I tried make a standard, typed C# interface, and it's not easy, due to custom classes several levels deep.
I realize I could use reflection, or serialize to JSON, but am wondering if there's a way I could use dynamic types, or something else, to say
"I want these (named) properties, but don't care what type they are".
Valocq: quick Blender tip: to make an even sphere.... make a cube, subdivide, Shift+Alt+S and move your mouse
Valocq: unwrap it as a cube