This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#If run on Windows PowerShell must be add below code | |
#Add-PSSnapin Microsoft.SharePoint.PowerShell | |
$web = Get-SPWeb "http://siteaddress" | |
$spList = $web.Lists["List Title"] | |
$newItem = $spList.AddItem() | |
$newitem["Title"] = "Test" | |
$newitem["OtherColumn"] = "Test2" | |
$newitem.update() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#If run on Windows PowerShell must be add below code | |
#Add-PSSnapin Microsoft.SharePoint.PowerShell | |
Uninstall-SPSolution -Identity Solution.wsp -WebApplication http://siteaddress | |
Remove-SPSolution -Identity Solution.wsp | |
Add-SPSolution -Literal C:\Solution.wsp | |
Install-SPSolution -Identity Solution.wsp -WebApplication http://siteaddress |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Connect to your server via SSH | |
Switch to the root user | |
Run the following command: | |
nano /etc/ssh/sshd_config | |
Locate the following line: | |
# Port 22 | |
Remove # and change 22 to your desired port number. | |
Restart the sshd service by running the following command: | |
service sshd restart |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Import-Module BitsTransfer | |
$destPath = "C:\SP16PreReqFiles" | |
$destPath = $destPath.TrimEnd('\') | |
function validatePath($destFolder){ | |
## Check that the path entered is valid | |
If (!(Test-Path $destFolder -Verbose)) { | |
New-Item -Path $destFolder -ItemType Directory | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Net; | |
using System.Text.RegularExpressions; | |
using System.Threading.Tasks; | |
namespace CM.Youtube.Library | |
{ | |
public class YTDecrypt | |
{ | |
private static string GetPlayerJS(string videoUrl) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-SPSite -Limit All | Get-SPWeb -Limit All | Select-Object -Property Title, Url | Format-Table * | |
#Only Root Webs | |
Get-SPSite -Limit All | Get-SPWeb -Limit All | Where { $_.IsRootWeb } | Select-Object -Property Title, Url | Format-Table * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Download Artwork From Apple Music | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Download best resolution artwork from Apple Music! | |
// @author CM | |
// @match https://music.apple.com/* | |
// @require https://code.jquery.com/jquery-3.4.1.min.js | |
// @grant GM_download | |
// ==/UserScript== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") | |
$siteUrl = "<site collection URL>"; | |
$site = New-Object Microsoft.SharePoint.SPSite($siteurl); | |
$web = $site.OpenWeb(); | |
$enumPerms = [Microsoft.SharePoint.SPBasePermissions]; | |
Write-Host $web.AnonymousPermMask64; | |
$web.AnonymousPermMask64 = $enumPerms::ViewListItems -bor $enumPerms::ViewVersions -bor $enumPerms::ViewFormPages -bor $enumPerms::Open -bor $enumPerms::ViewPages -bor $enumPerms::UseClientIntegration -bor $enumPerms::OpenItems | |
$web.Update(); | |
Write-Host $web.AnonymousPermMask64; | |
$web.Dispose(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(this).mask("#.##0,00", { | |
byPassKeys: [188, 189, 109], | |
reverse: true, | |
placeholder: "0,00", | |
translation: { | |
'#': { | |
pattern: /-|\d/, | |
recursive: true | |
} | |
}, |
OlderNewer