Skip to content

Instantly share code, notes, and snippets.

@pmaoui
pmaoui / lastc.sh
Last active November 3, 2015 12:16
Execute one of your last 5 history commands with one key
#!/bin/bash
# run with: history -a && ./lastc.sh
clear
echo "Use \"history -a\" before to populate ~/.bash_history with your current history"
sleep 2
last5=$(cat ~/.bash_history |tail -n6 |head -n1 |xargs echo -n)
last4=$(cat ~/.bash_history |tail -n5 |head -n1 |xargs echo -n)
last3=$(cat ~/.bash_history |tail -n4 |head -n1 |xargs echo -n)
last2=$(cat ~/.bash_history |tail -n3 |head -n1 |xargs echo -n)
@pmaoui
pmaoui / .tmux.conf
Last active November 9, 2015 08:49
Tmux & Vim configuration
# remap prfix to ctrl+a
#set -g prefix C-a
#unbind C-b
#bind C-a send-prefix
# window splitting
unbind %
bind | split-window -h
unbind '"'
bind - split-window -v
@pmaoui
pmaoui / Maoui.vim
Created October 24, 2014 18:06
Maoui.vim
" Vim color file - maoui
" Generated by http://bytefluent.com/vivify 2014-10-23
set background=dark
if version > 580
hi clear
if exists("syntax_on")
syntax reset
endif
endif