dotfile   235

« earlier    

How to auto-update SSH agent environment variables when attaching to existing tmux sessions - Stack Overflow
There's an excellent gist by Martijn Vermaat, which addresses your problem in great depth, although it is intended for screen users, so I'm adjusting it for tmux here.

To summarize:

create ~/.ssh/rc if it doesn't exist yet, and add the following content:


# Fix SSH auth socket location so agent forwarding works with tmux
if test "$SSH_AUTH_SOCK" ; then
ln -sf $SSH_AUTH_SOCK ~/.ssh/ssh_auth_sock

Make it work in tmux, add this to your ~/.tmux.conf:

# fix ssh agent when tmux is detached
setenv -g SSH_AUTH_SOCK $HOME/.ssh/ssh_auth_sock

solution  tmux  screen  ssh-agent  dotfile  authentication 
yesterday by kme
git merge - What's the simplest way to git a list of conflicted files? - Stack Overflow []
I created an alias for this:

git config --global alias.conflicts "diff --name-only --diff-filter=U"
git  conflicts  merging  diff  solution  movein  essential  dotfile 
3 days ago by kme
linux - Bash Prompt with Last Exit Code - Stack Overflow
export PROMPT_COMMAND=__prompt_command # Func to gen PS1 after CMDs

function __prompt_command() {
local EXIT="$?" # This needs to be first

local RCol='\[\e[0m\]'

local Red='\[\e[0;31m\]'
local Gre='\[\e[0;32m\]'
local BYel='\[\e[1;33m\]'
local BBlu='\[\e[1;34m\]'
local Pur='\[\e[0;35m\]'

if [ $EXIT != 0 ]; then
PS1+="${Red}\u${RCol}" # Add red if exit code non 0

PS1+="${RCol}@${BBlu}\h ${Pur}\W${BYel}$ ${RCol}"
ps1  bash  promptstring  exitstatus  shellscripting  dotfile  solution  customization 
11 weeks ago by kme

« earlier    

related tags

*nix  alias  answers  articles  authentication  automate  bash  bestpractices  brew  bugs  cask  cli  clojure  command  config  configfile  configuration  conflicts  customization  default  design  dev  dev_environment_setup  development  developmentenvironment  diagram  diff  dns  dot  dotfiles  emacs  essential  example  exitstatus  file  files  fresh  git  github  globbing  gulp  history  home  homebrew  homesick  homestead  hosts  illustration  install  laravel  line  linux  load  local_dev  mac  management  manager  maybesolution  merging  movein  newbie  newsticker  order  org-mode  org  orgmode  osx  productivity  programming  prompt  promptstring  ps1  python  pythonrc  rc  rcfile  rcm  rcup  reference  ruby  sampleconfig  scheme  screen  scripts  settings  setup  shell  shellscripting  slide  solution  spacesvstabs  ssh-agent  starred  symlink  sync  sysadmin  system_setup  tabs  tabstops  terminal  terminalmultiplexor  thoughtbot  tips  tipsandtricks  tmux  tmuxrc  todo  toolbag  tools  unix  vagrant  vcs  version  versionsverwaltung  vikeybindings  vim  vimrc  visual.thinkers  webdev  whitespace  windows  winnermode  zsh 

Copy this bookmark: