Skip to content

Instantly share code, notes, and snippets.

View maslovsa's full-sized avatar
🎯
Focusing

Sergey Maslov maslovsa

🎯
Focusing
View GitHub Profile
@maslovsa
maslovsa / debank_mass_follower.js
Last active December 21, 2023 07:57
Debank mass following/unfollowing
function nextPage() {
const queryString = window.location.search;
const urlParams = new URLSearchParams(queryString);
const start = urlParams.get('start') ? urlParams.get('start') : 0
let newPage = document.querySelector('.db-talbe-pagination').querySelectorAll('li')[start / 100 + 2]
if (newPage) newPage.click();
}
function action() {
let goods = 0
mindmap
root)CEX(
Match Engine
::icon(fa fa-car)
Order Book
::icon(fa fa-book)
Spot trading
Futures trading
Open API
::icon(fa fa-sitemap)
extension Collection where Indices.Iterator.Element == Index {
/// Returns the element at the specified index if it is within bounds, otherwise nil.
subscript(safe index: Index) -> Iterator.Element? {
return indices.contains(index) ? self[index] : nil
}
}
Using:
array[safe: index]
//
// LoggingConfiguration.swift
// MyCoolProject
//
// Created by Sergey Maslov on 30/01/2020.
// Copyright © 2020 Scal.io. All rights reserved.
//
//
import Foundation
import os

Keybase proof

I hereby claim:

  • I am maslovsa on github.
  • I am maslovsa (https://keybase.io/maslovsa) on keybase.
  • I have a public key ASDfSGSGZQgzEn3CUr9Xj8A0yMykCGAOjw37Av4nmiFRIAo

To claim this, I am signing this object:

import Foundation
let buzzWords = [
"Model", "View", "Controller", "Entity", "Router", "Clean", "Reactive",
"Presenter", "Interactor", "Megatron", "Coordinator", "Flow", "Manager", "Instance"
]
let count = Int.random(in: 3 ... 5)
let architecture = buzzWords.shuffled().prefix(count)
let acronym = architecture.map { String($0.first ?? "*") }.reduce("", +)
print(acronym)
@maslovsa
maslovsa / Swift Vibration
Created January 23, 2019 06:44
Usage `Vibration.selection.vibrate()`
import AVFoundation
import Foundation
import UIKit
enum Vibration {
case error
case success
case warning
case light
case medium
@maslovsa
maslovsa / sketch.sh
Created September 6, 2018 07:17
Sketch runner
#!/bin/bash
date 0102030405
open /Applications/Sketch.app
ntpdate -u time.apple.com