Skip to content

Instantly share code, notes, and snippets.

View creativenull's full-sized avatar

Arnold Chand creativenull

View GitHub Profile
@creativenull
creativenull / caps_to_esc.ahk
Last active January 10, 2024 16:40
ahk v2 script to map capslock to escape
*CapsLock::Escape
@creativenull
creativenull / wsl_to_win_clipboard.ahk
Last active January 10, 2024 16:40
ahk v2 script to copy txt file into clipboard for WSL
; Since I disable interop in WSL, this means I isolate my VM from Windows
; but copy pasting between WSL and Windows is also isolated.
; It's easier to copy from Windows to WSL via `Shift + Ins`
; but not easy to copy from WSL to Window, hence this autohotkey v2 script.
; Pressing `Win + V` will read a txt file that WSL can write to, and
; add to the clipboard. Save the old clipboard contents that I can
; still use `Ctrl + V` to paste the original copied content.
@creativenull
creativenull / twitchbot_ws.ts
Last active February 21, 2022 19:38
Simple twitch chat bot, connected via websockets for the browser, nodejs and deno
/**
* A quick, simple way to connect to a channel as a twitch chat bot. Works in the browser, deno and nodejs.
* Note for nodejs, you will need the `ws` package.
*
* OAUTH_TOKEN: https://twitchapps.com/tmi/ (omit 'oauth:' from the string)
* BOT_USERNAME: Name of the bot that will be used to post messages to the main channel
* CHANNEL_NAME: Name of the target channel for the BOT_USERNAME to join
*/
// For NodeJS only: `npm install ws`
@creativenull
creativenull / nnn_cheatsheet
Last active May 21, 2021 21:17
nnn cheatsheet
Shamelessly copied from: https://github.com/jarun/nnn/wiki/Usage
NAVIGATION
Up k Up PgUp ^U Scroll up
Dn j Down PgDn ^D Scroll down
Lt h Parent ~ ` @ - HOME, /, start, last
Ret Rt l Open ' First file
g ^A Top . F5 Toggle hidden
G ^E End 0 Lock terminal
b ^/ Bookmark key , Pin CWD
@creativenull
creativenull / init.lua
Last active April 25, 2021 22:35
Trash's config, organized
-- ====================================================================================
-- Functions
-- ====================================================================================
-- For plugins that use g: for configurations
local function plugins_init()
vim.g.airline_theme = 'base16'
vim.g.github_enterprise_urls = { 'https://github.prod.hulu.com' }
vim.g.airline_powerline_fonts = 1
vim.g['airline#extensions#tabline#enabled'] = 1
@creativenull
creativenull / init.lua
Last active March 21, 2021 04:03
Simple init.lua config converted from init.vim
-- =============================================================================
-- = Utils/Functions =
-- =============================================================================
function CursorMode()
local mode = vim.fn.mode()
if mode == 'n' then
return 'NORMAL'
elseif mode == 'i' then
return 'INSERT'
@creativenull
creativenull / init.vim
Last active March 21, 2021 03:34
Simple init.vim config file for converting into init.lua
" =============================================================================
" = Utils/Functions =
" =============================================================================
function! CursorMode() abort
if mode() == 'n'
return 'NORMAL'
elseif mode() == 'i'
return 'INSERT'
elseif mode() == 'c'
@creativenull
creativenull / init.lua
Last active March 21, 2021 02:53
My neovim config in lua - single file
-- =============================================================================
-- = Utils/Functions =
-- =============================================================================
-- Global option
local o = vim.o
-- Window option
local wo = vim.wo
-- One line execution, like :h execute
local cmd = vim.cmd
@creativenull
creativenull / init_barebones.lua
Last active March 19, 2021 14:34
minimal neovim config file in lua, opinionated of course
-- =============================================================================
-- = Plugins =
-- =============================================================================
-- Plugin settings that are set with g: variable should be declared BEFORE you load the plugins
-- For example: "let g:varname = ..." becomes "vim.g.varname = ..."
-- "let g:var#name#with#hash = ..." => "vim.g['var#name#with#hash'] = ..."
-- Load the plugins
@creativenull
creativenull / mini_init.vim
Last active February 28, 2021 20:20
The bare bones, bring your own plugin manager, theme, vim configuration - opinionated of course
" Minimal vim config
" =============================================================================
filetype plugin indent on
" =============================================================================
" = Plugin Manager =
" =============================================================================
" Use any plugin manager here