Skip to content

Instantly share code, notes, and snippets.

View adoprog's full-sized avatar

Alexander Doroshenko adoprog

View GitHub Profile
@vince-geekcore
vince-geekcore / ee-warmup.js
Last active January 29, 2023 12:21
Sitecore Experience Editor 8.2-2 compatible warmup PhantomJS script to be triggered using Powershell (for example as Azure WebJob). Based on PhantomJS because it's already available on Sitecore 8 environments. Some paths are currently still hardcoded for webapps
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;
@kamsar
kamsar / anexample.ps1
Last active October 18, 2023 14:27
Generate trusted local SSL cert for Solr
# Usage:
# This script is designed to be run after you have Solr running locally without SSL
# It will generate a trusted, self-signed certificate for LOCAL DEV (this must be modified for production)
# Notes: The keystore must be under server/etc on Solr root, and MUST be named solr-ssl.keystore.jks
# The cert will be added to locally trusted certs, so no security warnings in browsers
# You must still reconfigure Solr to use the keystore and restart it after running this script
#
# THIS SCRIPT REQUIRES WINDOWS 10 (for the SSL trust); without 10 remove the lines around trusting the cert.
@michaellwest
michaellwest / Config_Enable-Disable_Sitecore_8.1_upd3.csv
Last active June 20, 2024 12:45
The following script imports the specified Sitecore Role configuration csv and automatically enables or disables the configs.
Product Filepath Filename DefaultExtension Provider CD CM PRC CMP RPT
Platform \website\ Web.config config Enable Enable Enable Enable Enable
Platform \website\App_Config\ Commands.config config Enable Enable Enable Enable Enable
Platform \website\App_Config\ ConnectionStrings.config config Enable Enable Enable Enable Enable
Platform \website\App_Config\ ConnectionStringsOracle.config config Enable Enable Enable Enable Enable
Platform \website\App_Config\ FieldTypes.config config Enable Enable Enable Enable Enable
Platform \website\App_Config\ Icons.config config Enable Enable Enable Enable Enable
Platform \website\App_Config\ LanguageDefinitions.config config Enable Enable Enable Enable Enable
Platform \website\App_Config\ MimeTypes.config config Enable Enable Enable Enable Enable
Platform \website\App_Config\ Portraits.config config Enable Enable Enable Enable Enable
@aih
aih / IIS Reverse Proxy for Elasticsearch
Created September 15, 2015 21:04
A sample web.config file with URL rewrite rules for Elasticsearch on IIS (Windows)
<?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 />
@ivanignatiev
ivanignatiev / gist:d8fca4ff8b3f729f7337
Created February 17, 2015 18:10
HTTP request to Azure Event Hub with Curl
# REST API documentation https://msdn.microsoft.com/en-us/library/azure/dn790664.aspx
curl -H 'Authorization: SharedAccessSignature sr={Service Bus Namespace}.servicebus.windows.net&sig={Url Encoded Shared Access Key}&se={Time Stamp with Shared Access Key expration}&skn={Shared Access Policy name}' -H 'Content-Type:application/atom+xml;type=entry;charset=utf-8' --data '{Event Data}' https://{Service Bus Namespace}.servicebus.windows.net/{Event Hub Name}/messages
@tamoyal
tamoyal / gist:10441108
Created April 11, 2014 04:39
Create super user and database user in Mongo 2.6
# 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
@Kieranties
Kieranties / Invoke-FillDB-Examples.ps1
Last active December 22, 2016 14:26
Simple script to execute commands against the FillDB page in Sitecore 7.2
# 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"
)
@MattHodge
MattHodge / ! Windows NXLog | Linux NXLog | LogStash
Last active January 14, 2020 20:30
Configuration files for NXLog on Windows ---> NXLog on Ubuntu --> LogStash
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)
@ThomasArdal
ThomasArdal / gist:6791576
Created October 2, 2013 10:11
Example of doing faceted search using ElasticSearch and NEST
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)
)
@stonith
stonith / nxlog.conf
Last active December 15, 2015 23:39
nxlog.conf to ship from W2K8R2
## 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