Skip to content

Instantly share code, notes, and snippets.

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
#!/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
(() => {
if ("externalAPI" in window && "mediaSession" in navigator) {
const ARTWORK_SIZES = ["200x200", "300x300", "400x400"];
// обновление состояния проигрывания
function setPlaybackState() {
navigator.mediaSession.playbackState = externalAPI.isPlaying() ? "playing" : "paused";
}
// создание метадаты для отображения в мини-плеере OS