Skip to content

Instantly share code, notes, and snippets.

Andrew Connell andrewconnell

Block or report user

Report or block andrewconnell

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View TaskLoggerJob.cs
namespace AndrewConnell.TaskLogger {
public class TaskLoggerJob : SPJobDefinition{
public TaskLoggerJob (): base(){
}
public TaskLoggerJob (string jobName, SPService service, SPServer server, SPJobLockType targetType)
: base (jobName, service, server, targetType) {
}
View DeleteSvn.reg
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\DeleteSVN]
@="Delete SVN Folders"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\DeleteSVN\command]
@="cmd.exe /c \"TITLE Removing SVN Folders in %1 && COLOR 9A && FOR /r \"%1\" %%f IN (.svn) DO RD /s /q \"%%f\" \""
View setschedule.cs
// get a reference to our job in the GAC
TaskLoggerJob taskLoggerJob = new TaskLoggerJob("Task Logger", site.WebApplication);
// set the execution schedule
SPMinuteSchedule schedule = new SPMinuteSchedule();
schedule.BeginSecond = 0;
schedule.EndSecond = 59;
schedule.Interval = 5;
taskLoggerJob.Schedule = schedule;
View TaskLoggerJob.cs
public TaskLoggerJob () : base(){ }
public TaskLoggerJob (string jobName, SPService service, SPServer server, SPJobLockType targetType)
: base(jobName, service, server, targetType) {}
public TaskLoggerJob (string jobName, SPWebApplication webApplication)
: base(jobName, webApplication, null, SPJobLockType.ContentDatabase) {
this.Title = "Task Logger";
}
View Meter.proto
package ratekeeper;
message Meter {
string meterId = 1;
string publicCloud = 2
string displayName = 3;
string category = 4;
string subcategory = 5;
}
View RateKeeperService.proto
service RateKeeperService {
rpc GetMeter(GetMeterRequest) returns (GetMeterResponse) {}
}
message GetMeterRequest {
string meterId = 1;
}
message GetMeterResponse {
Meter meter = 1;
View RateKeeperServer.ts
import { RateKeeperServer } from './RateKeeperServer';
let grpcServer: RateKeeperServer = new RateKeeperServer();
grpcServer.start();
View AttachTo_ASPNETWP.vb
' This routine attaches to the ASP.NET worker process:
Sub AttachTo_ASPNETWP()
Dim attached AsBoolean = False
Dim proc As EnvDTE.Process
Dim processToAttachTo AsString
' name of the process to attach to
processToAttachTo = "aspnet_wp.exe"
' iterate through all processes running on the local machine
ForEach proc In DTE.Debugger.LocalProcesses
View SearchTermRollupWebPart.cs
using System;
using System.ComponentModel;
using System.Data;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using Microsoft.Office.Server.Search.Query;
using Microsoft.Office.Server.Search.Administration;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Taxonomy;
View web.config
<add name="MetadataNavProvider"
type="CriticalPathTraining.SharePoint.Samples.MetadataBasedNavProvider,
CriticalPathTraining.SharePoint.Samples.MetadataBasedNavProvider,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=31ad9365ecb382fd"
NavigationType="Global"
EncodeOutput="true" />
You can’t perform that action at this time.