Skip to content

Instantly share code, notes, and snippets.

View aniketpant's full-sized avatar
WHAT

Aniket Pant aniketpant

WHAT
View GitHub Profile

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

# First install tmux
brew install tmux
# For mouse support (for switching panes and windows)
# Only needed if you are using Terminal.app (iTerm has mouse support)
Install http://www.culater.net/software/SIMBL/SIMBL.php
Then install https://bitheap.org/mouseterm/
# More on mouse support http://floriancrouzat.net/2010/07/run-tmux-with-mouse-support-in-mac-os-x-terminal-app/
@aniketpant
aniketpant / delete-empty-dirs.sh
Created April 8, 2014 01:15
Delete all empty directories
$ find . -empty -type d -delete
@aniketpant
aniketpant / script.sh
Last active August 29, 2015 13:57
Install AMD Catalyst Legacy on Ubuntu 12.04
# The following script has been taken from https://launchpad.net/~makson96/+archive/fglrx
# If you are using Ubuntu 12.04.2 make sure you got linux-headers-generic-lts-quantal package installed.
# sudo apt-get install linux-headers-generic-lts-quantal
sudo add-apt-repository ppa:makson96/fglrx
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install fglrx-legacy
sudo reboot
@aniketpant
aniketpant / bulk-unfollow-quora.js
Created February 21, 2014 19:57
Bulk unfollow questions in Quora
unfollowLinks = $('.follow_question.unfollow_question');
$.each(unfollowLinks, function(index, link) { $(link).delay(2000).trigger("click"); });
@aniketpant
aniketpant / todo.html
Created January 16, 2014 11:09
Another tiny todo demo using Backbone.js
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Spinal</title>
<meta name="description" content="Learning backbone.js">
@aniketpant
aniketpant / Old-is-gold.markdown
Created November 21, 2013 10:02
A Pen by Aniket Pant.
@aniketpant
aniketpant / luhn.js
Created November 11, 2013 04:26
Bank Card Validation Tests
function luhn_checksum( cardNumber ) {
var checkDigit = cardNumber % 10;
var checksumNumber = parseInt( cardNumber / 10 ).toString();
var digits = checksumNumber.length;
var sum = 0,
digit,
tempNumber;
for ( var i = 0; i < digits; i++ ) {
@aniketpant
aniketpant / skrum.zsh-theme
Created September 1, 2013 06:27
My custom ZSH theme
ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}%{$fg[green]%}["
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$fg[green]%}]%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}*%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_CLEAN=""
# git settings
RPS1='$(git_prompt_info)'
PROMPT='%{$fg[cyan]%}[%~% ]%(?.%{$fg[green]%}.%{$fg[red]%})%B$%b '