A repository of my dotfiles and OS-specific configuration details.
Contents
This directory, as with many dotfile repositories, aim to create a reproducible configuration setup for when you move to a new computer. Because of my work and personal computer usage, I am to account for all major operating systems i.e. macOS, Windows, and Unix.
GNU Stow is used to manage my dotfiles. It symbolically links my configuration files to their appropriate places.
Install with respect to working operating system.
sudo apt-get install stow
brew install stow
sudo pacman -S stow
# Setup SSH keys
ssh-keygen
# ...Copy key from ~/.ssh/id_rsa.pub
# Add value to GitHub list of acceptable keys
# Install dotfiles
cd ~
git clone git@github.com:erictleung/dotfiles.git
cd dotfiles
# Install specific configurations
stow bash # e.g. bash configuration files
If possible, installing the Windows Subsystem for Linux is the most ideal situation to having a terminal-like interface.
As an Emacs user, I want to use the visual GUI. This requires an X Client to generate the GUI. This can done using X Launch. Some instructions to set this up are written up here.
If WSL cannot used because of administrative privileges, the second best option
is to install an Emacs GUI with Git Bash. To
install the GUI from here. Download
one of the installers, like emacs-27.2-x86_64-installer.exe
,should install
Emacs in C:/Program Files/
.
When opening Emacs, the home directory is located in
C:/Users/<user_name>/AppData/Roaming/
. Because I use SyncThing to sync my Org
mode notes, SyncThing should put its folders in this Roaming/
directory for
path navigation to work as expected. Similarly, my dotfiles/
should be copied
into this directory.
From Git Bash, you can run the following to link these files because stow
don't be able to reach it properly.
cd
ln -s ~/dotfiles/emacs/.emacs.d ~/AppData/Roaming
In the past, I have made use of Cygwin as the terminal window I use. Updates and package management are done using the Cygwin executable file. However, it appears MSYS2 is a better alternative bceause it
"...provide[s] a build environment for native Windows software and the Cygwin-using parts are kept at a minimum."
When setting up MSYS2, the path defaults to the AppData/Roaming/
directory.
To make it more native with the Window's user home director, navigate to
~/etc/nsswitch.conf
and make the edit
db_home: windows # cygwin desc
These changes are summarized here. The packages in MSYS2 can be found here and here.
There is a package manager, chocolatey, that I've heard about and have downloaded, but it is less utilized. I will note here on using it in the future.
Homebrew and Linuxbrew are both great package managers when you don't have access to root.
Note: must have Ruby installed.
# macOS
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Linux
sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"
To uninstall Homebrew, run the following:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
For LaTeX on Ubuntu,
cd ~
mkdir texmf
sudo apt-get install xzdec
tlmgr init-usertree
These tools are missing from the shell, so let's install them here.
pkg install vim emacs make git curl openssh stow
To install various machine learning packages, I found this repository helpful in some of the commands to run to install
https://github.com/sanheensethi/Installing-ML-in-Termux-Python
A quick summary of the commands below:
apt update
apt upgrade
apt install clang git python python-dev fftw freetype freetype-dev libpng \
libpng-dev pkg-config
pip install --upgrade pip
pip install numpy matplotlib pandas jupyter
apt install wget
curl -o setup.sh https://its-pointless.github.io/setup-pointless-repo.sh
bash setup.sh
apt install scipy
rm setup.sh
pip install scikit-learn
Here are some notable packages I regularly depend on:
academic-phrases
for academic writingace-window
for better window managementavy/swiper
for navigation in filescompany
for autocompletedeft
/zetteldeft
for quick note managementelfeed
/elfeed-org
/elfeed-goodies
for RSS readinghelm-bibtex
for searching and managing bibliographiesorg-brain
for concept mappingorg-mode
for drafting documents and organizingorg-ref
for BibTeX bibliography managementprojectile
for quickly navigating files across projecttry
for simply trying out packages without commitmentsw3m
for browsing the internet within Emacswhich-key
for hints when pressing key chordswritegood-mode
for writing wellyasnippet
for quick snippets and templates
Run the following.
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
Then from within vim
, run
:PluginInstall
to install the listed plugins in vim
configuration file.
Reminder that this directory has git configurations that can be done again, but the information already exists here to make a consistent configuration across computers.
Below are some pieces of software that are useful for working and help me interface with files and be productive.
CLI
pandiff
- Prose diffs for any document format supported by Pandoc; installs bynpm
.jq
- Lightweight and flexible command-line JSON processor.ranger
- A VIM-inspired file manager for the console.sqlfluff
- The SQL Linter for humans.- QRcode.show - Generate QR code using curl.
- ShellCheck - A static analysis tool for shell scripts (live editor).
Web Tools
- Tiny Helpers - A collection of free single-purpose online tools for web developers.
- QR Code Generator - Simple and useful.
- repl.it - Create interactive REPLs for lots of languages.
- JDoodle - Like repl.it, but also includes MySQL and MongoDB.
- DB Fiddle - Database-specific fiddle.
- Online LaTeX editor - Quickly and easily create LaTeX equation images.
- Twitter Card Validator - See how your website will show up on Twitter.
- OneLook - Dictionary with more expressive search patterns and also has a nice thesaurus and reverse dictionary.
- Duckie - A tool for one person pair programming.
- remove.bg - Remove image backgrounds.
- AutoDraw - Drawing tool with machine learning guessing your drawing for quick illustrations.
- Rentry.co - Markdown pastebin.
- doi2bib - Take DOI and give BibTeX.
- diagrams.net - Easy to create diagrams online (formerly draw.io).
- Resumake - Easy template application to create a resume.
- Quick Database Diagrams - Draw entity-relationship diagrams by writing pseudocode.
- Excalidraw - Virtual whiteboard for sketching hand-drawn like diagrams (https://excalidraw.com/).
- Color Wheel - Canva - Tool to create good color combinations.
- Banner - Generate banner images for blog posts. Source at https://github.com/liyasthomas/banner.
- Web Developer Tools - Miscellaneous convenience tools for web development, the most useful to me so far have been the image conversion tools.
- tinypng - Smart PNG and JPEG compression.
- readme.so - Easily create a README.
- Online PNG Tools - Collection of useful PNG image utilities for working with PNG graphics files.
- sequel fumpt - Help format SQL with slider width.
- ConvertCSV - Convert CSV files to others.
Cross-Platform Desktop
- Color Oracle - Design for color impaired.
- Freeplane - Free mind mapping and knowledge management software.
- Publish or Perish - Retrieved and analyzes academic citations from variety of sources with a number of metrics.
- TikZit - Simple GUI editor for graphs and string diagrams.
- VLC Media Player - Free and open source cross-platform multimedia player.
- LICEcap - Capture an area of your desktop and save it directly to .GIF.
Note: The above desktop applications were chosen to be cross platform and standards based in terms of their inputs and outputs, if applicable.
Windows Specific
- Dexpot - Virtual desktops for Windows.
- Cygwin - Linux feeling on Windows 7 (Windows 10 has Windows Subsystem for Linux (WSL) option for terminal).
- WinDirStat - Disk usage statistics viewer and cleanup tool.
- Rapid Environment Editor - Windows environment variables management.
- ImageGlass - A lightweight, versatile image viewer.
Firefox Plugins
- Mouseless - Use
mouse as least as possible (https://github.com/mortie/mouseless-plugin). See
scripts/mouseless.json
file with configuration in JSON form. - web-archives - View archived and cached versions of web pages of 10+ search engines (https://github.com/dessant/web-archives).
- Unpaywall - Gives you a link to a free PDF when viewing scholarly articles.