Skip to content

Instantly share code, notes, and snippets.

@florianbeer
florianbeer / set-tmux-title
Created April 21, 2015 10:47
Set tmux pane title to short hostname on ssh connections
ssh() {
if [ "$(ps -p $(ps -p $$ -o ppid=) -o comm=)" = "tmux" ]; then
tmux rename-window "$(echo $* | cut -d . -f 1)"
command ssh "$@"
tmux set-window-option automatic-rename "on" 1>/dev/null
else
command ssh "$@"
fi
}
@joaopizani
joaopizani / .screenrc
Created May 17, 2012 11:55
A killer GNU Screen Config
# the following two lines give a two-line status, with the current window highlighted
hardstatus alwayslastline
hardstatus string '%{= kG}[%{G}%H%? %1`%?%{g}][%= %{= kw}%-w%{+b yk} %n*%t%?(%u)%? %{-}%+w %=%{g}][%{B}%m/%d %{W}%C%A%{g}]'
# huge scrollback buffer
defscrollback 5000
# no welcome message
startup_message off
@tomykaira
tomykaira / bashmarks.el
Created December 6, 2011 07:31
bashmarks.el - share bashmarks shortcuts with emacs
;; -*- mode: Emacs-Lisp; coding: utf-8-unix -*-
;;; bashmarks.el - share bashmarks shortcuts with emacs
;; Copyright (C) tomykaira
;; Author: tomykaira <tomykaira@gmail.com>
;; Keywords:
;; This file is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
@takumikinjo
takumikinjo / org2doku
Created March 21, 2011 07:19
Convert Emacs org-mode formatted text to Dokuwiki formatted one.
#!/usr/bin/env perl
# Usage
#
# cat <<EOF | ./org2doku
# * heading
#
# - item
# - sub item
#
key.setGlobalKey(['C-x', '0'], function (ev, arg) {
SplitBrowser.activeBrowserCloseWindow();
}, '現在のフレームを閉じる');
key.setGlobalKey(['C-x', '1'], function (ev, arg) {
var url = SplitBrowser.activeBrowser != gBrowser ? SplitBrowser.activeSubBrowser.src : null;
var browsers = SplitBrowser.browsers;
for (var i = 0; i < browsers.length; ++i)
browsers[i].close();