Skip to content

Instantly share code, notes, and snippets.

View alok's full-sized avatar

Alok Singh alok

View GitHub Profile
Verifying that +aloksingh is my Bitcoin username. You can send me #bitcoin here: https://onename.io/aloksingh
@alok
alok / cvimrc
Last active January 12, 2016 02:57
let hintcharacters = "qwfupzxycvmlp,asdhione"
let typelinkhintsdelay = 0
let scrollduration = 50
let scrollstep = 50
let mapleader = "-"
let @@map = 'chrome-extension://dehlfafgngipkellhgnjalaicpldjhjm/pages/options.html'
let searchlimit = 60
let timeoutlen = 500
let activehighlight = "#00ff82"
let fullpagescrollpercent = 75
diff --git a/colour.c b/colour.c
index a56ddce..8098f83 100644
--- a/colour.c
+++ b/colour.c
@@ -29,305 +29,85 @@
* of the 256 colour palette.
*/
-struct colour_rgb {
- u_char i;
@alok
alok / # git-ftp - 2016-04-16_12-01-37.txt
Created April 16, 2016 19:06
git-ftp on Mac OS X 10.11.4 - Homebrew build logs
Homebrew build logs for git-ftp on Mac OS X 10.11.4
Build date: 2016-04-16 12:01:37
#!/usr/bin/env bash
command -v nvim >/dev/null 2>&1 || { brew tap neovim/neovim; brew install --HEAD neovim;}
# mkdir ~/.config/nvim
mkdir "$HOME/.config/nvim"
NVIM_HOME="$HOME/.config/nvim"
# vim-plug install
curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
@alok
alok / a.rb
Created November 15, 2016 05:45
docker run -a stderr --rm -v /Users/alokbeniwal/neomake:/testplugin -v /Users/alokbeniwal/neomake/tests/vim:/home neomake/vims-for-tests make -C /testplugin testvim TEST_VIM=/vim-build/bin/vim8069 VIM_ARGS="'+Vader! tests/neomake.vader'"
Vim: Warning: Output is not to a terminal
Vim: Warning: Input is not from a terminal
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Nov 10 2016 21:01:18)
Included patches: 1-69
Compiled by vim-testbed
Huge version without GUI. Features included (+) or not (-):
+acl +file_in_path +mouse_sgr +tag_old_static
+arabic +find_in_path -mouse_sysmouse -tag_any_white
+autocmd +float +mouse_urxvt -tcl
@alok
alok / a.rb
Created November 15, 2016 13:20
/Users/alokbeniwal/.config/nvim/after/init-after.vim:43:let g:incsearch#auto_nohlsearch = 1
/Users/alokbeniwal/.config/nvim/after/init-after.vim:45:let g:incsearch#magic = '\v'
/Users/alokbeniwal/.config/nvim/after/init-after.vim:46:let g:incsearch#separate_highlight = 1
/Users/alokbeniwal/.config/nvim/after/init-after.vim:47:let g:incsearch#do_not_save_error_message_history = 1
/Users/alokbeniwal/.config/nvim/after/init-after.vim:48:map / <Plug>(incsearch-index-/)
/Users/alokbeniwal/.config/nvim/after/init-after.vim:49:map ? <Plug>(incsearch-index-?)
/Users/alokbeniwal/.config/nvim/after/init-after.vim:50:map <silent> n <Plug>(incsearch-nohl-n)zv:ShowSearchIndex<CR>
/Users/alokbeniwal/.config/nvim/after/init-after.vim:51:map <silent> N <Plug>(incsearch-nohl-N)zv:ShowSearchIndex<CR>
/Users/alokbeniwal/.config/nvim/after/init-after.vim:52:map <silent> * <Plug>(incsearch-nohl0)<Plug>(asterisk-z*)zv:ShowSearchIndex<CR>
/Users/alokbeniwal/.config/nvim/after/init-after.vim:53:map <silent> g* <Plug>(incsearch-no
hs.hotkey.bind({"shift", "ctrl"}, "T", function()
local win = hs.window.focusedWindow()
local f = win:frame()
local screen = win:screen()
local max = screen:frame()
f.x = max.x
f.y = max.y
f.w = max.w / 2
f.h = max.h
@alok
alok / a.rb
Created November 18, 2016 09:38
E121: Undefined variable: b:dittoMatchedwords
Error detected while processing function <SNR>333_dittoTextChangedI[7]..<SNR>333_clearCurrentScope[15]..<SNR>333_clearMatches:
line 13:
E116: Invalid arguments for function len(b:dittoMatchedwords)
Error detected while processing function <SNR>333_dittoTextChangedI[7]..<SNR>333_clearCurrentScope[15]..<SNR>333_clearMatches:
line 13:
E15: Invalid expression: i < len(b:dittoMatchedwords)
Error detected while processing function <SNR>333_dittoTextChangedI[7]..<SNR>333_clearCurrentScope[15]..<SNR>333_clearMatches:
line 13:
E121: Undefined variable: b:dittoMatchedwords
hs.window.animationDuration = 0
hs.hotkey.bind({"shift", "ctrl"}, "T", function()
local win = hs.window.focusedWindow()
local f = win:frame()
local screen = win:screen()
local max = screen:frame()
f.x = max.x
f.y = max.y
f.w = max.w / 2