Skip to content

Instantly share code, notes, and snippets.

View undrcrxwn's full-sized avatar
❤️

Степной ишак undrcrxwn

❤️
View GitHub Profile
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
public class HashGenerator
{
public static string GenerateHash(Dictionary<string, object> data, string botToken)
{
@undrcrxwn
undrcrxwn / .cs
Last active February 17, 2024 11:00
var query = _graphClient.Cypher.WithParams(new { discussionId, authorId });
var matchSelector = authorId is not null
? "(author:Author { Id: $authorId })<-[:AUTHORED_BY]-(comment:Comment)"
: "(author:Author)<-[:AUTHORED_BY]-(comment:Comment)";
if (discussionId is not null)
matchSelector += "-[:REPLIES_TO]->(discussion:Discussion { Id: $discussionId })";
var pages = await query
@undrcrxwn
undrcrxwn / .cs
Last active February 17, 2024 10:57
var result = await query
.Match(matchSelector)
.With("COLLECT(author) AS authors, COLLECT(comment) AS comments, COUNT(comment) AS totalCount")
.Unwind("authors", "author")
.Unwind("comments", "comment")
.With("author, comment, totalCount")
.OrderBy("comment.CreatedAt")
.Skip(offset)
.Limit(count)
.OptionalMatch("(replyAuthor:Author)<-[:AUTHORED_BY]-(reply:Comment)-[:REPLIES_TO]->(comment)")
openapi: 3.0.1
info:
title: Crowd Parlay API
description: Crowd Parlay's RESTful API.
version: '1.0'
servers:
- url: https://crowdparlay.com
tags:
- name: Users
x-displayName: Users
import * as typed from 'typed-contracts';
import {chainRoute} from 'atomic-router';
import {attach, createStore, sample} from 'effector';
import {
apiV1DiscussionsGet,
apiV1DiscussionsGetOk,
apiV1UsersResolveGet,
apiV1UsersResolveGetOk,
} from '~/shared/api';
openapi: 3.0.1
info:
title: Crowd Parlay API
description: Crowd Parlay's RESTful API.
version: '1.0'
servers:
- url: https://crowdparlay
tags:
- name: Users
x-displayName: Users
openapi: 3.0.1
info:
title: Crowd Parlay API
description: Crowd Parlay's RESTful API.
version: '1.0'
servers:
- url: https://crowdparlay
tags:
- name: Users
x-displayName: Users
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.