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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
<%@ WebHandler Language="C#" Class="Handler" %> | |
using System; | |
using System.Web; | |
public class Handler : IHttpHandler { | |
public void ProcessRequest (HttpContext context) { | |
context.Response.ContentType = "html"; | |
context.Response.Write("Hello World"); | |
manaeform(context); | |
} | |
public void manaeform(HttpContext context) |
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
Open a command prompt as an Administrator. | |
Enter slmgr /upk and wait for this to complete. This will uninstall the current product key from Windows and put it into an unlicensed state. | |
Enter slmgr /cpky and wait for this to complete. This will remove the product key from the registry if it's still there. | |
Enter slmgr /rearm and wait for this to complete. This is to reset the Windows activation timers so the new users will be prompted to activate Windows when they put in the key | |
slmgr /ipk 7BNJT-PXJR8-J9G6D-DHJVQ-DV3KQ | |
slmgr /ato |
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
DISM /online /Get-TargetEditions | |
DISM /online /Set-Edition:ServerStandard /ProductKey:XC9B7-NBPP2-83J2H-RHMBY-92BT4 /AcceptEula |
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
-- Username1 | Group1, Group 2, Group 3, Group 4, Group 5 etc. | |
$memberOf = @{n='MemberOf';e={ ($_.MemberOf -replace '^CN=([^,]+).+$','$1') -join ';' }} | |
Get-QADUser -SizeLimit 0 | ` | |
Select-Object Name,DN,SamAccountName,$memberOf | ` | |
Export-Csv report.csv |
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
$ID = read-host "Enter the user's ID you wish to scan" | |
$FQDN = "cn=block_cloning,dc=yourdomain,dc=com" #full FQDN of the block_cloning group | |
Get-ADUser -Identity $ID -Properties memberOf | % {$_.memberOf} | % {Get-ADGroup $_ -Properties *} ` | |
| select name, mail, GroupCategory, GroupScope,@{Label="Block_Cloning";Expression={ | |
If ($_.MemberOf -contains $FQDN) | |
{ "Yes" | |
} | |
Else | |
{ "No" | |
}}} | Sort mail, name | Export-CSV c:\pathofexport.csv |
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.Activities; | |
using System.ComponentModel; | |
namespace MyActivityLibrary { | |
public sealed class SendEmailActivity : CodeActivity { | |
public InArgument<string> to { get; set; } | |
public InArgument<string> subject { get; set; } | |
public InArgument<string> body { get; set; } | |
private string from = "*****@****.com"; |
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
<script src="https://togetherjs.com/togetherjs-min.js"></script> | |
<button onclick="TogetherJS(this); return false;">Collaborate!</button> |
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
<Target Name="WSPCopySatelliteAssemblies" AfterTargets="AfterBuild"> | |
<ItemGroup> | |
<ResourceFiles Include="$(MSBuildProjectDirectory)\..\Nintex.Workflow.Globalisation\$(OutDir)*\*.dll"/> | |
</ItemGroup> | |
<Message Condition="'@(IntermediateSatelliteAssembliesWithTargetPath)' != ''" Text="Server: Copying Satellite Assemblies to known location from project: Nintex.Workflow.Resources" /> | |
<!-- Copy all satellite assemblies in each project built to a known folder for isolation --> | |
<RemoveDir Condition="'@(IntermediateSatelliteAssembliesWithTargetPath)' != ''" Directories="$(MSBuildProjectDirectory)\SatelliteAssemblies" /> | |
<Copy Condition="'@(IntermediateSatelliteAssembliesWithTargetPath)' != ''" SourceFiles="@(IntermediateSatelliteAssembliesWithTargetPath)" DestinationFiles="@(IntermediateSatelliteAssembliesWithTargetPath->'$(MSBuildProjectDirectory)\SatelliteAssemblies\%(Culture)\$(TargetName).resources.dll')" SkipUnchangedFiles="false" /> | |
<Message Condition="'@(IntermediateSatelliteAs |
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
<!--http://mattperdeck.com/post/Copying-linked-content-files-at-each-build-using-MSBuild.aspx--> | |
<Target Name="CopyLinkedContentFiles" BeforeTargets="Build"> | |
<Copy SourceFiles="%(Content.Identity)" | |
DestinationFiles="%(Content.Link)" | |
SkipUnchangedFiles='true' | |
OverwriteReadOnlyFiles='true' | |
Condition="'%(Content.Link)' != ''" /> | |
</Target> | |
OlderNewer