Skip to content

Instantly share code, notes, and snippets.

View dgusoff's full-sized avatar

Derek Gusoff dgusoff

View GitHub Profile
@dgusoff
dgusoff / CreateSiteCollection.cs
Created October 13, 2015 19:46
Create new Site Colleciton
public static void CreateSiteCollection(ClientContext adminContext, string url, string template, string title, string description, int storageLevel, string owner, bool wait)
{
var tenant = new Tenant(adminContext);
var properties = new SiteCreationProperties()
{
Url = url,
Owner = owner,
Title = title,
Template = template,
@dgusoff
dgusoff / postdata.json
Last active September 12, 2017 21:15
Azure Function get SharePoint groups
{
"groupName": "Flow Test Users",
"siteUrl": "https://devtenant.sharepoint.com/sites/contoso"
}
@dgusoff
dgusoff / Easter.cs
Created May 7, 2018 20:53
calculate the date of Easter
private static DateTime Easter(int year)
{
int a = year%19;
int b = year/100;
int c = (b - (b/4) - ((8*b + 13)/25) + (19*a) + 15)%30;
int d = c - (c/28)*(1 - (c/28)*(29/(c + 1))*((21 - a)/11));
int e = d - ((year + (year/4) + d + 2 - b + (b/4))%7);
int month = 3 + ((e + 40)/44);
int day = e + 28 - (31*(month/4));
return new DateTime(year, month , day);
@dgusoff
dgusoff / main.yml
Created January 28, 2022 14:13
deploy CRA to Azure
# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the action will run.
on:
push:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
import time
from datetime import date
greetings = []
greetings.append(dict(name = 'Derek', robot = 'wire01', stamp = time.time()))
greetings.append(dict(name = 'Kyle', robot = 'wire02', stamp = time.time()))
# looking to do something like...
# greetings.where(x => x.name == "Derek" && x.robot == "wire01")