Skip to content

Instantly share code, notes, and snippets.

View sjkp's full-sized avatar

Simon J.K. Pedersen sjkp

View GitHub Profile
namespace SInnovations.VSTeamServices.TasksBuilder.KeyVault.ResourceTypes
{
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using CommandLine;
using SInnovations.VSTeamServices.TasksBuilder.Attributes;
using SInnovations.VSTeamServices.TasksBuilder.ResourceTypes;
@mtmk
mtmk / LuceneNetExample.cs
Last active April 3, 2024 12:47
Quick and complete Lucene.Net example
using System;
using System.Globalization;
using Lucene.Net.Analysis.Standard;
using Lucene.Net.Documents;
using Lucene.Net.Index;
using Lucene.Net.QueryParsers;
using Lucene.Net.Search;
using Lucene.Net.Store;
using Version = Lucene.Net.Util.Version;
@premchandpl
premchandpl / CompleteFunction.js
Last active August 29, 2015 14:02
Complete Code Snippet
that.getData = function (listName, xmlQuery, contentType, onGetSuccess) {
var objClientCtx = new SP.ClientContext.get_current();
if (objClientCtx) {
var oWeb = objClientCtx.get_web();
var oList = oWeb.get_lists().getByTitle(listName);
var query = new SP.CamlQuery();
query.set_viewXml(xmlQuery);
var objlistItems = oList.getItems(query);
objClientCtx.load(objlistItems);
objClientCtx.executeQueryAsync(function (sender, args) {
@lelandrichardson
lelandrichardson / ko-convenience.js
Created March 5, 2014 01:11
Knockout.js Custom Utility Bindings
(function (ko, handlers, unwrap, extend) {
"use strict";
extend(handlers, {
href: {
update: function (element, valueAccessor) {
handlers.attr.update(element, function () {
return { href: valueAccessor() };
});
}
},