Destroy another computer? Got a new one? No matter. Here's what you need. (Aside, things were simpler in 2006.)
Retrieve from old computer
Linux and macOS
- .localrc, .gitconfig.local, .history, and /etc/hosts
- .ssh directory for private keys
- export .gnupg data (passphrase is in secure).
gpg -a --export david@dlma.com > david-dlma.com-public-gpg.key gpg -a --export-secret-keys david@dlma.com > david-dlma.com-secret-gpg.key
Windows
- Filezilla settings export (Esp. for rsync.net)
- PuTTY registry export (sometimes at Documents\PuTTY.reg)
regedit /e "%USERPROFILE%\Documents\PuTTY.reg" HKEY_CURRENT_USER\Software\SimonTatham
- File C:\Program Files\PuTTY\key_for_rpi_roku.ppk because your Raspberry Pi does not allow password login (also mentioned at a Medium post).
Bash
Follow these dotfile installation instructions. Read the README.md, install ctags and cscope early for better vim experience.
Desktop Apps
All OSes
1. Get Google Chrome.
Windows
1. FTP with FileZilla, and compress/extract with 7 Zip.
2. Get Paint.NET (Or visit pixlr.)
Don't forget the plugins you like:
- AlphaMask.dll - Alpha Mask Import Plugin (2.0)
- Vandermotten.PaintDotNetEffects.zip - Drop Shadow and other effects, KrisVDM's Plugin Pack
- ColorToAlpha.dll - Tanel's Photo and Color Plugins
- EoEffects.dll - Evan's Effects v1.0 by evanolds. (Mirror and Quad Reshape.)
- Shape3D.dll - Shape3D by MKT. (3D Mapping onto cube, sphere and cylinder.)
Porting Documents
1. Secrets: In Linux-alikes, get ~/.ssh, and import ~/.gnupg data.
gpg --import david-dlma.com-public-gpg.key gpg --import david-dlma.com-secret-gpg.key gpg --edit-key david@dlma.com ... gpg> trust Your decision? 5 (Ultimate trust)
2. The Usual Suspects: For every user account, including Public: "My Documents", "Downloads", "Music", "Pictures"
3. APPDATA: See what needs to be copied from %APPDATA%, for example Minecraft saves.
4. The Registry: PuTTY save files are at [HKEY_CURRENT_USER\Software\SimonTatham]. Speaking of PuTTY, don't forget to copy your public keys. (You know where they are.)
5. The Root: See what needs to be copied from the root, for example:
- Python: Copy your custom modules in ...\Lib\site-packages\.
- xampp: Copy your sites in ...\htdocs\.
6. Individual App Setting Exports: Filezilla has an export feaure. Sublime's are in %AppData%\Roaming\Sublime Text 3\Packages\User\Preferences.sublime-settings
7. Task Scheduler: Copy the scheduling of the encryption and backup tasks you've set for yourself.
8. Deauthorize the Old Computer: Steam, iTunes, stuff like that.
Development Environment
0. Get Developer Fonts
Install both DejaVuSansMono and RobotoMono. See font instructions for PuTTY below.
I like Roboto's 0 and (LN) better than DejaVu's. But DejaVu's font is a little crisper in PuTTY 0.70, and seems to render much faster.
C:\cygwin64\bin\mintty.exe -i /Cygwin-Terminal.ico -o Font="Roboto Mono for Powerline" -See other notes in my .vimrc file
1. Get Python and a compatible
pywin32 module and editor.
Consider one of these IDEs, depending on the target.
- Microsoft Visual Studio Code.
- PyCharm Community Edition seems to be gaining in popularity.
- oauth2
git clone --depth 1 https://github.com/simplegeo/python-oauth2.git
- httplib2 (Used by oauth2;
wget
one) - pyenchant for processing words
- word frequency. (You have the list. Check your email.)
- pytz. Timezone support.
- pg, aka PyGreSQL.
- wx, wxWidgets.
Module to consider installing:
- Archive:
- unzip
- Net:
- curl
- rsync
- libssh2-devel
- libssh2_1
- openssh
- Editors:
- vim
- Devel:
- ctags
- cscope
- gcc-core
- gcc-g++
- gcc4 (req. for compiling matplotlib)
- git
- mingw-gcc-core
- mingw-gcc-g++
- libgfortran3 (req. by numpy)
- libjpeg8 (req. for PIL and maybe pillow)
- liblapack0 (req. by numpy)
- libquadmath0 (req. by numpy)
- libncurses-devel
- libncursesw-devel (not there for 64-bit version?)
- make
- mercurial
- Libs:
- librsync-devel (for Duplicityi)
- librsync1 (for Duplicity)
- libuuid-devel (for cygwin64 pip. binutils also needed.)
- libX11-devel (for PIL and Pillow)
- Math:
- gnuplot
- Net:
- httpie
- Python:
- python
- python3
- python3-numpy
- python3-pip
- python3-requests
- Text:
- jq
- Utils:
- patch
- Web:
- wget
Right-click on the Cygwin window, select Looks→Cursor→Block.
To install boto and Pillow (if PIL is a problem because of X11/Xlib.h)...
$ curl https://bootstrap.pypa.io/get-pip.py > get-pip.py $ python3 get-pip.py $ python3 -m pip install Pillow $ python3 -m pip install boto
Use cygcheck to check dependencies.
Maybe get and run startxnosh.bat if you install the xinit module. Then running tools like xcalc from a PuTTY ssh connection with X11 forwarding checked will work. An alternative to that is Xming.
4. Optionally Manually Configure vim. (Here's a vim Cheat Sheet)
Ensure that vim supports the Python interpreter. (YouTube video.)
$ vim --version | grep +python
If it doesn't, then ensure you've got the required modules. (Mostly the same as listed above for PuTTY.) Then execute the following:
$ git clone --depth 1 https://github.com/vim/vim.git $ cd vim/src $ ./configure --enable-pythoninterp --with-features=huge --prefix=$HOME/opt/vim $ make && make install $ mkdir -p $HOME/bin $ cd $HOME/bin $ ln -s $HOME/opt/vim/bin/vim; ln -s $HOME/opt/vim/bin/vim vi $ which vim $ vim --version | grep +python
Note: If you choose to install the gvim binary onto a Microsoft Windows machine, the .vimrc file is named, _vimrc, and might reside in C:\Program Files\Vim. The colors, autoload and bundle directories reside within a vimfiles directory there.
Make the .vim_undo directory with one of the two following commands. The last one is for GVim on Windows, since Windows won't let you start a directory name with a dot. Run the command from cygwin.
$ mkdir $HOME/.vim_undo $ mkdir `cygpath -u $USERPROFILE`/.vim_undo
Set the font by editing your .gvimrc (or _gvimrc) file like so: :e $MYGVIMRC
" set guifont=Consolas:h10 set guifont=Courier\ New:h10.vimrc (Even more tips.)
Install or download your .vimrc file from the dotfiles git repo.
Use a color scheme you like, like desert, peaksea or tolerable.
$ mkdir -p ~/.vim/colors $ curl -LSso ~/.vim/colors/desert.vim \ https://raw.githubusercontent.com/dblume/desert.vim/main/desert.vim $ curl -LSso ~/.vim/colors/peaksea.vim \ http://www.vim.org/scripts/download_script.php?src_id=15675 $ curl -LSso ~/.vim/colors/tolerable.vim \ http://vim.sourceforge.net/scripts/download_script.php?src_id=3741
Manual steps to install some vim modules:
vim git-tab (or "gittab") installs handy context-sensitive Git commands in Vim that load the results in a new tab. The commands infer what you want from the current filename and whether there's a commit hash under the cursor.
taglist is indispensable. Check the link for further instructions regarding interaction with ctags if you don't already have it set up. (To do: See why Mir Nazim recommended tagbar instead. Also investigate Jedi.)
$ cd ~/.vim/bundle $ curl http://vim.sourceforge.net/scripts/download_script.php?src_id=7701 > taglist_45.zip $ unzip taglist_45.zip -d taglist $ rm taglist_45.zip $ cd ~/.vim/bundle/taglist/doc; vim -c ":helptags ."
Install :Bdelete from vim-bbye. vim-bbye installs an improved :Bclose script for deleting buffers without losing your window layout.
$ cd ~/.vim/bundle $ curl -OL https://github.com/moll/vim-bbye/archive/master.zip $ unzip master.zip $ rm master.zip $ mv vim-bbye-master/ bbye
If you want the ability to open files with a line number as given by grep -n, use file-line. And if you want to use * and # in visual mode, use visual-star-search.
$ mkdir ~/.vim/plugin $ curl -LSso ~/.vim/plugin/file-line.vim \ http://www.vim.org/scripts/download_script.php?src_id=17417 $ curl -LSso ~/.vim/plugin/visual-star-search.vim \ https://raw.githubusercontent.com/nelstrom/vim-visual-star-search/master/plugin/visual-star-search.vim
command-t was recommended by Steve Losh. But it requires vim to have been compiled with Ruby support.
$ vim --version | grep +ruby
Most filetypes should have correct syntax coloring, but just in case, you could add it yourself. For example, for yaml, you'd get yaml.vim. You'll need to create a new filetype in your .vimrc file, and add an entry to read your syntax file, too.
autocmd BufRead,BufNewFile *.yaml set filetype=yaml autocmd! Syntax yaml source $VIM/yaml.vim
And install the syntax file...
$ curl -LSso ~/.vim/yaml.vim \ http://www.vim.org/scripts/download_script.php?src_id=2249
Discretionary (Some obsolete)
1. Backup to rsync.net and other remotes: Schedule backup tasks.
2. Consider WinMerge or Beyond Compare or Meld.
3. Get Mozilla Firefox.
Your favorite themes were Winestripe or StrataStripe, but things are different in Firefox 4. Get the Add-ons you love:
- pinboard.in's bookmarklet
- Tab To Window
- Firebug
- Web Developer
- HttpFox
- User Agent Switcher
about:config
parameters:
browser.tabs.tabMinWidth 75 browser.tabs.closeButtons 3 browser.urlbar.hideGoButton true
4. Inkscape for vector graphics. (I need to test this out.)
5. PDF creation: PDF Creator and reading: Foxit.
6. Fraps for recording desktop video.
7. Sync Outlook to Google Calendar with gSyncit. ( Calendar Sync by pppindia is an alternative.)
8. Prey. (If your new computer is a laptop, that is.) Remember to leave a Guest Account available for the thief to use, so that Prey has a chance to checkin.
9. VLC Media Player.