Skip to content

Instantly share code, notes, and snippets.

View Shaddix's full-sized avatar

Artur Drobinskiy Shaddix

  • Ust-Kamenogorsk, Kazakhstan
View GitHub Profile
@Shaddix
Shaddix / openapi.json
Last active December 3, 2023 18:03
Atlas openapi
{
"openapi": "3.0.0",
"info": {
"description": "The App Services Admin API lets you programmatically perform\nadministrative tasks over HTTPS. This includes defining &\nconfiguring things like:\n\n- App Deployment & Security\n- APIs & Endpoints\n- Authentication & User Management\n- Data Sources\n- Device Sync\n- Environments\n- Functions\n- Logs\n- Rules\n- Schemas\n- Static Hosting\n- Triggers\n- Usage & Billing Metrics\n- Values & Secrets\n\nThe Admin API is for application development, configuration, and\ndeployment. To actually use the features you configure with the\nAdmin API, client applications connect with a [Realm\nSDK](https://mongodb.com/docs/realm/) or over an HTTPS API specific\nto your App.\n\n## Project & Application IDs\n\n**Note**: The terms _Project ID_ and _Group ID_ are interchangeable.\n\nAtlas App Services Admin API endpoints frequently require you to include two parameters in the URL:\n\n- Your Atlas _Project ID_ (also sometimes called a _Group ID_)\n- Your App Services _Appli
@Shaddix
Shaddix / date-stub.js
Created October 29, 2021 04:01
date modification for playwright
var _Date = null;
var _ticks;
function restoreDate() {
if (!_Date) {
return;
}
Date = _Date;
}
[HttpGet("/q1")]
public IActionResult Get()
{
return new FileCallbackResult(new MediaTypeHeaderValue("application/octet-stream"),
async (stream, context) =>
{
context.HttpContext.Response.Body.Flush();
await Task.Delay(4000);
using System;
using System.Collections.Generic;
using System.Threading;
namespace WebAppTests.DateTimeSpike
{
public class DateTimeProvider
{
private static readonly Lazy<DateTimeProvider> _lazyInstance = new Lazy<DateTimeProvider>(() => new DateTimeProvider());
public static DateTimeProvider Instance => _lazyInstance.Value;
import { Injectable } from '@angular/core';
import { HttpInterceptor, HttpHandler, HttpRequest, HttpEvent, HttpResponse, HttpHeaders }
from '@angular/common/http';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/operator/do';
declare var MiniProfiler: any;
@Injectable()
export class MiniProfilerInterceptor implements HttpInterceptor {