Skip to content

Instantly share code, notes, and snippets.

View princeppy's full-sized avatar

👑 Prince Park 👑 princeppy

View GitHub Profile
var request = require('request');
var jwt = require('jsonwebtoken')
function getAccessToken(req) {
//https://gist.github.com/demelziraptor/9039435 Python
//http://www.getcodesamples.com/src/A39B1460/F692912D PHP
req.session.sp_info = req.query;
req.session.sp_oauth = req.body;
var client_ID = "{{clientID}}"

Add Attachments to Sharepoint Online List Item

CLS

#Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll"
#Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll"

Add-Type -Path "C:\Program Files\SharePoint Online Management Shell\Microsoft.Online.SharePoint.PowerShell\Microsoft.SharePoint.Client.dll"
Add-Type -Path "C:\Program Files\SharePoint Online Management Shell\Microsoft.Online.SharePoint.PowerShell\Microsoft.SharePoint.Client.Runtime.dll"

Migrate SharePoint List Item Attachments from SharePoint Online list to another Site

import React, { Component } from "react";
// import PropTypes from "prop-types";

import Axios from "axios";

const axiosG = Axios.create({
#
```js
import React, { Component } from "react";
// import PropTypes from "prop-types";
import jj from "../acknowledgements.json";
import Axios from "axios";
const axiosG = Axios.create({
baseURL: "http://localhost:8088",
headers: { Accept: "application/json;odata=nometadata" }
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title></title>
</head>
<body>
@princeppy
princeppy / redux-request-success-failure.js
Created February 24, 2019 17:27 — forked from gilankpam/redux-request-success-failure.js
redux-request-success-failure.js
function reduxHelper (actionName, fn) {
if (typeof actionName !== 'string') {
throw new Error('actionName must be a string')
}
if (typeof fn !== 'function') {
throw new Error('fn must be a function')
}
const actionNameUpper = actionName.toUpperCase()
const actionRequest = actionNameUpper + '_REQUEST'
const actionSuccess = actionNameUpper + '_SUCCESS'
@princeppy
princeppy / mapDispatchToProps.md
Created December 10, 2018 11:34 — forked from heygrady/mapDispatchToProps.md
Redux containers: mapDispatchToProps

Redux containers: mapDispatchToProps

This document details some tips and tricks for creating redux containers. Specifically, this document is looking at the mapDispatchToProps argument of the connect function from [react-redux][react-redux]. There are many ways to write the same thing in redux. This gist covers the various forms that mapDispatchToProps can take.

@princeppy
princeppy / Gulpfile.js
Created July 28, 2018 09:27 — forked from DESIGNfromWITHIN/Gulpfile.js
Gulpfile.js example Uses browser-sync, node-neat, gulp and gulp-sass
/*
Gulpfile.js file for the tutorial:
Using Gulp, SASS and Browser-Sync for your front end web development - DESIGNfromWITHIN
http://designfromwithin.com/blog/gulp-sass-browser-sync-front-end-dev
Steps:
1. Install gulp globally:
npm install --global gulp
@princeppy
princeppy / gulpfile.js
Created July 28, 2018 09:22 — forked from jbutko/gulpfile.js
BrowserSync + Gulp.js: Simple webServer + liveReload + watching CSS, HTML and SASS files
/**
* This example:
* Uses the built-in BrowserSync server for HTML files
* Watches & compiles SASS files
* Watches & injects CSS files
*
* More details: http://www.browsersync.io/docs/gulp/
*
* Install:
* npm install browser-sync gulp gulp-sass --save-dev
@princeppy
princeppy / gulpfile.js
Created July 28, 2018 09:21
gulpfile with browsersync and deploying
'use strict';
var gulp = require('gulp');
var ftp = require('vinyl-ftp');
var sass = require('gulp-sass');
var browserSync = require('browser-sync').create();
var insertLines = require('gulp-insert-lines');
var baseDir = './src/';
var rmteDir = '/public_html';