Martijn Laarman Mpdreamz

View gist:8579620
1 2 3 4 5 6 7 8 9 10
PUT http://localhost:9200/prefix_test
{
"settings": {
"blocks.read_only": false
},
"settings": {
"analysis": {
"analyzer": {
"customanalyzer": {
"type": "custom",
View gist:6807074
1 2 3 4 5 6 7 8 9
<system.net>
<defaultProxy>
<!-- Uncommment this line if you want to see web requests initiated by .NET (think WCF/REST calls)
REMEMBER TO UNDO THIS IF YOU CLOSE FIDDLER!
-->
<!--<proxy bypassonlocal="False" usesystemdefault="True" proxyaddress="http://127.0.0.1:8888" />-->
<proxy bypassonlocal="False" usesystemdefault="True" />
</defaultProxy>
</system.net>
View get-endpoints.sh
1 2 3 4 5 6 7 8 9 10
#!/bin/bash
 
# This scripts scans the elasticsearch source code for all the registered REST endpoints
# It will put the formatted output in $DEFINITIONOUTPUTFILE
# [MethodName] [HttpVerb] [Route]
 
ESFOLDER="../elasticsearch"
DEFINITIONOUTPUTFILE="src/Generated/rest-actions.txt"
 
# Find all the lines that registerHandlers
View Request.json
1 2 3 4 5 6 7 8 9 10
POST http://127.0.0.1:9200/nest_test_data-6612/elasticsearchprojects/_search?pretty=true HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: 127.0.0.1:9200
Content-Length: 429
Expect: 100-continue
 
{
"from": 0,
"size": 10,
View es 20.6
1 2 3 4 5 6 7 8 9 10
POST http://local.localghost.io:9200/nest_test_data-9232/elasticsearchprojects/_search?pretty=true HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: local.localghost.io:9200
Content-Length: 444
Expect: 100-continue
 
{
"from": 0,
"size": 20,
View gist:5330654
1 2 3 4 5 6 7 8 9 10
--- Request Put Template
 
PUT http://localhost:9200/_template/put-template-with-warmers?pretty=true HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:9200
Content-Length: 172
Expect: 100-continue
 
{
View max_memory.sql
1 2 3 4 5 6 7 8
EXEC sys.sp_configure N'show advanced options', N'1' RECONFIGURE WITH OVERRIDE
GO
EXEC sys.sp_configure N'max server memory (MB)', N'2000'
GO
RECONFIGURE WITH OVERRIDE
GO
EXEC sys.sp_configure N'show advanced options', N'0' RECONFIGURE WITH OVERRIDE
GO
View gist:4077718
1 2 3 4 5 6 7 8 9 10
SELECT
t1.resource_type,
t1.resource_database_id,
t1.resource_associated_entity_id,
t1.request_mode,
t1.request_session_id,
t2.blocking_session_id,
o1.name 'object name',
o1.type_desc 'object descr',
p1.partition_id 'partition id',
View dedup.sql
1 2 3 4 5 6 7 8 9 10
WITH CTE (Colum1, Colum2, DuplicateCount)
AS
(
SELECT Colum1, Colum2, ROW_NUMBER()
OVER(PARTITION BY Colum1, Colum2 ORDER BY Colum1) AS DuplicateCount
FROM MyTable
WHERE Colum1 = 1 AND Colum2 IS NOT NULL
)
SELECT * FROM CTE
WHERE DuplicateCount > 1
View restore.sql
1 2 3 4 5 6 7 8 9 10
----Force database into single user Mode
ALTER DATABASE db_name
SET SINGLE_USER WITH
ROLLBACK IMMEDIATE
 
----Restore Database
RESTORE DATABASE db_name
FROM DISK = 'D:\db_name.bak'
WITH REPLACE,
MOVE 'db_name' TO 'D:\SQLServer\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\db_name.mdf',
Something went wrong with that request. Please try again.