Skip to content

Instantly share code, notes, and snippets.

using System;
using Newtonsoft.Json;
public class Program
{
public static void Main()
{
var info = new Info { Some = "a", Field = 1 };
info.GetCommandJson<AddOrUpdateChat>();
}
@reslea
reslea / input.txt
Last active November 23, 2021 22:03
input.txt
This file has been truncated, but you can view the full file.
[
{"name": "Afghanistan", "code": "AF"},
{"name": "Åland Islands", "code": "AX"},
{"name": "Albania", "code": "AL"},
{"name": "Algeria", "code": "DZ"},
{"name": "American Samoa", "code": "AS"},
{"name": "AndorrA", "code": "AD"},
{"name": "Angola", "code": "AO"},
{"name": "Anguilla", "code": "AI"},
{"name": "Antarctica", "code": "AQ"},
@reslea
reslea / gist:59fd39485ebeac764d1faf7341b0a8fa
Created April 15, 2016 09:22
XPath select element if other not exist
//element[@class="some" and not //element2[@class="some other"]])
@reslea
reslea / systemFieldsTitles.cs
Created March 1, 2016 20:31
Collection of internal names of system fields in sharepoint, except ID and Title
List<string> systemFieldsTitles = new List<string>()
{
"ContentTypeId",
"_ModerationComments",
"File_x0020_Type",
"ContentType",
"Modified",
"Created",
"Author",
"Editor",
@reslea
reslea / MethodBuilder.cs
Created October 7, 2015 12:37
MethodBuilder
using System;
public class Program
{
public static void Main()
{
Method<int>().To<string>();
}
public static MethodBuilder<TFirst> Method<TFirst>()