Skip to content

Instantly share code, notes, and snippets.

View adoprog's full-sized avatar

Alexander Doroshenko adoprog

View GitHub Profile
@michaellwest
michaellwest / Config_Enable-Disable_Sitecore_8.1_upd3.csv
Last active May 9, 2023 15:29
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
@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
@serdarb
serdarb / Download and Install MongoDB as Windows Service PowerShell Script
Last active July 26, 2023 12:22
A nice powershell that dowloads mongodb and installs it as windows service... this script is good for development machines.
Set-ExecutionPolicy RemoteSigned
$mongoDbPath = "C:\MongoDB"
$mongoDbConfigPath = "$mongoDbPath\mongod.cfg"
$url = "http://downloads.mongodb.org/win32/mongodb-win32-x86_64-2008plus-2.4.9.zip"
$zipFile = "$mongoDbPath\mongo.zip"
$unzippedFolderContent ="$mongoDbPath\mongodb-win32-x86_64-2008plus-2.4.9"
if ((Test-Path -path $mongoDbPath) -eq $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.
@markembling
markembling / hosts.ps1
Created August 24, 2009 13:38
Powershell script for adding/removing/viewing entries to the hosts file.
#
# Powershell script for adding/removing/showing entries to the hosts file.
#
# Known limitations:
# - does not handle entries with comments afterwards ("<ip> <host> # comment")
#
$file = "C:\Windows\System32\drivers\etc\hosts"
function add-host([string]$filename, [string]$ip, [string]$hostname) {