Skip to content

Instantly share code, notes, and snippets.

View rin4ik's full-sized avatar
🎯
Focusing

Mirakhmad rin4ik

🎯
Focusing
  • Warsaw, Poland
View GitHub Profile
<template>
<div>
<input placeholder="Search" type="text" v-model="search">
<select v-model="selectedColor">
<option :value="0">Choose a color</option>
<option :value="color" :key="color" v-for="color in colors">{{color}}</option>
</select>
<div style="margin-top: 20px; margin-bottom: 30px;">Search Results: <span style="font-weight: bold">{{filteredCards.length}}</span></div>
<div style="display: flex; flex-wrap: wrap; justify-content: center;">
<div style="flex-basis: 20%;" v-for="card in filteredCards" :key="card.id">
@rin4ik
rin4ik / OCP.js
Last active July 19, 2022 08:13
Open for extensions but closed for modifications
let Size = Object.freeze({
small: 'small',
medium: 'medium',
large: 'large'
})
let Color = Object.freeze({
green: 'green',
blue: 'blue',
})
class Product {
<?php
namespace App\Services;
class GeneratorService
{
public function newUsername() // : string
{
$randomAdjective = $this->getRandomAdjective();
$randomColor = $this->getRandomColor();
export const retryWithBackoff = (delayMs: number, maxRetry = DEFAULT_MAX_RETRIES, backoffMs = DEFAULT_BACKOFF) => {
let retries = maxRetry;
return (src: Observable<any>) =>
src.pipe(
retryWhen((errors: Observable<any>) => errors.pipe(
mergeMap(error => {
if (retries-- > 0) {
const backoffTime = delayMs + (maxRetry - retries) * backoffMs;
return of(error).pipe(delay(backoffTime));
import * as Playmex from '@/services/playmex'
export default {
data: () => ({
retries:3,
loading: false
}),
foreach ($this->symbols as $symbol) {
$roes = $this->getEntity('indicative_roe_tbl', $symbol);
if (is_array($roes)) {
$this->indicativeRoes[$symbol] = $roes;
} else {
$this->indicativeRoes[$symbol] = [];
}
}
$position = $this->stream['data'];
@rin4ik
rin4ik / dd
Created January 22, 2020 10:31
// Bracket Scalper Strategy Overview
Strategy Description:
- Go Long/Go Short Bracket strategies
- Enables multiple 1 -click Long/Short trades bracketed with SL and TP.
- 1-click position side switching
- built in advanced risk management features such trailing safeties and anti-liquidation insurances, and direct exchange order detection
Risk Management: