Skip to content

Instantly share code, notes, and snippets.

View Fyzu's full-sized avatar
👊
Let's Code!

Dmitry Petrov Fyzu

👊
Let's Code!
View GitHub Profile
@Fyzu
Fyzu / task.js
Last active July 7, 2017 21:32
Noladius FP
const R = require('ramda')
const { isPromise } = require('./utils/promise')
class Task {
constructor(computation, cleanup) {
this.fork = computation
this.cleanup = cleanup
}
@Fyzu
Fyzu / autoexec.cfg
Last active February 7, 2024 16:04
Apex Legends autoexec (outdated)
rspn_motd "Aimbot activated (joke)"
//=====================================================
//================== 4:3; 5:4 FIX =====================
//=====================================================
//mat_letterbox_aspect_goal 0.0 // Растягивает картинку на старых мониторах с соотношением сторон 4:3; 5:4 или нестандартных(кастомных) разрешениях, убирает черные полосы по бокам. (ВЫКЛ, для ВКЛ.убрать "//")
//mat_letterbox_aspect_threshold 0.0 // Растягивает картинку на старых мониторах с соотношением сторон 4:3; 5:4 или нестандартных(кастомных) разрешениях, убирает черные полосы по бокам. (ВЫКЛ, для ВКЛ.убрать "//")
//=====================================================
@Fyzu
Fyzu / migrate.ts
Created March 27, 2019 20:13
ts-mongodb-migrate - sketch
/* tslint:disable:no-console */
import 'dotenv-safe/config'
import { Db, MongoClient, ObjectId } from 'mongodb'
import * as path from 'path'
import * as fs from 'fs'
import { MONGODB_URI } from '@/configs/mongodb'
const MIGRATIONS_DIR = path.resolve(__dirname, '../migrations')
@Fyzu
Fyzu / obs-widget.html
Created April 14, 2019 12:42
Google Play Music Desktop Player OBS Widget
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Google Music Player</title>
<meta name="author" content="https://github.com/Fyzu" />
<link
href="https://fonts.googleapis.com/css?family=Open+Sans"
rel="stylesheet"
/>
@Fyzu
Fyzu / obsidian-indent.js
Created October 18, 2022 17:54
Obsidian indent logic
e.prototype.updateDom = function() {
var t = this.view
, n = this.indentCache
, i = t.contentDOM;
if (i.offsetParent) {
for (var r = this.tree, o = [], a = 0, s = Array.from(i.childNodes); a < s.length; a++) {
if ((f = s[a]).instanceOf(HTMLElement) && f.hasClass("cm-line")) {
var l = t.posAtDOM(f)
, c = t.state.doc.lineAt(l);
if (r.length < c.to)
@Fyzu
Fyzu / 1-CHANNEL_REQUEST.json
Last active April 21, 2025 15:10
dxLink Depth Of Market Service
{
"type": "CHANNEL_REQUEST",
"channel": 5,
"service": "DOM",
"parameters": {
"symbol": "AAPL",
"sources": ["NTV"]
}
}
@Fyzu
Fyzu / README-v2.md
Last active March 25, 2024 13:38
Candle Snapshot Reconstruction

Our system (QD) incorporates a mechanism designed for transferring indexed states for events such as: Candle, Order.

The fundamental operation of this mechanism involves transferring a snapshot initially and subsequently applying incremental updates to this snapshot.

Candle event is an indexed event in our system that contains specific fields such as:

  • flags - flags for processing updates
  • index - event index, which represents order of the event

Note: Events arrive in a special order in which order these events need to be handled so as not to break the sequence of state.

@Fyzu
Fyzu / some.ts
Last active September 3, 2024 14:50
interface CandleData {
subscribeData(
symbol: string,
aggregation: AggregationPeriod,
/**
* `fromTime` and `toTime` options are candles timestamps which should be used when requesting more candles data (lazy loading)
* `fromTime` is an oldest candle's timestamp which should be data get from, `toTime` is the newest (usually toTime candle equals the oldest visible candle)
*/
options?: ChartDataOptions,
@Fyzu
Fyzu / 0-api.ts
Last active November 20, 2024 15:55
dxLink CHART Service
interface DXLinkChartIndicator {
lang: string
content: string
}
interface IndicatorParameter {
type: 'number' | 'string' | 'boolean'
name: string
}
@Fyzu
Fyzu / example.ts
Created November 20, 2024 15:32
dxLink CHART JS API
const dxScriptCodeList = [
```in depth = 10
out sma = sma(close, depth)
```,
```in depth = 10
out sma = sma(open, depth)
```,
```in depth = 10
out sma = sma(high, depth)
```