Skip to content

Instantly share code, notes, and snippets.

View chuwy's full-sized avatar

Anton Parkhomenko chuwy

View GitHub Profile
@chuwy
chuwy / README.md
Created August 12, 2023 11:36 — forked from runiq/README.md
Neovim throttle & debounce

What are these?

Functions that allow you to call a function not more than once in a given timeframe.

Throttling on the leading edge

This can be illustrated with timing diagrams. In the following diagrams, f designates call to the throttled function, t is the period where the timer is running, and x shows you the actual execution point of the throttled function.

f 1  2  3  4  5  6
@chuwy
chuwy / ConfigWithComments.scala
Created August 11, 2023 10:06 — forked from DiggesT/Api.scala
Scala code research
def loadFromPath[F[_]: Sync](path: JPath): F[Config] =
val source = ConfigSource.default(ConfigSource.file(path)).withFallback(ConfigSource.default)
loadF[F, Config](source)
def load(args: List[String]): IO[Either[Help, (SubCommand, Option[Config])]] = //input array: List[String], output: why IO
command.parse(args) match // how it matching string with help/commands?
case Left(help) => IO.pure(help.asLeft) //help command
case Right(cli) => //other commands
cli match //match with SubCommand
case SubCommand.Run(configPath, _) => //Run command
@chuwy
chuwy / diff_hosted_repo.txt
Created February 12, 2018 09:01
diff -r hosted repo
Only in hosted: com.admo-analytics
Only in hosted: com.adxtracking
Only in hosted: com.angelrush
Only in hosted: com.calltracks
Only in hosted: com.certivox
Only in repo: com.convertro
Only in hosted: com.duproprio
Only in hosted: com.duproprio_comfree
Only in hosted: com.findly
Only in hosted: com.finerylondon
@chuwy
chuwy / .gitignore
Created June 16, 2012 10:55 — forked from starenka/.gitignore
fabfile to deploy flask app to nginx/supervisor/uwsgi stack
.idea/*
*.pyc