Skip to content

Instantly share code, notes, and snippets.

@muralisc
muralisc / install-tmux.sh
Last active April 9, 2024 15:47 — forked from pokev25/install-tmux.sh
Install tmux 3.0a on Amazon Linux 2 / rhel /centos
# Install tmux 3.0a on Centos
# install deps
sudo yum install -y gcc kernel-devel make ncurses-devel
# DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL
curl -LOk https://github.com/libevent/libevent/releases/download/release-2.1.11-stable/libevent-2.1.11-stable.tar.gz
tar -xf libevent-2.1.11-stable.tar.gz
cd libevent-2.1.11-stable
./configure --prefix=/usr/local
@muralisc
muralisc / xdefaults2iterm.pl
Created June 15, 2017 14:30 — forked from thumphries/xdefaults2iterm.pl
Convert your terminal colours / Xdefaults to iTerm2 color scheme
#!/usr/bin/perl -w
# Convert .Xdefaults or similar terminal colors to iTerm2 scheme
# Only supports simple hex colors, no funny stuff
use strict;
print <<eof;
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
@muralisc
muralisc / LoadRandomColorScheme.vim
Last active December 29, 2016 13:49
Load colorscheme depending on the day of month
" load colorscheme depending on the day of month {{{
fu! s:LoadRandomColorScheme()
let s:color_file_list = globpath(&runtimepath, 'colors/*.vim' )
let s:color_file_list = substitute(s:color_file_list, '\' , '/', 'g')
let s:color_file_list = substitute(s:color_file_list, "\n" , ',', 'g')
let s:color_file_list = substitute(s:color_file_list, '\(/[^,]\+/\)' , '', 'g')
let s:color_file_list = substitute(s:color_file_list, '\.vim' , '', 'g')
" echo s:color_file_list
#!/bin/bash
if [ -z "$TMUX" ]; # if not inside tmux
then
echo outside tmux
tmux start-server
tmux new-session -d
# tmux new-window
fi
# tmux select-window -tHaystack:1
tmux split-window
#!/bin/bash
# ftpane - switch tmux pane
panes=$(tmux list-panes -s -F '#I:#P #W #{pane_current_path} #{pane_current_command} #{pane_title}')
current_window=$(tmux display-message -p '#I')
target=$(echo "$panes" | fzf) || return
target_window=$(echo $target | awk 'BEGIN{FS=":|-"} {print$1}')
target_pane=$(echo $target | awk 'BEGIN{FS=":|-"} {print$2}' | cut -c 1)

Keybase proof

I hereby claim:

  • I am muralisc on github.
  • I am muralisc (https://keybase.io/muralisc) on keybase.
  • I have a public key whose fingerprint is E324 0421 C92A 6BCC F433 2479 55C2 9BC5 3768 2B6F

To claim this, I am signing this object:

@muralisc
muralisc / vim_colorscheme_screenshots
Last active November 21, 2017 00:22
A quick script for creating screenshots of colorschemes in "flazz/vim-colorschemes"
#!/bin/bash
geo=235x65+0+0
cSchemes=`ls -1 ~/.vim/bundle/vim-colorschemes/colors | sed 's/.vim$//'`
for currentScheme in $cSchemes
do
sed -i "s/^colorscheme .*/colorscheme $currentScheme/" ~/.vimrc
urxvt --geometry $geo -e vim ~/.vimrc &
pid=$!
sleep 0.25 # VERY IMPORTANT for this gap for the window to form
# sometimes the status bar wont apprear . Press 'j' to make it appear