1. Windows
- disable indexing (use locate instead)
- disable themes, sounds
- disable all performance settings (Computer | Properties | Advanced System Settings) except "Smooth screen fonts"
1.1 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
2. Cygwin
2.1 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
2.2 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
2.3 updatedb
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
'
2.4 ssh
2.5 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
3. 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
3.1 Windows Path
VIMHOME = C:\opt\vim\vim73
PATH += %VIMHOME%
3.2 Shared plugin directory
Move cygwin .vim to vimfiles and symlink it back to .vim
cd ~
mv .vim vimfiles
ln -s vimfiles .vim
3.3 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
3.4 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.
3.5 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
Visual Studio 2005 MDI
4. Git
4.1 File Permissions
Ignore chmod changes in git-gui, etc.
git config core.filemode false
4.2 Line Endings
Ignore chmod changes in git-gui, etc.
git config core.autocrlf true
5. Outlook
5.1 Read in Plain Text
- File | Options | Trust Center | Trust Center Settings
- E-mail Security | Read as Plain Text
- "Read all standard mail in plain text"
- "Read all digitally signed mail in plain text"
5.2 Compose in Plain Text
- File | Options | Mail
- "Compose messages in this format: Plain text"
- Stationery and Fonts | Personal Stationery | Composing and reading plain text
- Lucida Console 9
- Replies and Forwards: Replying prefix
- Prefix with "> "
- Forwards: Include original text
- File | Options | Advanced
- International Options
- Preferred Encoding for outgoing messages: Unicode (UTF-8)
- Preferred Encoding for outgoing vCards: Unicode (UTF-8)
5.3 Disable Read Receipts
- File | Options | Mail
- Tracking
- "Never send a read receipt"
5.4 Create rule: move sent message to inbox
- File | Options | Mail | Editor Options...
- AutoCorrect? Options... | AutoCorrect?
- Disable all except "Correct accidental usage of cAPS LOCK key"
5.6 Conversation View
- View tab: "Date (Conversations)"
- Right-click "Arrange By:" | View Settings... | Sort...
- Received, ascending
- View | Conversation Settings | Use Classic Indented View
5.7 Compose in VIM
- Install outlookvim
- Ensure VIM is OLE registered. i.e.
gvim.exe -register
- Unzip to
$vimfiles/bundle/outlookvim/
- In Outlook 2010
- File | Options | Trust Center (left pane) | Trust Center Settings (Button, right pane) | Macro Settings = "Notifications for all macros"
- OK
- Tools | Macro | Visual Basic Editor (or Alt-F11)
- File | Import File (or Ctrl-M)
- Choose the file ...\vimfiles\plugin\OutlookVim?.bas
- Expand Modules folder
- Module1 | Project Properties
- project name = "Vim"
- project description = "Edit emails with Vim"
- File | Save
- Close the Visual Basic Editor
- Add e-mail toolbar button:
- New e-mail
- "Customize Quick Access Toolbar"`
- "Choose commands from" = "Macros"
- "Add >>" Vim.Edit
- Vim.Edit "Modify" and assign an icon
- OK
6. Lync
Options:
- General
- DISABLE Show emoticons in instant messages
- Change Font "Lucida Console 9"
- ENABLE Turn on logging in Lync
- ENABLE Minimize to the notification area instead of the task bar
- Personal
- DISABLE Show photos of contacts
- My Picture
- Do not show my picture
- Ringtones and Sounds
- DISABLE Play sounds in Lync
- File Saving
- Lync recordings, Save to: ~/lync
7. Network Shares
Mount network share as a folder, rather than a drive.
mklink /d C:\Folder\ShareName \\Server\ShareName\Directory
8. Firefox
9. Bug.n Window Manager
10. Trac
#!/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
11. New User Configuration