dotfile   239

« 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 
june 2016 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 
june 2016 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 
april 2016 by kme

« earlier    

related tags

*nix  alfred  alias  answers  articles  authentication  bash  bestpractices  brew  bugs  cask  cli  clojure  command  config  configfile  configuration  conflicts  customization  default  design  dev  dev_environment_setup  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  sampleconfig  scheme  screen  screenshot  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: