This file contains hidden or 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 [name-of-db] | |
| go | |
| declare @cols AS NVARCHAR(MAX) | |
| , @query AS NVARCHAR(MAX) | |
| , @dechunkedRecords AS NVARCHAR(MAX) | |
| , @where AS NVARCHAR(MAX); | |
| set @where = '' | |
| /*set @where = 'where _RecordID in ( |
This file contains hidden or 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
| <?xml version="1.0" encoding="UTF-16"?> | |
| <Task version="1.4" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task"> | |
| <RegistrationInfo> | |
| <Date>2015-08-05T09:01:28.0362962</Date> | |
| <Author>ANDORNOT\peter-admin</Author> | |
| <Description>Run if Application Event Id 1000, or Event Id 1309 (Unhandled exception). Wait 30-60s. Do not run if task already running.</Description> | |
| </RegistrationInfo> | |
| <Triggers> | |
| <EventTrigger> | |
| <Enabled>true</Enabled> |
This file contains hidden or 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
| andi.highlightTerms = []; | |
| andi.highlight = function (el, terms) { | |
| if (terms === null || terms.length === 0) return; | |
| var term = terms.join('|'); | |
| var regex = new RegExp('\\b('+term+')\\b', 'gi'); | |
| if (el.innerHTML.match(regex) !== null) { | |
| el.innerHTML = el.innerHTML.replace(regex, '<b>$1</b>'); | |
| el.classList === true ? el.classList.add('highlighted') : el.className += ' ' + 'highlighted'; | |
| } |
This file contains hidden or 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
| <# | |
| create-jetty-service.ps1 | |
| This script needs to be run once, to create the service. | |
| Service name is mandatory. | |
| Requires nssm.exe (Non-Sucking Service Manager https://nssm.cc). | |
| The script assumes it is located in the Solr 5.x \bin folder with solr.cmd. | |
| N.B. This operation requires elevated permissions. Either run script from Admin version of PS console, or allow to run when it asks. | |
| -- Peter Tyrrell |
This file contains hidden or 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
| <# | |
| parse tsv | |
| Categories: person, location, organization, misc, money, percent, date, time (depending on classifier used to produce the tsv) | |
| Outfile: Results written to console if outfile not provided. If all categories, outfile is used as a filename template. | |
| #> | |
| param( | |
| [Parameter(Mandatory=$true,Position=0)] |
This file contains hidden or 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
| <# | |
| Requires Stanford NER, Java 1.8+ | |
| formats = slashTags, inlineXML, xml, tsv, tabbedEntities | |
| #> | |
| param( | |
| [Parameter(Mandatory=$true,Position=0)] | |
| [string]$file, | |
| [Parameter(Mandatory=$true,Position=1)] |
This file contains hidden or 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
| # restarts named app pool if stopped, writes restart event to the Application Event Log | |
| # Peter Tyrrell, May 13 2013 | |
| param( | |
| [string[]]$names = (,"ISAPI Webpublisher") | |
| ) | |
| # If OS < Server 2008 R2, install Powershell snap-in for IIS and uncomment: | |
| #Add-PSSnapin WebAdministration |
This file contains hidden or 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
| <# | |
| Peter Tyrrell, 2015 | |
| Convert Harvest time report to Quickbooks import format in Windows-1252. | |
| #> | |
| param ( | |
| [string]$indir = ".", | |
| [string]$outdir = $indir | |
| ) |
This file contains hidden or 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
| <entity | |
| name="sample" | |
| transformer="RegexTransformer,TemplateTransformer"> | |
| <field column="test_ignored" template="BLAH" /> | |
| <field column="test_ignored" sourceColName="id" regex="(.+)" /> | |
| <!-- | |
| test_ignored will equal 'BLAH' because TemplateTransformer acts last, | |
| even though it is written first. |
This file contains hidden or 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
| <# | |
| Processes raw source pdfs, producing per page: 1 txt, 1 hocr, 1 jpg. | |
| Requires imagemagick w/ ghostscript, tesseract. | |
| Subscripts: pdf2png.ps1, ocr.ps1, hocr.ps1, png2jpg.ps1 | |
| #> | |
| param( | |
| [string]$indir = ".", | |
| [string]$outbase = $indir |