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
function Export-SourceModulesToSession | |
{ | |
Param( | |
[Management.Automation.Runspaces.PSSession] | |
[ValidateNotNull()] | |
$Session, | |
[IO.FileInfo[]] | |
[ValidateNotNull()] | |
[ValidateScript( |
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
# Adding as an authorised user is much the same as getting. Just provide the template and name fields | |
Add-SitecoreItem sitecore.local -user apiuser -pass password -database master ` | |
-name "Awesome new item" -template "Sample/Sample Item" | |
<# | |
totalCount resultCount items StatusCode | |
---------- ----------- ----- ---------- | |
1 1 {@{Database=master; Displa... 200 | |
#> |
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
## This is a sample configuration file. See the nxlog reference manual about the | |
## configuration options. It should be installed locally and is also available | |
## online at http://nxlog.org/nxlog-docs/en/nxlog-reference-manual.html | |
## Please set the ROOT to the folder your nxlog was installed into, | |
## otherwise it will not start. | |
#define ROOT C:\Program Files\nxlog | |
define ROOT C:\Program Files (x86)\nxlog |
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
var result = elasticClient.Search<ErrorDocument>(s => s | |
.FacetDateHistogram(fd => fd | |
.OnField(p => p.Time) | |
.Interval(DateInterval.Day) | |
.Global() | |
.FacetFilter(ff => ff | |
.Range(rf => rf | |
.From(DateTime.UtcNow.AddDays(-14)) | |
.To(DateTime.UtcNow) | |
) |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration> | |
<system.webServer> | |
<rewrite> | |
<rules> | |
<remove name="ReverseProxyInboundRule1" /> | |
<rule name="ReverseProxyInboundRule1" stopProcessing="false"> | |
<match url="search/_search(.*)" /> | |
<conditions /> | |
<serverVariables /> |
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
# Example of running Invoke-FillDB.ps1 | |
# Additional files to download | |
$downloads= @( | |
"http://www.gutenberg.org/files/42698/42698-0.txt", | |
"http://www.gutenberg.org/cache/epub/42705/pg42705.txt", | |
"http://www.gutenberg.org/cache/epub/42710/pg42710.txt", | |
"http://www.gutenberg.org/files/42700/42700-0.txt", | |
"http://www.gutenberg.org/files/42706/42706-0.txt" | |
) |
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
Covers configuration for NXLog installed on Windows, transfering to NXLog installed on Linux to LogStash. | |
NXLog is used for IIS logs. (http://nxlog-ce.sourceforge.net/) | |
Snare is used for Windows Event Logs. (http://www.intersectalliance.com/projects/SnareWindows/index.html#Download) |
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
# Create your superuser | |
$ mongo | |
> use admin | |
> db.createUser({user:"someadmin",pwd:"secret", roles:[{role:"root",db:"admin"}]}) | |
> exit | |
# Alias for convenience (optional and at your own risk) | |
$ echo 'alias mongo="mongo --port 27017 -u someadmin -p secret --authenticationDatabase admin"' >> ~/.bash_profile | |
$ source ~/.bash_profile |
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
var page = new WebPage(), testindex = 0, loadInProgress = false; | |
var args = require('system').args; | |
var host = args[1]; | |
var username = args[2]; | |
var password = args[3]; | |
var pageEditorUrl = args[4]; | |
var token; | |
var system = require('system'); | |
phantom.cookiesEnabled = true; | |
phantom.javascriptEnabled = true; |
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
# | |
# Assumptions | |
# | |
# 1. If you have a Octopus release deployed, say 1.0.0.73, there is a git | |
# tag set for that commit in GitHub that is "v1.0.0.73". | |
# | |
# 2. You have TeamCity label each successful build in GitHub with the format | |
# "v{build number}. Sidenote: it appears that TeamCity only labels the | |
# default branch, but not feature branches. | |
# |
OlderNewer