Windows

  • disable indexing (use locate instead)
  • disable themes, sounds
  • disable all performance settings (Computer | Properties | Advanced System Settings) except "Smooth screen fonts"

powershell

~/Documents/WindowsPowerShell/Microsoft.PowerShell_profile.ps1:

Set-PSReadLineOption -BellStyle None -EditMode Emacs
New-Alias which get-command
New-Alias grep select-string

cmd

  • Properties

    • Options | Edit Options | QuickEdit Mode = ON
    • Font | Font = "Lucida Console", Size = 11
    • Layout | Screen Buffer Size { Width = 220, Height = 5500 }
  • Prompt

    • Environment variable PROMPT=%USERNAME%$B$P$G

    • Must be set for each user individually

OpenSSH

  • https://github.com/PowerShell/Win32-OpenSSH/wiki/Install-Win32-OpenSSH
  • Host config is in C:\ProgramData\ssh
  • comment out administrators auth keys override
    #Match Group administrators
    #       AuthorizedKeysFile __PROGRAMDATA__/ssh/administrators_authorized_keys
  • Set-Service sshd -StartupType Automatic
  • New-ItemProperty -Path "HKLM:\SOFTWARE\OpenSSH" -Name DefaultShell -Value "C:\Program Files\Git\bin\bash.exe" -PropertyType String -Force
  • Restart-Service sshd

Scoop

https://github.com/ScoopInstaller/Scoop/wiki/Quick-Start

Install

  • iwr -useb get.scoop.sh | iex

    scoop install ripgrep

Cygwin

Install

Essentials

corkscrew
cron
openssh
openssl
ssmtp
vim

PIM

mutt
fetchmail
getmail
procmail
w3m   # for rendering html e-mail
gpg

offlineimap

Runs well under cygwin.

git clone git://github.com/OfflineIMAP/offlineimap.git
pip install sqlite json urllib
cd offlineimap
python setup.py

General

catdoc
chere
curl
diffutils
dos2unix
gnupg
ImageMagick
nc6
ncftp
odt2txt
oodiff
patch
patchutils
ping
psmisc
renameutils
screen
time
tree
unzip
wget
xmlstarlet
xmlto
zip

Dev

astyle
binutils
bvi
ctags
doxygen
gcc4
gdb
git
git-svn
indent
make
splint
subversion

Extra

sharutils  # uuencode/decode
sqlite3   # inspecting application db files
  • http://www.weiqigao.com/blog/2006/08/14/ten_steps_to_higher_cygwin_productivity.html
  • update passwd, group mkpasswd -l -d > /etc/passwd mkgroup -l -d > /etc/group

  • change cygdrive mount (new cygwin installations) $ vi /etc/fstab none / cygdrive binary,posix=0,user 0 0

    $ # or change on the fly:
    $ mount --change-cygdrive-prefix /
    
  • Point home to /c/Users/foo Admin$ vi /etc/passwd

  • Create /usr/local shortcuts to Windows programs

rxvt

@echo off
C:
cd C:/cygwin/bin
:: bash --login -i
rxvt -sr -sl 2500 -sb -geometry 120x30 -fg lightgray -bg black -tn rxvt -fn "Lucida Console-11" -e /usr/bin/bash --login -i

updatedb

  • http://bookweevil.wordpress.com/2008/03/28/getting-updatedb-on-cygwin-to-prune-paths-with-spaces/
  • Prune annoying paths and cache files
  • Index over /home symlink

    updatedb --localpaths='/bin /sbin /usr /etc /lib /home/* /c/opt' \ --prunepaths='/proc /c/cygwin /c/Documents.and.Settings/[^/]/Local.Settings/Temp /c/Documents.and.Settings/[^/]/Local.Settings/Temporary.Internet.Files /c/Documents.and.Settings/[^/]/Local.Settings/Application.Data/Mozilla/Firefox/Profiles/[^/]/Cache /c/Users /[^/]*/System.Volume.Information /f /m /o /p /q /r '

ssh

  • Create host keys Admin$ ssh-host-config

  • Create user keys ssh-keygen # current cygwin default is 2048bit RSA

  • Install new public key

Fix TEMP

TMP and TEMP environment variables should be unset by default Cygwin .bashrc. If they are not append the following to ~/.bashrc

unset TMP
unset TEMP

See http://cygwin.com/cygwin-ug-net/setup-env.html

VIM

  • Install gVim for windows
  • Register gVim OLE (as admin) admin|C:\opt\vim\vim73> gvim -register
  • Three ways of launching VIM:
    • gvim directly -> uses Windows HOMEDIR, vimfiles config directory
    • vim in cygwin -> uses cygwin HOME, .vim
    • gvim from cygwin -> uses cygwin HOME, vimfiles

Windows Path

VIMHOME = C:\opt\vim\vim73
PATH += %VIMHOME%

VIM Runtime Path

Set it in ~/.bashrc:

export VIMRUNTIME=$HOME/.vim

Shared plugin directory

Move cygwin .vim to vimfiles and symlink it back to .vim

cd ~
mv .vim vimfiles
ln -s vimfiles .vim

gVim win32 and Cygwin

Fix failure to create tmp files Can't open file C:/cygwin/tmp/xxxxxx.tmp

Set shell in _vimrc

"" Fix VCS integration in gvim for windows
if has("win32")
    set shell=C:\\Windows\\System32\\cmd.exe
endif

Cursor in mintty

Cygwin mintty doesn't show correct block and insert cursors by default. Add to .vimrc to fix:

let &t_ti.="\e[1 q"
let &t_SI.="\e[5 q"
let &t_EI.="\e[1 q"
let &t_te.="\e[0 q"

Still doesn't work within screen though.

Plugins

pathogen

cd ~/vimfiles/autoload
wget --no-check-certificate https://raw.github.com/tpope/vim-pathogen/master/autoload/pathogen.vim

vcscommand

cd ~/vimfiles/bundle
git clone git://repo.or.cz/vcscommand

VisVim

Visual Studio 2005 MDI

  • Create new external tool with arguments: --servername VS_NET --remote-silent "+call cursor($(CurLine), $(CurCol))" $(ItemPath)

Git

File Permissions

Ignore chmod changes in git-gui, etc.

git config core.filemode false

Line Endings

Ignore chmod changes in git-gui, etc.

git config core.autocrlf true

Outlook

Read in Plain Text

  1. File | Options | Trust Center | Trust Center Settings
  2. E-mail Security | Read as Plain Text
  3. "Read all standard mail in plain text"
  4. "Read all digitally signed mail in plain text"

Compose in Plain Text

  1. File | Options | Mail
  2. "Compose messages in this format: Plain text"
  3. Stationery and Fonts | Personal Stationery | Composing and reading plain text
    1. Lucida Console 9
  4. Replies and Forwards: Replying prefix
  5. Prefix with "> "
  6. Forwards: Include original text
  7. File | Options | Advanced
    1. International Options
    2. Preferred Encoding for outgoing messages: Unicode (UTF-8)
    3. Preferred Encoding for outgoing vCards: Unicode (UTF-8)

Disable Read Receipts

  1. File | Options | Mail
  2. Tracking
  3. "Never send a read receipt"

Create rule: move sent message to inbox

Disable AutoCorrect

  1. File | Options | Mail | Editor Options...
  2. AutoCorrect Options... | AutoCorrect
    1. Disable all except "Correct accidental usage of cAPS LOCK key"

Conversation View

  1. View tab: "Date (Conversations)"
  2. Right-click "Arrange By:" | View Settings... | Sort...
    1. Received, ascending
  3. View | Conversation Settings | Use Classic Indented View

Compose in VIM

  1. Install outlookvim
  2. Ensure VIM is OLE registered. i.e. gvim.exe -register
    1. Unzip to $vimfiles/bundle/outlookvim/
    2. In Outlook 2010
      1. File | Options | Trust Center (left pane) | Trust Center Settings (Button, right pane) | Macro Settings = "Notifications for all macros"
      2. OK
      3. Tools | Macro | Visual Basic Editor (or Alt-F11)
        1. File | Import File (or Ctrl-M)
        2. Choose the file ...\vimfiles\plugin\OutlookVim.bas
        3. Expand Modules folder
        4. Module1 | Project Properties
        5. project name = "Vim"
        6. project description = "Edit emails with Vim"
        7. File | Save
        8. Close the Visual Basic Editor
      4. Add e-mail toolbar button:
        1. New e-mail
        2. "Customize Quick Access Toolbar"`
        3. "Choose commands from" = "Macros"
        4. "Add >>" Vim.Edit
        5. Vim.Edit "Modify" and assign an icon
        6. OK

Lync

Options:

  1. General
    1. DISABLE Show emoticons in instant messages
    2. Change Font "Lucida Console 9"
    3. ENABLE Turn on logging in Lync
    4. ENABLE Minimize to the notification area instead of the task bar
  2. Personal
    1. DISABLE Show photos of contacts
  3. My Picture
    1. Do not show my picture
  4. Ringtones and Sounds
    1. DISABLE Play sounds in Lync
  5. File Saving
    1. Lync recordings, Save to: ~/lync

Network Shares

Mount network share as a folder, rather than a drive.

Firefox

  • Disable PDF plugin

Bug.n Window Manager

Trac

  • Install trac, setuptools, genshi
  • Init trac environment mkdir $USERPROFILE/trac-env C:/Python27/Scripts/trac-admin $USERPROFILE/trac-env initenv

  • Configure MD5 authentication

    • Save as genpw.py
#!/usr/bin/python

from optparse import OptionParser
# The md5 module is deprecated in Python 2.5
try:
    from hashlib import md5
except ImportError:
    from md5 import md5
realm = 'trac'

# build the options
usage = "usage: %prog [options]"
parser = OptionParser(usage=usage)
parser.add_option("-u", "--username",action="store", dest="username", type = "string",
                  help="the username for whom to generate a password")
parser.add_option("-p", "--password",action="store", dest="password", type = "string",
                  help="the password to use")
parser.add_option("-r", "--realm",action="store", dest="realm", type = "string",
                  help="the realm in which to create the digest")
(options, args) = parser.parse_args()

# check options
if (options.username is None) or (options.password is None):
   parser.error("You must supply both the username and password")
if (options.realm is not None):
   realm = options.realm

# Generate the string to enter into the htdigest file
kd = lambda x: md5(':'.join(x)).hexdigest()
print ':'.join((options.username, realm, kd([options.username, realm, options.password])))
  • Generate passwd file python genpw.py -u $USER -p $PASSWD

  • Run trac cd $USERPROFILE c:\Python27\Scripts\tracd.exe --port 8000 $USERPROFILE/trac-env --auth="yorke,trac-env/conf/passwd,trac" trac-env

New User Configuration

  • Keyboard and Region
    • Add English (UK)/US-Dvorak
    • Show Language Bar
    • LAlt+Shift+1 = UK/Qwerty
    • LAlt+Shift+2 = UK/US-Dvorak
  • Outlook
  • Firefox, plugins etc
    • Adblock
    • Pentadactyl
    • Foxyproxy
  • Cygwin

  • Rsync bootstrap profile rsync -ave ssh home:cognomen/user/ ./ rsync -ave ssh home:cognomen/user-win/ ./

  • Programming

    • Editing
      • VIM
      • .vimrc
    • Source Control
      • .svn
    • TortoiseSVN
      • External diff tool: C:\opt\vim\vim73\gvim.exe -d %base %mine
  • Folder Locations

    • Downloads -> dl
    • "My Documents" -> docs
  • Bug.n
  • 7-zip
  • VLC
  • Command Prompt Defaults
    • Screen width
    • Quick Edit Mode