Skip to content

Instantly share code, notes, and snippets.

View chazdky's full-sized avatar

Chaz Davis chazdky

View GitHub Profile
@romainl
romainl / Vim_pushing_built-in_features_beyond_their_limits.markdown
Last active June 25, 2025 10:55
Vim: pushing built-in features beyond their limits

Vim: pushing built-in features beyond their limits

The situation

Searching can be an efficient way to navigate the current buffer.

The first search commands we learn are usually / and ?. These are seriously cool, especially with the incsearch option enabled which lets us keep typing to refine our search pattern. / and ? really shine when all we want is to jump to something we already have our eyeballs on but they are not fit for every situation:

  • when we want to search something that's not directly there, those two commands can make us lose context very quickly,
  • when we need to compare the matches.
@leobossmann
leobossmann / extract.js
Created December 6, 2016 15:54
Extract and rename images from Pixieset
var imgs = new Array;
// replace all images by the xxl version
$('li > img').each(function(i, item){
var new_src = $(item).prop('src').replace('large', 'xxlarge');
$(item).prop('src', new_src);
imgs.push($(item));
});
// kill everything on page
$('body').empty();
#!/bin/bash
tmux start-server
tmux new-session -d -n tmux-ssh-window -s tmux-ssh
for i in $*
do
tmux split-window -v -t tmux-ssh-window
tmux send-keys "ssh $i" C-m
tmux select-layout -t tmux-ssh-window main-horizontal
@brettinternet
brettinternet / tmux-setup.sh
Created July 5, 2017 14:07
a simple shell script to setup my django dev env with tmux
#!/bin/sh
SESSION_NAME="dev"
APP_PATH="~/path/to/stuff"
APP="basename ${APP_PATH}"
SERVER="server ssh address"
tmux has-session -t ${SESSION_NAME}
if [ $? != 0 ]
@eltonlaw
eltonlaw / bash-cheatsheet.sh
Created July 17, 2017 21:09 — forked from LeCoupa/bash-cheatsheet.sh
Bash CheatSheet for UNIX Systems
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
@mihaiparaschiv
mihaiparaschiv / setup-tmux-example.sh
Last active March 21, 2020 01:12
Utility scripts to create a tmux session
tmux new-window -n analysis -c /d/work/example
cd /g/work/a-analytics
tmux select-window -t analysis
tmux split-window -v -p 80
tmux select-pane -t 0
tmux send-keys "cd run/analysis-local" C-m
tmux send-keys "ls -la" C-m
tmux select-pane -t 1
tmux send-keys "ls -la" C-m
tmux split-window -h
This will be the engineering journal that i will write during my journey with Cisco Networking Academy.
1 - DONE
2 - DONE
3 - DONE
4 - DONE
5 - DONE
6 - DONE
7 - DONE
8 - DONE
" ~/.vim/ftplugin/tex.vim
"" vim-latex
" IMPORTANT: grep will sometimes skip displaying the file name if you
" search in a singe file. This will confuse Latex-Suite. Set your grep
" program to always generate a file-name.
set grepprg=grep\ -nH\ $*
" OPTIONAL: Starting with Vim 7, the filetype of empty .tex files defaults to
" 'plaintex' instead of 'tex', which results in vim-latex not being loaded.
" ~/.vim/ftplugin/python.vim
" syntastic (recommended settings)
let g:syntastic_python_checkers = ['pylint']
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
" let g:syntastic_python_pylint_post_args="--max-line-length=79"
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1