Skip to content

Instantly share code, notes, and snippets.

View robertlyson's full-sized avatar

Robert robertlyson

  • Ministry of Ideas
  • Kraków
View GitHub Profile
@robertlyson
robertlyson / base-v1.json.xml
Created August 23, 2021 14:47
azure ad b2c sign in with base policy
This file has been truncated, but you can view the full file.
<TrustFrameworkPolicies>
<TrustFrameworkPolicy xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.microsoft.com/online/cpim/schemas/2013/06" PolicySchemaVersion="0.3.0.0" TenantId="portertracdev.onmicrosoft.com" TenantObjectId="b9727324-a384-4afe-8d49-6ce88b8c05fd" PolicyId="B2C_1_SignIn" PublicPolicyUri="http://portertracdev.onmicrosoft.com/">
<BasePolicy>
<TenantId>portertracdev.onmicrosoft.com</TenantId>
<PolicyId>base-v1</PolicyId>
</BasePolicy>
<BuildingBlocks>
<ClaimsSchema>
<ClaimType Id="newPassword">
<DataType>string</DataType>
@robertlyson
robertlyson / tmp.md
Created July 17, 2019 09:29
meetup comment
---
# Remember, leave a key empty if there is no value. None will be a string,
# not a Python "NoneType"
#
# Also remember that all examples have 'disable_action' set to True. If you
# want to use this action as a template, be sure to set this to False after
# copying it.
actions:
1:
action: delete_indices
@robertlyson
robertlyson / docker-compose.yml
Last active November 14, 2018 19:02
Docker compose file to run elasticsearch and kibana. Please put all of these files in one directory. After docker-compose up command you should be able to access http://localhost:9200 and http://localhost:5601 in your browser.
version: '3'
services:
elasticsearch:
build:
context: .
dockerfile: elasticsearch
args:
ELK_VERSION: 6.2.4
@robertlyson
robertlyson / readme.md
Last active November 13, 2018 19:20
elasticsearch and NEST requirements
@robertlyson
robertlyson / script.ps1
Last active June 26, 2017 09:05
Elasticsearch failed shard recovery - powershellscript
# Based on http://www.jillesvangurp.com/2015/02/18/elasticsearch-failed-shard-recovery/
# Be carefull, you can lost your data during this process
$array = Get-ChildItem "ES_PATH\data\nodes\0" -recurse | Where-Object {$_.PSIsContainer -eq $true -and $_.Name -match "index"} | ForEach-Object -Process {$_.FullName}
foreach($element in $array)
{
Write-Output $element
$command = [string]::Format("java -cp ES_PATH\lib\lucene-core-6.3.0.jar -ea:org.apache.lucene... org.apache.lucene.index.CheckIndex {0} -exorcise",$element)
iex $command
}
using System;
using Elasticsearch.Net;
using Nest;
namespace PercolateQuery
{
public static class Program
{
static string dateFormat = "dd/MM/yyyy";