Skip to content

Instantly share code, notes, and snippets.

View rjesh-git's full-sized avatar
🚀

Rajesh Sitaraman rjesh-git

🚀
View GitHub Profile
@rjesh-git
rjesh-git / GetAllGroups.ps1
Last active November 8, 2017 20:59
Get all Office 365 groups in tenant
$scopes = @("Group.Read.All")
Connect-PnPMicrosoftGraph -Scopes $scopes
Get-PnPUnifiedGroup
export default class Quotes extends React.Component<IQuoteProps, IQuoteState> {
constructor(props) {
super(props);
this.state = {
error: null,
censusItems: []
};
}
}
export interface IQuoteState {
error?: string;
quoteItems?: IQuoteItem[];
}
=LEFT(RIGHT([URLCOLUMN],LEN([URLCOLUMN])-INT(FIND("DefaultView=",[URLCOLUMN])+11)),INT(FIND("&",RIGHT([URLCOLUMN],LEN([URLCOLUMN])-INT(FIND("DefaultView=",[URLCOLUMN])+11))))-1)
@rjesh-git
rjesh-git / git.migrate
Created September 13, 2016 17:14 — forked from niksumeiko/git.migrate
Moving git repository and all its branches, tags to a new remote repository keeping commits history
#!/bin/bash
# Sometimes you need to move your existing git repository
# to a new remote repository (/new remote origin).
# Here are a simple and quick steps that does exactly this.
#
# Let's assume we call "old repo" the repository you wish
# to move, and "new repo" the one you wish to move to.
#
### Step 1. Make sure you have a local copy of all "old repo"
### branches and tags.
var showDocs = function() {
var qGroups = Srch.ScriptApplicationManager.get_current().queryGroups;
$.each(qGroups, function() {
if (this.displays != null && this.displays.length > 0) {
// Result source GUID
this.dataProvider.set_sourceID('70949b02-0f2c-4026-9c4f-c9d6e0023aa4');
this.dataProvider.issueQuery();
}
});
};
try {
$rendition = New-Object Microsoft.SharePoint.Client.Publishing.ImageRendition
$rendition.Name = $Title
$rendition.Width = $Width
$rendition.Height = $Height
$renditionCol.Add($rendition)
[Microsoft.SharePoint.Client.Publishing.SiteImageRenditions]::SetRenditions($ctx,$renditionCol)
$ctx.ExecuteQuery()
}
Add-Type -Path "Microsoft.SharePoint.Client.dll"
Add-Type -Path "Microsoft.SharePoint.Client.Runtime.dll"
try{
$itemCreateInfo = New-Object Microsoft.SharePoint.Client.ListItemCreationInformation
$listItem = $list.addItem($itemCreateInfo)
$daten = Get-Date
$listItem.set_item('Title',$daten)
$listItem.update()
$ctx.Load($listItem)
$ctx.ExecuteQuery()
Write-Output "Item successfully created."
}
$pubPageInfo = New-Object Microsoft.SharePoint.Client.Publishing.PublishingPageInformation
$pubPageInfo.Name = $CSVitem.Name.Replace(" ", "-") + ".aspx"
$pubPageInfo.PageLayoutListItem = $tpLayoutItem
$pubPage = $pubWeb.AddPublishingpage($pubPageInfo)
$ctx.Load($pubPage)
$ctx.ExecuteQuery()
$listItem = $pubPage.get_listItem()
$ctx.Load($listItem)