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/bash | |
ACPI_BALANCE="\_SB.PCI0.LPC0.EC0.VPC0.DYTC 0x000FB001" | |
ACPI_POWER="\_SB.PCI0.LPC0.EC0.VPC0.DYTC 0x0012B001" | |
ACPI_ECO="\_SB.PCI0.LPC0.EC0.VPC0.DYTC 0x0013B001" | |
ACPI_MODE="\_SB.PCI0.LPC0.EC0.SPMO" | |
MODE=$(sh -c "echo '$ACPI_MODE' > /proc/acpi/call; tr -d '\0' < /proc/acpi/call") | |
MODE=${MODE:2} | |
TARGET=$(((MODE+1)%3)) |
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
#include <bits/stdc++.h> | |
using namespace std; | |
inline int *new_query(int op, int x, int y); | |
inline void clear_queries(int **queries, int cnt); | |
int **get_queries(int cnt); | |
inline int get_replaced_val(unordered_map<int, int> &ref, int query); | |
int main() { |
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/sh | |
USAGE="Usage nvim_isolated_conf.sh [OPTIONS] Directory | |
A tool to easily test isolated neovim config | |
Options: | |
-c Create a mimimal config tree at Directory | |
-e Edit init.vim of config in Directory | |
-h Show this message | |
-l Load neovim with config from Directory |
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
-- Uses: | |
-- Semantic | |
-- require'keymap'.[?mode][?nore]map[?!]('key', 'command string | lua callback', 'patams' ...) | |
-- require'keymap'.nnoremap('<leader>a', function() print 'hello' end, 'silent') | |
-- require'keymap'.imap('<C-Space>', 'compe#complete()', 'silent', 'expr') | |
-- To unmap <C-Space> key | |
-- require'keymap'.imap('<C-Space>') |
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
-- Copyright (c) 2020-2021 shadmansaleh | |
-- LICENCE: MIT | |
-- To see what chord cancelation means checkout https://github.com/svermeulen/vimpeccable#chord-cancellation-maps | |
-- Uses | |
-- require'keychord'.cancel('<leader>') | |
-- Add more suffixes to suffixes table if needed | |
local M = {} |
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
-- This script has been succeeded by | |
-- https://github.com/shadmansaleh/colorsceme_generator.nvim | |
-- Thid script is nolonger maintained so please use the plugin version. | |
-- This file creates a colorscheme from aleady available colorscheme | |
-- Author : Shadman Saleh | |
-- Licence : You can do whatever you want with it but do provide proper cradit | |
-- Uses : |
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
lua << LUA_END | |
my_namespace78 = {} | |
function my_namespace78.setup_path() | |
local split_paths = vim.split(package.path, ";") | |
local paths = {} | |
for _, v in ipairs(split_paths) do | |
table.insert(paths, vim.fn.fnamemodify(v, ":p:h")) | |
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
-- ============================================================================= | |
-- lightline to lualine theme converter | |
-- Author: shadman | |
-- License: MIT License | |
-- ============================================================================= | |
-- Instructions | |
-- 1. Source this file in neovim with lightline installed | |
-- 2. execute :lua light2lualine_theme_converter('theme_name') |
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 lua_complete = {} | |
lua_complete.data = {} | |
lua_complete.__loadData = function(parent, parent_name) | |
-- check whether parent_name was passed | |
if parent_name == nil then | |
parent_name = "" | |
-- add . to parent_name when it's not empty | |
elseif parent_name ~= "" then | |
parent_name = parent_name .. "." |