Skip to content

Instantly share code, notes, and snippets.

@shallowbit
shallowbit / cvimrc
Last active June 15, 2016 21:07
cvimrc
set autoupdategist
map ^n nextSearchResult
map ^N previousSearchResult
map n :execute ^nzz<CR>
map N :execute ^Nzz<CR>
set cncpcompletion
let nextmatchpattern = "((?!first)(next|older|more|>|›|»|forward)+)"
let previousmatchpattern = "((?!last)(prev(ious)?|newer|back|«|less|<|‹)+)"
site '*://*.newegg.com/*' {
call :pintab
@shallowbit
shallowbit / .cvimrc
Last active July 28, 2021 20:16
[cvimrc] - shallowbit
" Settings
set autoupdategist
set hud
set smoothscroll
" noautofocus stops sites from focusing on an input box when they load
set noautofocus
set typelinkhints
set smartcase
set nonativelinkorder
set showtabindices
@shallowbit
shallowbit / output.js
Created March 26, 2018 17:46 — forked from derhuerst/output.js
how fetch a GitHub user's stars
[
{
owner: 'bcoe',
repo: 'top-npm-users',
description: ':star: Generate a list of top npm users by based on monthly downloads.',
language: 'JavaScript',
isFork: false,
stargazers: 27,
watchers: 27
}
@shallowbit
shallowbit / bash_args.sh
Created April 10, 2018 06:24 — forked from bsnape/bash_args.sh
bash arguments
#!/usr/bin/env bash
set -x
set -e
if [ $# -eq 0 ]; then
echo "Received no arguments. Exiting..."
exit
fi
# $@ is one-based and not zero-based
@shallowbit
shallowbit / Firefox-tabs-hide.sh
Last active March 15, 2019 01:31
Firefox Tab hider script (linux or OSX)
#!/bin/bash
#
# Based upon [[https://superuser.com/questions/1268732/how-to-hide-tab-bar-tabstrip-in-firefox-57-quantum/1268734#1268734][How to hide tab bar (tabstrip) in Firefox 57+ Quantum]] by [[https://superuser.com/users/162466/vasyanovikov][VasyaNovikov]]
# This causes the [[https://support.mozilla.org/en-US/questions/1187186][The Back Button is top right under the Red close button on my Mac]] issue.
# Resolve that by right-clicking the toolbar, then inserting three Flexible Space into the toolbar on the far-left-hand side.
case $( uname ) in
"Linux")
profile_dir=~/.mozilla/firefox/$( ls -tr ~/.mozilla/firefox/ | grep -v profiles.ini | tail -1 )
;;
"Darwin")
@shallowbit
shallowbit / userChrome.css
Last active January 5, 2019 10:29
Userchrome for minimal Icon-only TST sidebar
/* Hide main tabs toolbar */
#TabsToolbar {
visibility: collapse;
}
/* Sidebar min and max width removal */
#sidebar {
max-width: none !important;
min-width: 0px !important;
}
/* Hide splitter, when using Tree Style Tab. */
# Version-specific commands [grumble, grumble]
# See: https://github.com/tmux/tmux/blob/master/CHANGES
run-shell "tmux setenv -g TMUX_VERSION $(tmux -V | cut -c 6-)"
if-shell -b '[ "$(echo "$TMUX_VERSION < 2.1" | bc)" = 1 ]' \
"set -g mouse-select-pane on; set -g mode-mouse on; \
set -g mouse-resize-pane on; set -g mouse-select-window on"
# In version 2.1 "mouse" replaced the previous 4 mouse options
if-shell -b '[ "$(echo "$TMUX_VERSION >= 2.1" | bc)" = 1 ]' \
# Modal cursor color for vi's insert/normal modes.
# http://stackoverflow.com/questions/30985436/
# https://bbs.archlinux.org/viewtopic.php?id=95078
# http://unix.stackexchange.com/questions/115009/
zle-line-init () {
zle -K viins
#echo -ne "\033]12;Grey\007"
#echo -n 'grayline1'
echo -ne "\033]12;Gray\007"
echo -ne "\033[4 q"
autocmd BufDelete * let g:latest_deleted_buffer = expand("<afile>:p:gs?\\?/?")
nnoremap <F6> :e <C-R>=fnameescape(g:latest_deleted_buffer)<CR><CR>
# Overwrite configs depending on version
run-shell "bash ~/.tmux/verify_tmux_version.sh"