Проверять метод на скрытость, можете тут: 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
#!/usr/bin/env bash | |
# Tested with jq 1.6 & fzf 0.42.0 | |
# Inspired by https://github.com/reegnz/jq-zsh-plugin | |
# Call with `jazz <big_file_with_many_paths>.json` or `<command producing a valid json> | jazz` | |
# End command with `... | pbcopy` or `... > output.json` to save selection | |
input=$1 | |
TMP_DIR=$(mktemp -d /tmp/jazz_XXX) | |
chmod 700 "$TMP_DIR" |
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
//> using lib "com.softwaremill.sttp.openai::core:0.0.6" | |
object ai: | |
import scala.quoted.* | |
import sttp.openai.OpenAISyncClient | |
import sttp.openai.requests.completions.chat.* | |
import sttp.openai.requests.completions.chat.ChatRequestBody.ChatBody | |
import sttp.openai.requests.completions.chat.ChatRequestBody.ChatCompletionModel | |
opaque type GPT[A <: String] <: String = String |
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.
Update: I created jq-zsh-plugin that does this.
One of my favourite tools of my trade is jq. It essentially enables you to process json streams with the same power that sed, awk and grep provide you with for editing line-based formats (csv, tsv, etc.).
Another one of my favourite tools is fzf.
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 |
NewerOlder