Skip to content

Instantly share code, notes, and snippets.

View vgrem's full-sized avatar
🏠
Working from home

Vadim Gremyachev vgrem

🏠
Working from home
View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
[{"name":"Brisbane","position":{"lat":-27.4704073,"lng":153.0142954}},{"name":"Sidney","position":{"lat":-33.867888,"lng":151.2012372}},{"name":"Perth","position":{"lat":-31.954654,"lng":115.8399823}}]
@vgrem
vgrem / BatchRequest.cs
Last active May 23, 2021 20:13
BatchRequest class for msgraph-sdk-dotnet
using Microsoft.Graph;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Dynamic;
using System.IO;
using System.Linq;
using System.Net.Http;
using System.Net.Http.Headers;
[
{ "name" : "Joe Johnson"
, "values": [
{
"from date": "jan-2000"
, "to date": "jun-2002"
, "Role": "VP of Product"
, "Company": "A Company"
},
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
{
"acf": {
"place_latitude": "-22.695754",
"place_longitude": "118.269081",
"place_short-description": "Karijini National Park"
},
"id": 12,
"parent": 10,
"title": {
ar pharmacy = {
"type": "FeatureCollection",
"name": "pharmacy",
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },
"features": [
{ "type": "Feature", "properties": { "KMIST_TEMP_ID": "KTMPVN12119", "ID POP": null, "type": "2018", "pop": "No", "Timestamp": "2018\/07\/11 22:50:00", "panel": null, "Name": "Nha Thuoc An Binh", "city": "Ho Chi Minh", "district": "Thu Duc", "ward": "Linh Trung", "name_full": "Ho Chi Minh ,Nha Thuoc An Binh ,Thu Duc, Linh Trung", "lat": 10.8539167, "lon": 106.7716921, "geo": "106.7716921,10.8539167", "amenity": "pharmacy" }, "geometry": { "type": "Point", "coordinates": [ 106.7716921, 10.8539167 ] } },
{ "type": "Feature", "properties": { "KMIST_TEMP_ID": "KTMPVN12144", "ID POP": 17019, "type": "2018", "pop": "yes", "Timestamp": "2017\/10\/15 18:05:00", "panel": null, "Name": "Nha Thuoc Thuy Nguyen", "city": "Ho Chi Minh", "district": "Binh Thanh", "ward": "21", "name_full": "Ho Chi Minh ,Nha Thuoc Thuy Nguyen ,Binh Thanh,
using Microsoft.Graph;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Dynamic;
using System.Linq;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
{
"lat": "51.678418",
"lng": "7.809007"
}
@vgrem
vgrem / addFieldUserValue.js
Created September 15, 2018 15:41
Demonstrates how to add UserFieldValue for a Group as value in ListItem via SharePoint JSOM API
function addListItem(list, properties) {
let ctx = list.get_context();
let itemCreateInfo = new SP.ListItemCreationInformation();
let listItem = list.addItem(itemCreateInfo);
for (let name in properties) {
listItem.set_item(name, properties[name])
}
listItem.update();
return executeQuery(ctx);
}