Skip to content

Instantly share code, notes, and snippets.

Alexandre Rafalovitch arafalov

Block or report user

Report or block arafalov

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 AttoparserTest.java
package com.solrstart;
import org.attoparser.IMarkupHandler;
import org.attoparser.IMarkupParser;
import org.attoparser.MarkupParser;
import org.attoparser.ParseException;
import org.attoparser.config.ParseConfiguration;
import org.attoparser.discard.DiscardMarkupHandler;
import org.attoparser.select.NodeSelectorMarkupHandler;
import org.attoparser.simple.AbstractSimpleMarkupHandler;
View extract-solrconfig.xml
<!--
From switch documentation: 'default' and 'case' are different things and cover different situations.
'default' covers any value being present and
'case' covers missing/empty value.
-->
<requestHandler name="/advanced" class="solr.SearchHandler">
<lst name="defaults">
<str name="rows">100</str>
</lst>
<lst name="invariants">
@arafalov
arafalov / test.rb
Created Jun 18, 2014
rsolr basic example
View test.rb
require 'rubygems'
require 'rsolr'
# 1. Connect to an empty example collection
solr = RSolr.connect :url => 'http://localhost:8983/solr'
puts('Before anything')
puts(solr.get 'select', :params => {:q => '*:*'})
@arafalov
arafalov / gist:2938303
Created Jun 15, 2012
Using Kentico site export, find all Document Aliases that have culture assigned and may not survive culture change
View gist:2938303
// Using Kentico site export, find all Document Aliases that have culture assigned and may not survive culture change
// Uses LINQPad's C# Statements format
//Root directory where the unzipped Kentico export file sit (with Data subdirectory)
string exportDirPath = @"<UNZIPPED_FULL_SITE_EXPORT>\Data";
//XML files for documents and templates definitions
XDocument docSource = XDocument.Load(exportDirPath + @"\Documents\cms_document.xml.export");
@arafalov
arafalov / gist:2930773
Created Jun 14, 2012
Using Kentico site export, find all templates that include DocumentDataSource with path expressions pointing to other documents (which will break when document tree moves)
View gist:2930773
// Using Kentico site export, find all templates that include DocumentDataSource with path expressions pointing to other documents (which will break when document tree moves)
// Uses LINQPad's C# Statements format
//Root directory where the unzipped Kentico export file sit (with Data subdirectory)
string exportDirPath = @"<UNZIPPED_FULL_SITE_EXPORT>\Data";
//XML files for documents and templates definitions
XDocument templateSource = XDocument.Load(exportDirPath + @"\Objects\cms_pagetemplate.xml.export");
XDocument siteTemplateSource = XDocument.Load(exportDirPath + @"\Site\cms_pagetemplate.xml.export");
@arafalov
arafalov / gist:2889393
Created Jun 7, 2012
Using LINQ to bulk extract Kentico's templates and documents/pages that use them
View gist:2889393
// Using Kentico site export, find all templates and associated Documents/pages, skip templates that are not used
// Uses LINQPad's C# Statements format
//Root directory where the unzipped Kentico export file sit (with Data subdirectory)
string exportDirPath = @"<UNZIPPED_FULL_SITE_EXPORT>\Data";
//XML files for documents and templates definitions
XDocument docSource = XDocument.Load(exportDirPath + @"\Documents\cms_document.xml.export");
XDocument templateSource = XDocument.Load(exportDirPath + @"\Objects\cms_pagetemplate.xml.export");
You can’t perform that action at this time.