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
(() => { | |
if ("externalAPI" in window && "mediaSession" in navigator) { | |
const ARTWORK_SIZES = ["200x200", "300x300", "400x400"]; | |
// обновление состояния проигрывания | |
function setPlaybackState() { | |
navigator.mediaSession.playbackState = externalAPI.isPlaying() ? "playing" : "paused"; | |
} | |
// создание метадаты для отображения в мини-плеере OS |
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
#!/bin/zsh | |
compile () { | |
cp -R misc/dist/ios_xcode bin/iphone | |
local t | |
for target in debug release; do | |
if [ $target = release ]; then | |
t=opt | |
else |
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
local grep_word_under_cursor = function() | |
local filetype = string.match(vim.api.nvim_buf_get_name(0), "%.%w*$") or vim.o.filetype | |
if filetype then | |
-- greps a word under cwd and then opens quickfix list with the results | |
vim.api.nvim_input([[:vim <C-R><C-W> **/*]] .. filetype .. [[<CR>:cope<CR>]]) | |
else | |
vim.notify("Filetype is nil. Can't grep that shit.", vim.log.levels.ERROR, {}) | |
end | |
end |