Skip to content

Instantly share code, notes, and snippets.

🏒
Watching Ice Hockey World Championship

Vadim Gremyachev vgrem

Block or report user

Report or block vgrem

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View data.json
[
{ "name" : "Joe Johnson"
, "values": [
{
"from date": "jan-2000"
, "to date": "jun-2002"
, "Role": "VP of Product"
, "Company": "A Company"
},
View data,json
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Polygon",
"coordinates": [
[
View locations.json
[
{
"acf": {
"place_latitude": "-22.695754",
"place_longitude": "118.269081",
"place_short-description": "Karijini National Park"
},
"id": 12,
"parent": 10,
"title": {
View pharmacy.geojson.js
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,
View JsonBatchSupport.cs
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;
View data.json
{
"lat": "51.678418",
"lng": "7.809007"
}
@vgrem
vgrem / addFieldUserValue.js
Created Sep 15, 2018
Demonstrates how to add UserFieldValue for a Group as value in ListItem via SharePoint JSOM API
View addFieldUserValue.js
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);
}
@vgrem
vgrem / getWebParts.js
Created Jul 27, 2018
How to retrieve web parts along with web part type using SharePoint JSOM API
View getWebParts.js
async function executeQuery(context) {
return new Promise((resolve, reject) => {
context.executeQueryAsync(function () {
resolve();
}, function (sender, args) {
reject(args);
});
});
}
@vgrem
vgrem / data.json
Created Jul 18, 2018
Sample JSON data
View data.json
[
{
"photo_id": 27932,
"name": "Atardecer en Embalse",
"photo_url": "http://www.panoramio.com/photo/27932",
"photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/27932.jpg",
"lng": -64.404945,
"lat": -32.202924,
"width": 500,
"height": 375,
@vgrem
vgrem / Get-SPOWebs.ps1
Created Mar 24, 2018
Retrieve sub webs within a site collection
View Get-SPOWebs.ps1
function Get-SPOWebs(){
param(
$Url = $(throw "Please provide a Site Collection Url"),
$Credential = $(throw "Please provide a Credentials")
)
$context = New-Object Microsoft.SharePoint.Client.ClientContext($Url)
$context.Credentials = $Credential
$web = $context.Web
$context.Load($web)
You can’t perform that action at this time.