Skip to content

Instantly share code, notes, and snippets.

View Gennady-G's full-sized avatar

Gennady G Gennady-G

  • Sharepoint 2007/10/13/Online365 Developer, Admin
  • Moldova/Russia
View GitHub Profile
@Gennady-G
Gennady-G / tsconfig.json
Created September 7, 2023 14:16
tsconfig.json
{
"compilerOptions": {
"target": "es5",
"module": "esnext",
"lib": [
"es2017",
"dom"
],
"rootDir": "src",
"jsx": "react",
{
"name": "drop-test-ajax-add",
"version": "1.0.0",
"description": "",
"main": "./dist/index.js",
"typings": "./dist/index",
"private": true,
"scripts": {
"start": "gulp build --no-webpack && gulp serve",
"build": "npm run clean && npm run lint && gulp build --prod",
@Gennady-G
Gennady-G / gist:5049e0e445930ac53f314f5980f33462
Last active September 4, 2023 18:09
Infopath XML to HTML-compatible base64
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml;
using System.Xml.XPath;
using System.Security.Cryptography;
using System.IO;
using System.Runtime.InteropServices;
@Gennady-G
Gennady-G / Program.cs
Last active March 31, 2023 16:20
example of infopath xml with two images, and extracted image content used on html page
// And here is source code that reads file name and image content data
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml;
using System.Xml.XPath;
using System.Security.Cryptography;
{"version":1,"resource":"file:///c%3A/Users/Administrator/Desktop/%D0%A1%D0%B2%D0%B8%D1%82%D0%BA%D0%B8%20%D0%BF%D0%BE%20%D0%BA%D0%B0%D1%87%D0%B5%D1%81%D1%82%D0%B2%D1%83/4-2-2/QDR_2019-08-29_21100023.xml","entries":[{"id":"mDpf.xml","source":"searchReplace.source","timestamp":1662145525513}]}
using System;
using System.Net;
using System.Security;
using System.Xml;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Client;
namespace ServerModelConsoleApp
{
class Program
import { sp, Item, Web } from '@pnp/sp';
import { Items, PagedItemCollection } from '@pnp/sp'; // for paging
public componentDidMount(): void {
console.log('componentDidMount fired.');
// this.loadJsomScripts();
this.getItemsFromSharepoint();
}
{
"name": "del",
"version": "0.0.1",
"private": true,
"main": "lib/index.js",
"engines": {
"node": ">=0.10.0"
},
"scripts": {
"build": "gulp bundle",
{
"compilerOptions": {
"target": "es5",
"forceConsistentCasingInFileNames": true,
"module": "esnext",
"moduleResolution": "node",
"jsx": "react",
"declaration": true,
"sourceMap": true,
"experimentalDecorators": true,
{
"name": "create-folder-tree",
"version": "0.0.1",
"private": true,
"main": "lib/index.js",
"engines": {
"node": ">=0.10.0"
},
"scripts": {
"build": "gulp bundle",