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
blueprint: | |
name: Sensor Light | |
description: > | |
# 💡 Sensor Light | |
**Version: 7.1** | |
Your lighting experience, your way - take control and customize it to perfection! 💡✨ |
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 ls = require('luasnip') | |
local M = {} | |
function M.expand_or_jump() | |
if ls.expand_or_jumpable() then | |
ls.expand_or_jump() | |
end | |
end |
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 mode = { 'n', 'x', 'o' } | |
vim.keymap.set(mode, 'm', 'h', { desc = 'Left' }) | |
vim.keymap.set(mode, 'M', 'H', { desc = 'Top line of window' }) | |
vim.keymap.set(mode, 'h', 'i', { desc = 'Insert' }) | |
vim.keymap.set(mode, 'H', 'I', { desc = 'Insert at line start' }) | |
vim.keymap.set(mode, 'n', 'j', { desc = 'Down' }) | |
vim.keymap.set(mode, 'N', 'J', { desc = 'Join below line' }) | |
vim.keymap.set(mode, 'k', 'n', { desc = 'Find next' }) | |
vim.keymap.set(mode, 'K', 'N', { desc = 'Find previous' }) | |
vim.keymap.set(mode, 'e', 'k', { desc = 'Up' }) |
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
vim.o.winbar = "%{%v:lua.require'nvim.utils.nvim.winbar'.eval()%}" |
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 ts_utils = require("nvim-treesitter.ts_utils") | |
local ts_locals = require("nvim-treesitter.locals") | |
local ts_indent = require("nvim-treesitter.indent") | |
function get_method_node() | |
local curr_node = ts_utils.get_node_at_cursor() | |
local scope = ts_locals.get_scope_tree(curr_node, 0) | |
local method_node = nil | |
for _, node in ipairs(scope) 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
const resolveXpath = $x; | |
const wait = (timeout) => { | |
return new Promise((res) => setTimeout(res, timeout)); | |
}; | |
const clickPoke = () => { | |
const wrap = async () => { | |
const buttons = resolveXpath( | |
`//span[text() = 'Poke']/ancestor::div[@role="button" and @aria-label="Poke"]` |
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
// promisified setTimeout | |
const wait = async time => { | |
return new Promise(res => { | |
setTimeout(res, time); | |
}); | |
}; | |
// return random number in given min max range | |
const getRandomNumber = (min, max) => { | |
return Math.floor(Math.random() * (max - min + 1) + min); |
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
// CommonJS default export | |
module.exports = () => { | |
// do something | |
} | |
// ES6 module default export | |
export default () => { | |
// do something | |
} |