Проверять метод на скрытость, можете тут: vk.com/dev/МЕТОД
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[keys.normal] | |
C-f = [":new", ":insert-output lf-pick", ":theme default", "select_all", "split_selection_on_newline", "goto_file", "goto_last_modified_file", ":buffer-close!", ":theme tokyonight_storm"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// copy paste this in console | |
function shader_exporter(duration, width, heigth, paused) { | |
document.getElementById('demogl').style.width = width + 'px'; | |
document.getElementById('demogl').style.height = heigth + 'px'; | |
document.getElementById('myResetButton').click(); | |
document.getElementById('myRecord').click(); | |
if (paused) document.getElementById('myPauseButton').click(); | |
let t0 = performance.now(); | |
function loop(){ | |
if (performance.now() - t0 > duration * 1000) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
— Да? | |
— Алё! | |
— Да да? | |
— Ну как там с деньгами? | |
— А? | |
— Как с деньгами-то там? | |
— Чё с деньгами? | |
— Чё? | |
— Куда ты звонишь? |
Get the metadata and content of all files in a given GitHub repo using the GraphQL API
You might want to get a tree summary of files in a repo without downloading the repo, or maybe you want to lookup the contents of a file again without download the whole repo.
The approach here is to query data from GitHub using the Github V4 GraphQL API.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cats.Monad | |
import cats.effect.concurrent.{Ref, Semaphore} | |
import cats.effect.{Concurrent, Resource} | |
import cats.implicits._ | |
import fs2.{Pipe, Stream} | |
import fs2.concurrent.{NoneTerminatedQueue, Queue} | |
/** Represents the ability to enqueue keyed items into a stream of queues that emits homogenous keyed streams. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Luke's config for the Zoomer Shell | |
# Enable colors and change prompt: | |
autoload -U colors && colors | |
PS1="%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$reset_color%}$%b " | |
# History in cache directory: | |
HISTSIZE=10000 | |
SAVEHIST=10000 | |
HISTFILE=~/.cache/zsh/history |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import System.Environment (getArgs) | |
myApp :: [String] -> IO () | |
myApp args = | |
case args of | |
[name] -> putStrLn ("Top of the morning to you, " ++ name) | |
_ -> putStrLn "I only know how to use one argument D:" | |
main :: IO () | |
main = do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"name": "Rust color scheme", | |
"rules": [ | |
/* --- grey items --- */ | |
{ | |
"scope": "comment", | |
"foreground": "color(var(black) blend(#fff 50%))", | |
}, | |
/* --- red items --- */ | |
{ |
I have some data which has adjacent entries that I want to group together and perform actions on.
I know roughly that fs2.Pull
can be used to "step" through a stream and do more complicated
logic than the built in combinators allow. I don't know how to write one though!
In the end we should have something like
def combineAdjacent[F[_], A](
shouldCombine: (A, A) => Boolean,
NewerOlder