Stepping Up Your Development Environment Game!
Setting-up a superhero development environment
11 min read
In every developer time, there comes a time when he has to set-up his new working environment. For me, the transition from Windows powered PC to a Mac OSX powered laptop was one of the best things I did in my career. I found the openness of things you can do on a Unix based system accompanied with a solid appealing set of software. However, setting everything the way you want it can be time consuming, so i decided after few trials and errors to share my experience in customizing my machine and how it can be easily transferred into other machines as well.
Customizing the UI
First, lets start with the light weight things. The desktop and general UI enhancement. I always love to show some nice widgets on my desktop, for that i am using . I have used which basically allows you to run custom scripts and display them on the desktop, but i wasn't at all happy with the experience of styling those "widgets" and the availability of 3rd party widgets. Übersicht lets you run system commands and display their output on your desktop in little containers, called widgets. Widgets are written using HTML5, which means they are:
- Easy to write and customize
- Can show data in tables, charts, graphs ... you name it
- Can react to different screen sizes
There is already a nice set of widgets published in the . In my widgets
folder, you will find the set of widgets i am using with customized positioning and styling.
Widgets
- for the date and time in the middle of the screen
- to show the Muslim prayer times for my area, the green indicating the current active prayer time
- to show the nice weather forecast. It uses the API to obtain your location, and the to obtain the weather information.
- System Stats
- : Shows disk usage for mounted disks, with the option to exclude specific disks.
- : Displays current Ethernet and Wi-Fi status (connected / not connected / IP Address / Mac Address.
- : Displays the current public IP address.
- : Display swap file metrics for your system.
- : Shows CPU usage summary.
- : Shows a memory usage summary.
- : Shows incoming and outgoing throughput on a user-specified network interface.
- : Total system memory benchmarks.
Installation
- Installing Übersicht can be bone using the downloadable or the recommended using would be via cask (which i will explain later) via
brew cask install ubersicht
- Installing the widgets is done by copying the contents of the widgets folder into
Library -> Application Support -> Übersicht -> widgets
. However, what i do is i setup my widgets to be in my Github repo or dropbox folder so that they are synced and can be backed up and i link the folder directly to the desired location vialn -s ~/Projects/Configurations/config/widgets/ ~/Library/Application\ Support/U¨bersicht/widgets
where the first parameter is the location of thewidgets/
folder cloned. Note I have included the folder link in my.osx
file, you may need to adjust the path of the first argument.
Other Widgets
One element that i use that is not part of Übersicht is . It is a discrete desktop calendar with support to iCal and other calendar applications.
Geeklets
In the geeklets/
folder there is a backup of the deprecated Geeklet scripts that i used with the old Geektool. If you still prefer it over Übersicht then feel free to use them.
Dock & Desktop Icons
In the flat-icons
you will find the set of flat icons i have used for my mounted HDD icons and the dock. To easily change application icons, i suggest you use which can be also installed via my caskfile.sh
To further customize the dock, i use which is the most feature-rich application for dock theming with support up to OSX Yosemite in order to provide a transparent Dock background. Dockmod can be also installed via my caskfile
.
I also remove the arrow icons for aliases/shortcuts which can be done automatically when executing my .osx
file or manually by typing the following command in the terminal:
Finder
Although i have the latest OSX Yosemite update, i am still unhappy with the capabilities of the Finder. I have found that is a great replacement. Just head over and you can check the list of things you can do with this great piece of software.
Other Tools
- : Flexiglass features complete and convenient window management with exclusive multi-touch gestures support, offering a simple way to manage many windows on a Mac with a mouse, keyboard, trackpad, and graphics tablet. It includes different tools to move, resize, and arrange windows on the screen easily and joyfully.
- : Bartender lets you organize your menu bar apps, by hiding them, rearranging them, or moving them to Bartender's Bar. You can display the full menu bar, set options to have menu bar items show in the menu bar when they have updated, or have them always visible in Bartender's Bar.
- : Alfred saves you time when you search for files online or on your Mac. Be more productive with hotkeys, keywords and file actions at your fingertips. It is super useful with the powerpack activated with features like clipboard history. Check also for more integrations.
- : Caffeine is a tiny program that puts an icon in the right side of your menu bar. Click it to prevent your Mac from automatically going to sleep, dimming the screen or starting screen savers.
- : Flashlight is an unofficial Spotlight API that allows you to pro grammatically process queries and add additional results. It's very rough right now, and a horrendous hack, but a fun proof of concept.
- : uBar aims at replacing the Mac Dock. It helps you find the window you're looking for at a glance. If an application has more than one window, you'll know right away. Click that application to open the window menu, which allows you to bring any window or even just the application itself to focus. You can turn window grouping off, and all your individual windows will be shown right in uBar.
Alfred Workflows
Workflows are one of the key features in Alfred v2; They provide a way for you to extend Alfred to perform the tasks you need more efficiently.
For example, with a workflow, you can launch a group of applications from a hotkey, create custom search filters for frequent searches or run scripts from a keyword.
The Workflows i use are (Located in the workflows
folder):
- Fantastical: Allow for easy adding of calendar events.
- Kill Process: When a process hangs, it’s a hassle to open Activity Monitor, search for it, and kill it. Once again, Alfred makes a repetitive task much faster.
- Shorten URL: Shortening URLs (for tweets, emails, etc.) is a pain; you have to go to the website you want, enter your URL, wait for the transformation to occur, copy it, and move on. This allows for a quicker process across all the famous URL shorteners.
- StackOverflow: Search StackOverflow questions directly.
- : Encoding and decoding a string into multiple variations
- A bunch of Github commands integrations for Alfred.
- Search Safari and Chrome Tabs: Search tabs in Safari and Chrome (also supports WebKit, Chromium, and Chrome Canary)
Setting-up the Machine
Developers are very picky about their working environment. We may consolidate various .
files tailed for our tastes over years and track the change in a version control system. It’s no secret that on the UNIX world, dotfiles play a very important part when it comes to making your terminal look good. Be it on Linux, be it on a Mac. Dotfiles are there so you can configure your favorite software to look just the way you like it.
Dotfiles can be used to customize the look of the terminal, to manage bundles with Vim and saving configuration for almost anything.
One thing that normally annoys me, is the fact that whenever I rebuild my machine (or build a new one) I need to copy over my dotfiles, and obviously make sure they are kept up-to-date on all my devices when I change something.
My configuration consists of the following:
- Mac OSX terminal with bash shell configured with a forked configurations
- iTerm2 terminal with zsh shell configured with a forked configurations
- A cloned
gitignore
repo for easy fetching of.gitignore
files into various projects - A Custom set of for various machine-wide configurations
Installation
First of all you will have to clone this repository into your local machine, and since there are a bunch of other git modules in this repo, you will need to recursively clone this repository and all of it children using:
git clone --recursive http://github.com/ahmadassaf/Configurations
Note If you have cloned without --recursive, you may find out that some folders are empty. To fix this:
git submodule update --init
Afterwards you can launch the installation by running sh install.sh
. What this will do is:
It will ask you if you would like to run an update using the
update.sh
script. Usually this is good when you have lots of changes in your repos and you wish to fetch all the changes afterwards, but simply skip this if this is a fresh installation.It will install the
oh-my-zsh
scripts by symlinking the folder and thezshrc
into the~
folder.It will prompt if you wish to install
zsh-syntax-highlighting
and does that automatically.It will install the
bash-it
script files and guide throughout the installation process.It will prompt if you would like to add the Aliases defined also to your
zsh
aliases recommendedIt will symlink the dotfiles into your
~
folder.It will prompt if you wish to install type-based
ls
It will prompt if you wish to install
grc
for command output coloringIt will install
homebrew
and the following brew formulas:- Core Modules coreutils, moreutils, findutils, binutils
- Bash, Bash plugins bash, bash-completion, zsh, grc
- Development git, heroku, node, mercurial, iojs
- Git speific addons git-extras, hub, bfg
- Utilities htop-osx, id3tool, lesspipe, ssh-copy-id, the_silver_searcher, tree, fcrackzip, foremost, ack, p7zip, pigz, pv, gnu-sed, vim, wget
- Network tools dns2tcp, knock, rename, webkit2png
- grep, screen
It will install
cask
and the following applications:- Utilities path-finder, alfred, cakebrew, a-better-finder-rename, fastscripts, bettertouchtool, iterm2, launchrocket, gyazo, ubersicht, dockmod, liteicon, cleanmymac, bartender, flexiglass
- Productivity todoist, evernote, mendeley-desktop, fantastical, slack, screenhero
- Development sublime-text3, atom, sourcetree, github, brackets, coda, tower, transmission-remote-gui, macvim, sqlite-database-browser, lightpaper, codebox, anvil, hex-fiend, ksdiff, codekit, MAMP
- Internet, Networking firefox, google-chrome, charles, dropbox, google-drive, mailbox, viber, utorrent, plex-media-server
- Misc vlc, imagealpha, imageoptim, steam, the-unarchiver, spotify, handbrake
- Quick Look plugins betterzipql, qlcolorcode, qlmarkdown, qlprettypatch, qlstephen, quicklook-csv, quicklook-json, quicknfo, suspicious-package, webp-quicklook
- Color pickers colorpicker-developer, colorpicker-skalacolo
It will aggregate the
iTerm
andTerminal
themes as prompt you for the name of the color scheme you want to apply and apply it for youIt will prompt if you would like to run the
.osx
file which contains some system wide modifications and runs it for you. I recommend that you read the.osx
file and enable or disable the features that you like. I also create some symlinks there for my Sublime Text 3 configurations and the widgets of Übersicht.It will install the
It will prompt if you wish to set the bash to the updated version installed by Homebrew
Updates
Simply run sh update.sh
and it will take care of the rest